{"openapi":"3.1.0","info":{"title":"Galvanize Nova","version":"0.1.0"},"paths":{"/health":{"get":{"tags":["health"],"summary":"Health Check","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/auth/signup":{"post":{"tags":["auth"],"summary":"Signup","description":"Create new user account with email/password.\n\nAfter signup, user needs to verify email via OTP.\nReturns user with is_email_verified=False.\n\nCRIT-7: Rate limited to prevent automated account creation.","operationId":"signup_api_v1_auth_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/login":{"post":{"tags":["auth"],"summary":"Login","description":"Login with email/password.\n\nHIGH-3: Returns both access token (15 min) and refresh token (30 days).\nAlso sets HTTP-only cookies for XSS protection on web clients.\nCRIT-7: Rate limited to prevent brute-force attacks.","operationId":"login_api_v1_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserLogin"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Token"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/refresh":{"post":{"tags":["auth"],"summary":"Refresh Access Token","description":"Refresh access token using refresh token (HIGH-3).\n\nUse this to get a new access token when the current one expires.\nThe refresh token is long-lived (30 days) while access tokens are short-lived (15 min).\n\nCRIT-7: Rate limited to prevent abuse — but generously, and per IP. A\n68-minute exam sat by a lab of students on one NAT address needs hundreds\nof refreshes an hour between them; the signed token, not the counter, is\nwhat makes this endpoint safe (#1340).","operationId":"refresh_access_token_api_v1_auth_refresh_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshTokenRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Token"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/send-otp":{"post":{"tags":["auth"],"summary":"Send Otp","description":"Send OTP verification code to user's email.\n\nUse this to:\n- Resend verification code during signup\n- Send code for OTP-based login (users without passwords)\n\nCRIT-7: Rate limited to prevent OTP spam.","operationId":"send_otp_api_v1_auth_send_otp_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendOTPRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendOTPResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/verify-otp":{"post":{"tags":["auth"],"summary":"Verify Otp Endpoint","description":"Verify OTP code and mark email as verified.\n\nOn success:\n- Marks user's email as verified\n- Returns JWT access token and refresh token for immediate login\n- Sets HTTP-only cookies for web XSS protection\n\nCRIT-7: Rate limited to prevent OTP brute-force.\nHIGH-3: Returns refresh token for token refresh capability.","operationId":"verify_otp_endpoint_api_v1_auth_verify_otp_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyOTPRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyOTPResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/password-setup":{"post":{"tags":["auth"],"summary":"Password Setup","description":"Set a password on an authenticated OTP-only account.\n\nIdempotent — calling on an account that already has a password\noverwrites it (matches the reset-password contract). Once set, the\n`password_setup_dismissed_at` timestamp is also cleared so the\nnext verify-otp response reports `needs_password_setup_prompt=false`.","operationId":"password_setup_api_v1_auth_password_setup_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordSetupRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PasswordSetupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/password-dismiss":{"post":{"tags":["auth"],"summary":"Password Dismiss","description":"Mark the password-setup prompt as dismissed for this user.\n\nSets `users.password_setup_dismissed_at = now()` so the next\nverify-otp response no longer prompts. No body, no response body\n(204) — the action is the entire payload.","operationId":"password_dismiss_api_v1_auth_password_dismiss_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/logout":{"post":{"tags":["auth"],"summary":"Logout","description":"Logout user by clearing HTTP-only auth cookies.\n\nHIGH-3: Clears authentication cookies on the server side.\nFrontend should also clear any locally stored tokens.","operationId":"logout_api_v1_auth_logout_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/auth/guest":{"post":{"tags":["auth"],"summary":"Create Guest Session","description":"Create a guest session token for anonymous users (#199).\n\nReturns a short-lived JWT that allows:\n- 20 practice questions (10 per section)\n- 4 lesson views\n- No diagnostic, mocks, section tests, or drills\n\nThe token is stateless - no database record is created.\nGuest session ID is embedded in the token for tracking.\n\nNote: No rate limiting needed since tokens are stateless\nand don't create database resources.","operationId":"create_guest_session_api_v1_auth_guest_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GuestTokenResponse"}}}}}}},"/api/v1/auth/me":{"get":{"tags":["auth"],"summary":"Get Me","description":"Get current authenticated user profile with profile and assessment data.","operationId":"get_me_api_v1_auth_me_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/google":{"get":{"tags":["auth"],"summary":"Google Login","description":"Initiate Google OAuth flow.\n\nRedirects user to Google's consent screen.\nAfter consent, Google redirects back to /auth/google/callback.\n\nArgs:\n    source: Optional lead magnet source (e.g., \"mock-test\", \"sample-test\")\n           Passed through OAuth state to track registration source.\n    utm_*: UTM marketing attribution params, forwarded via OAuth state.\n    signup_page: The page the user started the OAuth flow from. Carried\n           through OAuth state so the callback can persist it and recover\n           the GA4 join key (#1213 3g). Falls back to `Referer`, so this\n           leg works without a frontend change; an explicit param wins.","operationId":"google_login_api_v1_auth_google_get","parameters":[{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},{"name":"signup_page","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signup Page"}},{"name":"redirect_path","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect Path"}},{"name":"utm_source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Source"}},{"name":"utm_medium","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Medium"}},{"name":"utm_campaign","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Campaign"}},{"name":"utm_term","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Term"}},{"name":"utm_content","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Content"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/google/callback":{"get":{"tags":["auth"],"summary":"Google Callback","description":"Handle Google OAuth callback.\n\n1. Exchange code for tokens\n2. Get user info from Google\n3. Create or login user\n4. Redirect to frontend with JWT token and refresh token (HIGH-3)","operationId":"google_callback_api_v1_auth_google_callback_get","parameters":[{"name":"code","in":"query","required":true,"schema":{"type":"string","title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/exchange":{"post":{"tags":["auth"],"summary":"Exchange Authorization Code","description":"Exchange authorization code for JWT tokens (HIGH-2).\n\nThis endpoint is part of the secure OAuth flow:\n1. Google OAuth redirects to frontend with short-lived auth code\n2. Frontend calls this endpoint to exchange code for tokens\n3. Tokens are returned in response body AND set as HTTP-only cookies\n\nSecurity:\n- Auth codes expire after 60 seconds\n- Auth codes are single-use (deleted after exchange)\n- Prevents token exposure in browser history, logs, and referrer headers\n- HTTP-only cookies protect against XSS on web clients\n\nCRIT-7: Rate limited to prevent abuse.","operationId":"exchange_authorization_code_api_v1_auth_exchange_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthCodeExchangeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthCodeExchangeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/me/account-type":{"get":{"tags":["auth"],"summary":"Get Account Type","description":"Get current user's account type.\n\nReturns null if user hasn't selected an account type yet.\nFrontend should redirect to account-type selection if null.","operationId":"get_account_type_api_v1_auth_me_account_type_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountTypeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["auth"],"summary":"Set Account Type","description":"Set or update user's account type (student/parent).\n\nThis is a mandatory step before accessing the dashboard.\nCan be changed later from profile settings.","operationId":"set_account_type_api_v1_auth_me_account_type_put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountTypeUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountTypeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/forgot-password":{"post":{"tags":["auth"],"summary":"Forgot Password","description":"Request a password reset email.\n\n- Sends a reset link to the user's email\n- Link expires in 1 hour\n- For security, always returns success (don't reveal if email exists)\n\nCRIT-7: Rate limited to prevent password reset abuse.","operationId":"forgot_password_api_v1_auth_forgot_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ForgotPasswordResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/validate-reset-token":{"post":{"tags":["auth"],"summary":"Validate Reset Token Endpoint","description":"Validate a password reset token without using it.\n\nUse this to check if a token is valid before showing the reset form.\nReturns whether the token is valid and not expired.","operationId":"validate_reset_token_endpoint_api_v1_auth_validate_reset_token_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateResetTokenRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateResetTokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/reset-password":{"post":{"tags":["auth"],"summary":"Reset Password","description":"Reset password using a valid reset token.\n\n- Validates the token\n- Updates the user's password\n- Marks the token as used","operationId":"reset_password_api_v1_auth_reset_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/users/me/profile":{"get":{"tags":["users"],"summary":"Get Profile","description":"Get current user's extended profile.\n\nReturns profile with:\n- Phone information\n- Academic information (grade, school board, target exam date)\n- Parent information (for student accounts)\n- Data collection skip counts\n- Computed fields (has_phone, has_academic_info, etc.)","operationId":"get_profile_api_v1_users_me_profile_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["users"],"summary":"Update Profile","description":"Update user's profile (partial updates allowed).\n\nCan update:\n- phone: { country_code, number }\n- academic: { grade, school_board, target_exam_date }\n- parent: { name, email, phone_country_code, phone_number }\n\nOnly provided fields are updated.","operationId":"update_profile_api_v1_users_me_profile_put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateProfileRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/users/me/profile/phone":{"put":{"tags":["users"],"summary":"Update Phone","description":"Update user's phone number.\n\nPRD Spec (Section 6.2):\n- Collected at trial activation\n- No skip allowed","operationId":"update_phone_api_v1_users_me_profile_phone_put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePhoneRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/users/me/profile/academic":{"put":{"tags":["users"],"summary":"Update Academic Info","description":"Update user's academic information.\n\nPRD Spec (Section 6.2):\n- Collected after 3 days of trial\n- Max 2 skips allowed\n- Forced before weekly review","operationId":"update_academic_info_api_v1_users_me_profile_academic_put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAcademicInfoRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/users/me/profile/parent":{"put":{"tags":["users"],"summary":"Update Parent Info","description":"Update parent information (for student accounts).\n\nPRD Spec (Section 6.2):\n- Collected before first mock test\n- No skip allowed for students","operationId":"update_parent_info_api_v1_users_me_profile_parent_put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateParentInfoRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserProfileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/users/me/profile/skip":{"post":{"tags":["users"],"summary":"Skip Data Collection","description":"Skip a data collection modal and increment skip count.\n\nPRD Spec (Section 6.2):\n- phone: No skip allowed (always returns error)\n- academic: Max 2 skips allowed\n- parent: No skip allowed\n\nReturns:\n- success: Whether skip was recorded\n- skip_count: Current skip count for this field\n- can_skip_again: Whether user can skip again next time","operationId":"skip_data_collection_api_v1_users_me_profile_skip_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkipDataCollectionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkipDataCollectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/users/me/tier":{"get":{"tags":["users"],"summary":"Get Tier Info","description":"Get current user's tier information.\n\nReturns:\n- Current tier\n- Trial status and days remaining (if applicable)\n- Feature access map (which features are available)\n- Usage limits for the tier\n\nTrial expiry is handled centrally on every authenticated request via\nSubscriptionService(db).check_and_expire (see app/utils/auth.py); this\nendpoint just reads the (now-current) effective tier.","operationId":"get_tier_info_api_v1_users_me_tier_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TierInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/users/me/qualification":{"get":{"tags":["users"],"summary":"Get Qualification Status","description":"Get current user's qualification status.\n\nReturns:\n- status: 'unqualified' | 'iq' | 'dq'\n- iq_at: When user became Interest Qualified\n- dq_at: When user became Decision Qualified\n- dq_trigger: What triggered DQ (if applicable)\n- show_decision_paths: Whether to show Decision Paths modal","operationId":"get_qualification_status_api_v1_users_me_qualification_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QualificationStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/users/me/qualification/advisor-request":{"post":{"tags":["users"],"summary":"Request Advisor","description":"Record when a user clicks \"Talk to an Advisor\".\n\nThis is a DQ signal - user explicitly wants human contact.\nReturns a redirect URL for advisor scheduling (Cal.com or similar).","operationId":"request_advisor_api_v1_users_me_qualification_advisor_request_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvisorRequestRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdvisorRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/dashboard":{"get":{"tags":["dashboard"],"summary":"Get Dashboard","description":"Aggregated dashboard data for the signed-in user.\n\nReturns one `DashboardExamSlice` per exam the user has an active\nsubscription for, plus cross-sell entries for the rest, plus the\nonboarding checklist when the user has never completed an attempt.","operationId":"get_dashboard_api_v1_me_dashboard_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__dashboard__DashboardResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/recent-activity":{"get":{"tags":["dashboard"],"summary":"Get Recent Activity","description":"Mixed-source recent activity feed sorted by completion time, newest first.","operationId":"get_recent_activity_api_v1_me_recent_activity_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Max items to return (1–50)","default":5,"title":"Limit"},"description":"Max items to return (1–50)"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecentActivityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/service-leads":{"post":{"tags":["dashboard"],"summary":"Create Service Lead","description":"Submit a Zoho lead when the user clicks \"Talk to Expert\" on a service card.\n\nService-layer gates apply in order: rate limit (5/hour) → idempotency\n(5-min dedup) → env check (non-prod logs but doesn't POST) → Zoho POST.\n\nHTTP status mapping:\n  201 success      → ServiceLeadResponse (success=True)\n  201 idempotent   → ServiceLeadResponse (success=True, idempotent=True)\n  201 dry_run      → ServiceLeadResponse (success=True, dry_run=True) [non-prod only]\n  429 rate-limited → \"too many requests, try later\"\n  502 Zoho failure → \"couldn't reach the CRM, try again\"","operationId":"create_service_lead_api_v1_me_service_leads_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceLeadCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceLeadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/product-targets/{product_key}":{"put":{"tags":["dashboard"],"summary":"Upsert Product Target","description":"Create or update the user's per-product targets.\n\nComposite-PK upsert against `user_product_targets` (#544 D8 / RE-A5).\nPartial-update semantics: either `target_test_date` or `target_score`\nmay be provided independently; the other field is preserved on\nexisting rows.\n\nValidation:\n  - `product_key` must be one of the ProductKey enum values\n  - `target_test_date` must be today or later (sanity guard)\n  - At least one of target_test_date / target_score must be set","operationId":"upsert_product_target_api_v1_me_product_targets__product_key__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"product_key","in":"path","required":true,"schema":{"type":"string","title":"Product Key"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductTargetUpsert"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProductTargetResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/external-launch/{product_key}":{"post":{"tags":["dashboard"],"summary":"Create External Launch","description":"Issue a signed launch URL for an external-prep destination.\n\n`product_key` must be in `external_launch_service.EXTERNAL_LAUNCH_SCOPE`\n(currently `ielts` and `gre`). 422 otherwise.","operationId":"create_external_launch_api_v1_me_external_launch__product_key__post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"product_key","in":"path","required":true,"schema":{"type":"string","title":"Product Key"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalLaunchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/toefl-home":{"get":{"tags":["dashboard"],"summary":"Get Toefl Home","description":"List the TOEFL assessments visible to the current user, gated by\ntheir tier's `feature_limits` (set on the TOEFL package).\n\nSee `toefl_home_service.build_toefl_home` for the unlock semantics:\n-1 → unlimited, N → first N, 0 → all locked. Section tests are picked\nround-robin across skills (1 from each Listening/Reading/Speaking/\nWriting first) so free users get balanced coverage.","operationId":"get_toefl_home_api_v1_me_toefl_home_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToeflHomeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/ielts-home":{"get":{"tags":["dashboard"],"summary":"Get Ielts Home","description":"List the IELTS assessments visible to the current user, gated by\ntheir tier's `feature_limits` (set on the IELTS package). Same unlock\nsemantics + payload shape as `/toefl-home`, but scored on the IELTS\nband (0-9). See `ielts_home_service.build_ielts_home`.","operationId":"get_ielts_home_api_v1_me_ielts_home_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IeltsHomeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/gre-home":{"get":{"tags":["dashboard"],"summary":"Get Gre Home","description":"List the GRE assessments visible to the current user, gated by their\ntier's `feature_limits` (set on the GRE package). Same unlock semantics +\nrender states as `/ielts-home`, but GRE reports three independent measures\n(Verbal/Quant 130-170, AWA band 0-6), not a single band. See\n`gre_home_service.build_gre_home`.","operationId":"get_gre_home_api_v1_me_gre_home_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GreHomeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/pte-home":{"get":{"tags":["dashboard"],"summary":"Get Pte Home","description":"List the PTE assessments visible to the current user, gated by their\ntier's `feature_limits` (set on the PTE package). Same unlock semantics as\n`/gre-home`, but PTE reports a single 10-90 Overall and the free funnel is\nmock-only (no diagnostic). See `pte_home_service.build_pte_home`.","operationId":"get_pte_home_api_v1_me_pte_home_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PteHomeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/users/me/predicted-score":{"get":{"tags":["predicted-score"],"summary":"Get Predicted Score","description":"Get current user's predicted SAT score.\n\nReturns the most recent predicted score with confidence level.\nIf no score exists, returns has_score=False.\n\n**Tier Requirements:**\n- All authenticated users can view their predicted score\n- Score is set after diagnostic test or mock test completion","operationId":"get_predicted_score_api_v1_users_me_predicted_score_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PredictedScoreResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/users/me/predicted-score/history":{"get":{"tags":["predicted-score"],"summary":"Get Score History","description":"Get predicted score history for trend analysis.\n\nReturns score history over the specified period with trend information.\nUsed for displaying progress charts on dashboard.\n\n**Parameters:**\n- days: Number of days of history (7-90, default 30)","operationId":"get_score_history_api_v1_users_me_predicted_score_history_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":90,"minimum":7,"description":"Number of days of history to retrieve","default":30,"title":"Days"},"description":"Number of days of history to retrieve"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScoreHistoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/users/me/predicted-score/set":{"post":{"tags":["predicted-score"],"summary":"Set Predicted Score","description":"Set/update user's predicted score.\n\nCalled after diagnostic test or mock test completion to record the score.\nCreates a history record and updates denormalized fields on User.\n\n**Validation:**\n- Total score must equal math_score + rw_score\n- Scores must be within SAT valid ranges\n\n**Note:** In Task 3.15, scores will be calculated automatically from practice data.\nThis endpoint is for explicit score setting from assessments.","operationId":"set_predicted_score_api_v1_users_me_predicted_score_set_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetPredictedScoreRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetScoreResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sat-home":{"get":{"tags":["sat-home"],"summary":"Get Dashboard","description":"Get aggregated dashboard data.\n\nReturns all data needed for the SAT Home dashboard in a single request.\nTier-aware: content and features adapt based on user's subscription tier.\n\nThis endpoint aggregates:\n- User info and tier configuration\n- Trial status and expiry info\n- Predicted score summary\n- User statistics (questions attempted, accuracy, etc.)\n- Study plan progress (if available)\n- Mock test history\n- Question of the Day\n\nDashboard state flags indicate what modals/CTAs to show:\n- needs_account_type: User hasn't selected student/parent\n- needs_diagnostic: Trial user hasn't taken diagnostic\n- show_trial_activation: Show trial CTA for registered users\n- show_trial_expiry_warning: Trial expires soon (< 3 days)","operationId":"get_dashboard_api_v1_sat_home_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__sat_home__DashboardResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sat-home/qotd":{"get":{"tags":["sat-home"],"summary":"Get Qotd","description":"Get today's Question of the Day.\n\nAvailable to all users including guests.\nReturns the same question for everyone each day (deterministic based on date).\nAlternates between Math (odd days) and R&W (even days) based on day of year.\n\nFor authenticated users:\n- Returns whether they've already answered today\n- Shows their answer and explanation if already answered\n- Includes current streak count\n\nFor guests:\n- Returns the question with no answer history or streak state.\n\n#327: previously this endpoint accessed `user.qotd_streak` unconditionally,\nwhich crashed with AttributeError for GuestUser (which has no such field)\nand the 500 was surfaced to the browser as a CORS error (because the\nerror response bypassed CORS middleware headers). Only authenticated\nUsers go through the streak expiry check now.","operationId":"get_qotd_api_v1_sat_home_qotd_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QotdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sat-home/qotd/answer":{"post":{"tags":["sat-home"],"summary":"Answer Qotd","description":"Submit answer for Question of the Day.\n\nRequires authentication (guests cannot track streaks).\nReturns whether the answer was correct and updates QOTD streak.\n\nStreak logic:\n- Correct answer on consecutive day: streak + 1\n- Correct answer after missed day(s): streak = 1\n- Incorrect answer: streak = 0","operationId":"answer_qotd_api_v1_sat_home_qotd_answer_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QotdAnswerRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QotdAnswerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sat-home/streak/share":{"post":{"tags":["sat-home"],"summary":"Share Streak","description":"Record a streak share event (#65).\n\nCalled when user shares their streak via WhatsApp, Twitter, copy link, or download.\nIncrements the user's total share count for analytics tracking.\n\nPlatforms:\n- whatsapp: Shared to WhatsApp\n- twitter: Shared to Twitter/X\n- copy: Copied share link\n- download: Downloaded shareable image","operationId":"share_streak_api_v1_sat_home_streak_share_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreakShareRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreakShareResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sat-home/stats":{"get":{"tags":["sat-home"],"summary":"Get User Stats","description":"Get detailed user statistics.\n\nReturns comprehensive statistics about user's practice and assessment history.\n\nD1 (#542 dashboard refresh): the per-question section-wise breakdown is\nstill deferred to a future phase, but the previously-zero engagement\naggregates (mock count, study time, weekly question deltas, lessons)\nnow reflect real activity.\n\nAlso fixes a pre-existing NameError: `effective_tier` was referenced\nhere without ever being resolved — every call to /sat-home/stats would\n500 before D1.","operationId":"get_user_stats_api_v1_sat_home_stats_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/qotd":{"get":{"tags":["qotd"],"summary":"Get Qotd","description":"Today's question for `exam`. Optional auth — a guest sees the question\nbut no streak or answered-state, matching the SAT route's behaviour.","operationId":"get_qotd_api_v1_qotd_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"exam","in":"query","required":true,"schema":{"type":"string","description":"sat | toefl | ielts | gre","title":"Exam"},"description":"sat | toefl | ielts | gre"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QotdResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/qotd/answer":{"post":{"tags":["qotd"],"summary":"Answer Qotd","description":"Submit today's answer for `exam`.\n\nAnswers are scoped per exam (#1297), so answering TOEFL's question does not\nmark SAT's as answered — before this, the two shared one daily slot.","operationId":"answer_qotd_api_v1_qotd_answer_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"exam","in":"query","required":true,"schema":{"type":"string","description":"sat | toefl | ielts | gre","title":"Exam"},"description":"sat | toefl | ielts | gre"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QotdAnswerRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QotdAnswerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/toefl/guest-catalog":{"get":{"tags":["toefl-public"],"summary":"Public TOEFL catalogue (names only, no auth)","description":"PUBLIC (no auth): the names of everything a paying TOEFL user gets.\n\nGuests must see the full paid catalogue locked, but every authenticated\nTOEFL surface 401s a guest token — so without this, clients ship a bundled\nsnapshot that goes stale whenever content changes.\n\nReturns names only: no ids, no content, no question counts. Reads no user\ndata, which is what makes it safe to expose pre-auth and safe to cache.","operationId":"get_toefl_guest_catalog_api_v1_toefl_guest_catalog_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToeflGuestCatalogResponse"}}}}}}},"/api/v1/sat-scholarship/status":{"post":{"tags":["sat-scholarship"],"summary":"Get Status","description":"Return the user's olympiad submission status.\n\nCalls Entrayn's external-olympiad-test-status and passes the response\nthrough unchanged on success. On any error, returns a benign shape\nthat lets the dashboard's date-driven state stay in charge.","operationId":"get_status_api_v1_sat_scholarship_status_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Status Api V1 Sat Scholarship Status Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/tasks/expire-trials":{"post":{"tags":["admin"],"summary":"Trigger Trial Expiry","description":"Manually trigger subscription/trial expiry processing.\n\nThis endpoint is called by:\n- Cloud Scheduler (production) - every hour\n- Manual trigger for testing\n- APScheduler (development) - automatically\n\nReturns processing statistics.","operationId":"trigger_trial_expiry_api_v1_admin_tasks_expire_trials_post","parameters":[{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/tasks/recalc-question-stats":{"post":{"tags":["admin"],"summary":"Recalc Question Stats","description":"Manually trigger question time statistics recalculation.\n\nIssue #160: Recalculates median and MAD for questions that have\naccumulated 100+ attempts since last calculation.\n\nThis endpoint is called by:\n- Cloud Scheduler (production) - every 6 hours\n- Manual trigger for testing\n- APScheduler (development) - automatically\n\nReturns processing statistics.","operationId":"recalc_question_stats_api_v1_admin_tasks_recalc_question_stats_post","parameters":[{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/tasks/status":{"get":{"tags":["admin"],"summary":"Get Tasks Status","description":"Get status of background tasks.\n\nReturns info about scheduler state and last run times.","operationId":"get_tasks_status_api_v1_admin_tasks_status_get","parameters":[{"name":"x-admin-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Admin-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/questions/topics":{"get":{"tags":["questions"],"summary":"Get Topics","description":"Get all topics with question counts.\n\nOptionally filter by subject_id (FK to skill_nodes: math=18, reading_writing=2) and usage context.","operationId":"get_topics_api_v1_questions_topics_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"subject_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter by subject (math=18, reading_writing=2)","title":"Subject Id"},"description":"Filter by subject (math=18, reading_writing=2)"},{"name":"usage_context","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by usage context (qotd, free_practice, etc.)","title":"Usage Context"},"description":"Filter by usage context (qotd, free_practice, etc.)"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TopicCount"},"title":"Response Get Topics Api V1 Questions Topics Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/questions/":{"get":{"tags":["questions"],"summary":"List Questions","description":"List questions with filters.\n\nReturns questions WITHOUT answers — suitable for practice selection UI.\nBulk answer/insight/analytics access lives on /api/internal/questions\n(author/admin only); the include_* flags this route used to accept were\nan unauthenticated answer-key export and have been removed.","operationId":"list_questions_api_v1_questions__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"subject_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter by subject (math=18, reading_writing=2)","title":"Subject Id"},"description":"Filter by subject (math=18, reading_writing=2)"},{"name":"topic","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topic"}},{"name":"subtopic","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtopic"}},{"name":"difficulty","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":5,"minimum":1},{"type":"null"}],"title":"Difficulty"}},{"name":"difficulty_label","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(easy|medium|hard)$"},{"type":"null"}],"title":"Difficulty Label"}},{"name":"question_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/QuestionType"},{"type":"null"}],"title":"Question Type"}},{"name":"usage_context","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Usage Context"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/QuestionResponse"},"title":"Response List Questions Api V1 Questions  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/questions/{question_id}":{"get":{"tags":["questions"],"summary":"Get Question","description":"Get a single question without answer.","operationId":"get_question_api_v1_questions__question_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"question_id","in":"path","required":true,"schema":{"type":"integer","title":"Question Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/questions/{question_id}/answer":{"get":{"tags":["questions"],"summary":"Get Question With Answer","description":"Get question with correct answer and explanation.\n\nUse this after the student has answered to show the solution.","operationId":"get_question_with_answer_api_v1_questions__question_id__answer_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"question_id","in":"path","required":true,"schema":{"type":"integer","title":"Question Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionWithAnswer"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/reference/{reference_type}":{"get":{"tags":["reference"],"summary":"Get Reference Values","operationId":"get_reference_values_api_v1_reference__reference_type__get","parameters":[{"name":"reference_type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/ReferenceType"}},{"name":"active_only","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Active Only"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReferenceListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessments/diagnostic":{"get":{"tags":["assessments"],"summary":"Get Diagnostic","description":"Get the diagnostic assessment with completion status.\n\nAvailable to all users including guests.\nFor authenticated users, includes whether they've already completed it.","operationId":"get_diagnostic_api_v1_assessments_diagnostic_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiagnosticStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessments/sample":{"get":{"tags":["assessments"],"summary":"Get Sample","description":"Get a sample assessment with completion status.\n\nSample tests are short (35 min) preview tests used in the lead magnet flow.\nRandomly selects from the pool of available sample tests.\nAvailable to all users including guests.","operationId":"get_sample_api_v1_assessments_sample_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiagnosticStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessments/mocks":{"get":{"tags":["assessments"],"summary":"List Mocks","description":"List available mock assessments with completion status.\n\nRequires authentication. Returns mocks with mock_number (1-indexed position).\nFix #53: Add mock_number to match display order with URL.\nFix #179: Use batch query instead of N+1 queries per mock.","operationId":"list_mocks_api_v1_assessments_mocks_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessments/mock-tests/guest":{"get":{"tags":["assessments"],"summary":"List Mocks For Guest","description":"List available mock assessments for guest users (lead magnet flow).\n\n#203: Mock Test Lead Magnet - allows guests to see available mock tests.\nReturns a limited list (1 mock test) for the lead magnet experience.","operationId":"list_mocks_for_guest_api_v1_assessments_mock_tests_guest_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessments/section-tests":{"get":{"tags":["assessments"],"summary":"List Section Tests","description":"List available section test assessments with completion status.\n\nIssue #101: Section tests are single-section focused practice (Math or R&W).\nFix #179: Use batch query instead of N+1 queries per section test.\n\n- Math Section Test: 22 questions, 35 minutes, graphing calculator allowed\n- R&W Section Test: 27 questions, 32 minutes\n\nRequires authentication. Returns section tests grouped by subject.","operationId":"list_section_tests_api_v1_assessments_section_tests_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"subject","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by subject (math or reading_writing)","title":"Subject"},"description":"Filter by subject (math or reading_writing)"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessments/section-tests/guest":{"get":{"tags":["assessments"],"summary":"List Section Tests For Guest","description":"List available section test assessments for guest users (lead magnet flow).\n\n#204: Math Section Test Lead Magnet - allows guests to see available section tests.\nReturns section tests filtered by subject for the lead magnet experience.\n\n- Math Section Test: 44 questions, 35 minutes, graphing calculator allowed\n- R&W Section Test: 54 questions, 64 minutes\n\nAvailable to all users including guests.","operationId":"list_section_tests_for_guest_api_v1_assessments_section_tests_guest_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"subject","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by subject (math or reading_writing)","title":"Subject"},"description":"Filter by subject (math or reading_writing)"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessments/by-lead-magnet/{lead_magnet}":{"get":{"tags":["assessments"],"summary":"Get Assessment By Lead Magnet","description":"Get assessment for a specific lead magnet type.\n\nLead magnet types:\n- sample-test: Returns sample/diagnostic assessment\n- mock-test: Returns first available mock test\n- math-practice: Returns first available math section test\n- reading-writing-practice: Returns first available R&W section test\n\nReturns assessment with completion status for the current user.\n\nRelated: Epic #202, Stories #203, #204, #205","operationId":"get_assessment_by_lead_magnet_api_v1_assessments_by_lead_magnet__lead_magnet__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"lead_magnet","in":"path","required":true,"schema":{"type":"string","title":"Lead Magnet"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiagnosticStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessments/by-type/{assessment_type}":{"get":{"tags":["assessments"],"summary":"List By Type","description":"List assessments by type with optional filters.\n\nTypes: diagnostic, mock, module, topic, subtopic","operationId":"list_by_type_api_v1_assessments_by_type__assessment_type__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"assessment_type","in":"path","required":true,"schema":{"type":"string","title":"Assessment Type"}},{"name":"module","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by module (math/reading_writing)","title":"Module"},"description":"Filter by module (math/reading_writing)"},{"name":"topic","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by topic","title":"Topic"},"description":"Filter by topic"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/app__schemas__assessment__AssessmentListResponse"},"title":"Response List By Type Api V1 Assessments By Type  Assessment Type  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessments/history":{"get":{"tags":["assessments"],"summary":"Get Assessment History","description":"Get user's assessment history.\n\nReturns completed assessments with scores and metadata. The optional\n`assessment_id` filter narrows the result to attempts on a single\nunderlying assessment — used by the v2.5 mock-review task viewer to\nresolve the latest completed attempt for deep-linking into the\nreview page.","operationId":"get_assessment_history_api_v1_assessments_history_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"assessment_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by type","title":"Assessment Type"},"description":"Filter by type"},{"name":"assessment_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter to a single assessment id (#355 v2.5)","title":"Assessment Id"},"description":"Filter to a single assessment id (#355 v2.5)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":10,"title":"Limit"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssessmentHistoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessments/{assessment_id}":{"get":{"tags":["assessments"],"summary":"Get Assessment","description":"Get assessment details by ID.","operationId":"get_assessment_api_v1_assessments__assessment_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"assessment_id","in":"path","required":true,"schema":{"type":"integer","title":"Assessment Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssessmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessments/{assessment_id}/start/guest":{"post":{"tags":["assessments"],"summary":"Start Assessment Guest","description":"Get assessment data for guests (lead magnet flow).\n\n#203: Mock Test Lead Magnet - Returns assessment data so guests can take\nthe test locally. Answers are tracked in browser localStorage and synced\nto backend when user signs up.\n\n#204: Section Test Lead Magnet - Also supports section tests for guests.\n\nNote: This does NOT create a database attempt record for guests.\nThe frontend handles guest test-taking with local storage.\n\nRestrictions:\n- Only mock and section_test assessments are allowed for guests","operationId":"start_assessment_guest_api_v1_assessments__assessment_id__start_guest_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"assessment_id","in":"path","required":true,"schema":{"type":"integer","title":"Assessment Id"}},{"name":"timed","in":"query","required":false,"schema":{"type":"boolean","description":"Whether to run in timed mode","default":true,"title":"Timed"},"description":"Whether to run in timed mode"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessments/{assessment_id}/start":{"post":{"tags":["assessments"],"summary":"Start Assessment","description":"Start an assessment attempt.\n\nCreates a new attempt and returns the questions.\nQuestions are returned without correct answers.\n\nEntitlement gating is handled by can_start_assessment() in the service layer\nusing check_entitlement() because the assessment type is only known after\nfetching the assessment by ID.","operationId":"start_assessment_api_v1_assessments__assessment_id__start_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"assessment_id","in":"path","required":true,"schema":{"type":"integer","title":"Assessment Id"}},{"name":"timed","in":"query","required":false,"schema":{"type":"boolean","description":"Whether to run in timed mode","default":true,"title":"Timed"},"description":"Whether to run in timed mode"},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Source context (e.g. 'lead_magnet')","title":"Source"},"description":"Source context (e.g. 'lead_magnet')"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__assessment__StartAssessmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessments/attempts/{attempt_id}/state":{"get":{"tags":["assessments"],"summary":"Get Attempt State","description":"Get current state of an in-progress attempt.\n\nUsed for resuming an interrupted assessment.","operationId":"get_attempt_state_api_v1_assessments_attempts__attempt_id__state_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Attempt Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AttemptStateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessments/attempts/{attempt_id}/section-start":{"post":{"tags":["assessments"],"summary":"Start Section","description":"Record when a user starts a section/module.\n\nUsed for calculating remaining time when resuming an assessment.","operationId":"start_section_api_v1_assessments_attempts__attempt_id__section_start_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Attempt Id"}},{"name":"section","in":"query","required":true,"schema":{"type":"string","description":"Section/module being started (e.g., MATH, READING_WRITING)","title":"Section"},"description":"Section/module being started (e.g., MATH, READING_WRITING)"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessments/attempts/{attempt_id}/grading-status":{"get":{"tags":["assessments"],"summary":"Get Grading Status","description":"Polled by the frontend grading-status UI (#542 Epic 4f).\n\nReturns per-response grading state so the frontend can render\npartial results as they arrive. Frontend polls every 5s while\nnot complete, backs off to 15s after 30s elapsed, stops at\nCOMPLETE/FAILED.\n\nAccess: the requesting user must own the attempt. Returns 404\n(not 403) if they don't, to avoid revealing attempt existence.","operationId":"get_grading_status_api_v1_assessments_attempts__attempt_id__grading_status_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Attempt Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GradingStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessments/attempts/{attempt_id}/heartbeat":{"post":{"tags":["assessments"],"summary":"Save Heartbeat","description":"Save timer state periodically (heartbeat) without requiring answer submission.\n\nThis handles edge cases where students leave without answering:\n- Student answers Q5 at time t, timer = 10 min\n- Student stays on Q6 for 5 min without answering\n- Heartbeat saves timer = 5 min every 10 seconds\n- Student closes tab → timer resumes at correct time\n\nCalled by frontend every 10 seconds and on beforeunload.","operationId":"save_heartbeat_api_v1_assessments_attempts__attempt_id__heartbeat_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Attempt Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HeartbeatRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessments/attempts/{attempt_id}/integrity-events":{"post":{"tags":["assessments"],"summary":"Post Integrity Events","description":"Store a batch of on-device proctoring + browser integrity events (#1057e).\n\nEvents-only (Level 3). The client batches ~every 10s; the service caps the\nbatch defensively. Auth = the attempt's owner.","operationId":"post_integrity_events_api_v1_assessments_attempts__attempt_id__integrity_events_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Attempt Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrityEventsBatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessments/attempts/{attempt_id}/proctoring-consent":{"post":{"tags":["assessments"],"summary":"Post Proctoring Consent","description":"Record proctoring consent for an attempt (#1057h — DPDP audit trail).","operationId":"post_proctoring_consent_api_v1_assessments_attempts__attempt_id__proctoring_consent_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Attempt Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessments/attempts/{attempt_id}/answer":{"post":{"tags":["assessments"],"summary":"Submit Answer","description":"Submit an answer for a single question.\n\nCan be called multiple times for the same question (answer changes are tracked).","operationId":"submit_answer_api_v1_assessments_attempts__attempt_id__answer_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Attempt Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__assessment__AnswerSubmit"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessments/attempts/{attempt_id}/answers":{"post":{"tags":["assessments"],"summary":"Submit Answers Bulk","description":"Submit multiple answers at once.\n\nOptimized for bulk operations: batch-loads all questions upfront\nand uses a single DB commit instead of per-answer commits.","operationId":"submit_answers_bulk_api_v1_assessments_attempts__attempt_id__answers_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Attempt Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnswerBulkSubmit"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessments/attempts/{attempt_id}/submit":{"post":{"tags":["assessments"],"summary":"Submit Assessment","description":"Submit the assessment for scoring.\n\nCalculates scores, generates insights, and returns summary.","operationId":"submit_assessment_api_v1_assessments_attempts__attempt_id__submit_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Attempt Id"}},{"name":"study_plan_progress_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"If this assessment was launched from a study plan task, the UserStudyPlanProgress.id to auto-complete (#349).","title":"Study Plan Progress Id"},"description":"If this assessment was launched from a study plan task, the UserStudyPlanProgress.id to auto-complete (#349)."},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__assessment__SubmitAssessmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessments/attempts/{attempt_id}/abandon":{"post":{"tags":["assessments"],"summary":"Abandon Assessment","description":"Abandon an in-progress assessment.\n\nMarks the attempt as abandoned without scoring.","operationId":"abandon_assessment_api_v1_assessments_attempts__attempt_id__abandon_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Attempt Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessments/attempts/{attempt_id}/results":{"get":{"tags":["assessments"],"summary":"Get Results","description":"Get assessment results.\n\nDetail level depends on user's tier:\n- Basic: score, section scores, time\n- Trial/Free: + topic breakdown\n- Guided+: + full answers, insights, recommendations","operationId":"get_results_api_v1_assessments_attempts__attempt_id__results_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Attempt Id"}},{"name":"surface","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"#1443: the results page asking, e.g. lead_magnet","title":"Surface"},"description":"#1443: the results page asking, e.g. lead_magnet"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessments/attempts/{attempt_id}/preview":{"get":{"tags":["assessments"],"summary":"Get Results Preview","description":"Get basic results preview for an attempt (guest-friendly).\n\n#203: Mock Test Lead Magnet - Returns limited score information for guests.\nShows score range only, not exact scores or detailed breakdowns.\nFull results require authentication.\n\nReturns:\n- Score range (not exact score)\n- Section score ranges\n- Basic completion info\n- No detailed topic breakdown or answers","operationId":"get_results_preview_api_v1_assessments_attempts__attempt_id__preview_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Attempt Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessments/attempts/{attempt_id}/feedback":{"post":{"tags":["assessments"],"summary":"Submit Assessment Feedback","description":"Submit feedback after completing an assessment.\n\nAccepts two shapes:\n  - {\"feedback_text\": \"...\"}       — real feedback (must be non-empty)\n  - {\"dismissed\": true}            — user clicked Skip/X on the modal (#550)\n\nEither shape consumes the attempt_id slot via the unique constraint,\nso subsequent GETs return has_feedback=true and the FeedbackModal\ndoes not re-trigger.","operationId":"submit_assessment_feedback_api_v1_assessments_attempts__attempt_id__feedback_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Attempt Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["assessments"],"summary":"Get Assessment Feedback","description":"Check if feedback has been submitted for an attempt.","operationId":"get_assessment_feedback_api_v1_assessments_attempts__attempt_id__feedback_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Attempt Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessments/attempts/{attempt_id}/review/start":{"post":{"tags":["assessments"],"summary":"Start Attempt Review","description":"#584: idempotent review-session marker for Practice Plus users.\n\nPlan users use start_task(progress_id) to flip MOCK_REVIEW progress\nto IN_PROGRESS. Practice users have no progress row, so this endpoint\nis a thin no-op that just confirms the entitlement + ownership and\nreports back whether reflections already exist (to differentiate\n\"fresh start\" from \"resume\").","operationId":"start_attempt_review_api_v1_assessments_attempts__attempt_id__review_start_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Attempt Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessments/attempts/{attempt_id}/reflections":{"get":{"tags":["assessments"],"summary":"List Attempt Reflections","description":"#584: hydrate the review page on resume.","operationId":"list_attempt_reflections_api_v1_assessments_attempts__attempt_id__reflections_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Attempt Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReflectionListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessments/attempts/{attempt_id}/reflections/{question_id}":{"post":{"tags":["assessments"],"summary":"Write Attempt Reflection","description":"#584: per-question reflection upsert (attempt-mode). Mirrors\nwrite_reflection_endpoint at /study-plan/progress/.../reflections/{qid}\nbut keyed on attempt_id.","operationId":"write_attempt_reflection_api_v1_assessments_attempts__attempt_id__reflections__question_id__post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Attempt Id"}},{"name":"question_id","in":"path","required":true,"schema":{"type":"integer","title":"Question Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReflectionWriteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReflectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessments/attempts/{attempt_id}/review/section-summary":{"post":{"tags":["assessments"],"summary":"Write Attempt Section Summary","description":"#584: section-level summary (one per (attempt, module=rw|math)).","operationId":"write_attempt_section_summary_api_v1_assessments_attempts__attempt_id__review_section_summary_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Attempt Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SectionSummaryWriteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReflectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessments/attempts/{attempt_id}/review/complete":{"post":{"tags":["assessments"],"summary":"Complete Attempt Review","description":"#584: trigger the LLM analysis for a Practice Plus mock review.\n\nSpawns a BackgroundTask running analyze(attempt=...). Same as the\nplan-mode flow: returns immediately, the FE waits on the reveal\nendpoint to detect the populated FocusDirective. Writing a\nplaceholder synchronously isn't necessary in attempt-mode (no\nidempotency key collision risk — there can only ever be one\nattempt-mode directive per attempt).","operationId":"complete_attempt_review_api_v1_assessments_attempts__attempt_id__review_complete_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Attempt Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/practice/topics":{"get":{"tags":["practice"],"summary":"List Topics","description":"List all topics with question counts.\n\nPublic endpoint - no authentication required.","operationId":"list_topics_api_v1_practice_topics_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TopicResponse"},"type":"array","title":"Response List Topics Api V1 Practice Topics Get"}}}}}}},"/api/v1/practice/stats":{"get":{"tags":["practice"],"summary":"Get Stats","description":"Get user's practice stats by topic.\n\nReturns accuracy and attempt count per topic.\nFor guest users, returns empty stats (no tracking).","operationId":"get_stats_api_v1_practice_stats_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TopicStatsResponse"},"title":"Response Get Stats Api V1 Practice Stats Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/practice/next":{"get":{"tags":["practice"],"summary":"Get Next Question","description":"Get next practice question based on filters.\n\nAvailable to all users including guests.\nAvoids recently attempted questions (last 20) for authenticated users.\nReturns 404 if no questions match the criteria.\nReturns 403 if practice limit reached.\n\nEntitlement gating is done in the service layer (not as a dependency)\nbecause this endpoint uses get_optional_user which allows guests.\nGuests are always allowed — their limits are enforced client-side.","operationId":"get_next_question_api_v1_practice_next_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"module","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(math|reading_writing)$"},{"type":"null"}],"description":"Filter by subject: math or reading_writing","title":"Module"},"description":"Filter by subject: math or reading_writing"},{"name":"topic","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by topic name","title":"Topic"},"description":"Filter by topic name"},{"name":"difficulty","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(easy|medium|hard)$"},{"type":"null"}],"description":"Filter by difficulty: easy, medium, hard","title":"Difficulty"},"description":"Filter by difficulty: easy, medium, hard"},{"name":"skill_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"description":"#845 B3 — per-skill drill from the Insights 'Practice this skill' CTA. Filters questions to a single leaf-level skill_node.","title":"Skill Id"},"description":"#845 B3 — per-skill drill from the Insights 'Practice this skill' CTA. Filters questions to a single leaf-level skill_node."},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PracticeQuestionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/practice/recommended":{"get":{"tags":["practice"],"summary":"Get Recommended","description":"Get AI-recommended question based on weak areas.\n\nAnalyzes user's practice history to find topics with lowest accuracy\nand returns a question from those areas for targeted improvement.\n\nIf module (subject) is specified, only recommends questions from that subject.","operationId":"get_recommended_api_v1_practice_recommended_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"module","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(math|reading_writing)$"},{"type":"null"}],"description":"Filter by subject: math or reading_writing","title":"Module"},"description":"Filter by subject: math or reading_writing"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PracticeQuestionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/practice/submit":{"post":{"tags":["practice"],"summary":"Submit Answer","description":"Submit practice answer.\n\nReturns immediate feedback including correctness, correct answer,\nand explanation. For authenticated users, also records the attempt.\nFor guests (anonymous or GuestUser), returns feedback without storing the attempt.\n\nEntitlement gating is done in the service layer (not as a dependency)\nbecause this endpoint uses get_optional_user which allows guests.\nUsage is incremented on submit for authenticated users.","operationId":"submit_answer_api_v1_practice_submit_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__practice__AnswerSubmit"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubmitResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/practice/history":{"get":{"tags":["practice"],"summary":"Get History","description":"Get practice history.\n\nReturns recent practice attempts with question details,\nordered by most recent first.","operationId":"get_history_api_v1_practice_history_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"description":"Maximum items to return","default":20,"title":"Limit"},"description":"Maximum items to return"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/HistoryItem"},"title":"Response Get History Api V1 Practice History Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/practice/count":{"get":{"tags":["practice"],"summary":"Get Count","description":"Get practice count and limit info.\n\nReturns current practice count, tier limit (if any),\nand whether the user has unlimited practice.\nFor guests, returns 0 count with guest limits.\n\nNote: Guest users (#199) have no stored count since attempts aren't persisted.\nTheir limit is enforced client-side via the session.","operationId":"get_count_api_v1_practice_count_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PracticeCountResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/partner/post-test":{"post":{"tags":["partner"],"summary":"Submit Partner Post Test","description":"Store the current partner lead's post-test answers for one attempt (idempotent).","operationId":"submit_partner_post_test_api_v1_partner_post_test_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerPostTestSubmitRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerPostTestStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["partner"],"summary":"Get Partner Post Test","description":"Whether the current user's post-test for this attempt is on file (reveal gate).","operationId":"get_partner_post_test_api_v1_partner_post_test_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"attempt_source","in":"query","required":true,"schema":{"type":"string","pattern":"^(engine|legacy)$","title":"Attempt Source"}},{"name":"attempt_id","in":"query","required":true,"schema":{"type":"integer","title":"Attempt Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerPostTestStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/drills/start":{"post":{"tags":["drills"],"summary":"Start Drill","description":"Start a new 10-question drill.\n\nSelects 10 random questions from the FREE_PRACTICE pool.\nOptional filters can narrow the question selection.\n\nLimits apply per subject based on user tier:\n- Guest/Free: 1 drill per subject\n- Paid tiers: Unlimited","operationId":"start_drill_api_v1_drills_start_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartDrillRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartDrillResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/drills/{attempt_id}/answer":{"post":{"tags":["drills"],"summary":"Submit Answer","description":"Submit an answer for a drill question.\n\nReturns immediate feedback including correctness and explanation.","operationId":"submit_answer_api_v1_drills__attempt_id__answer_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Attempt Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DrillAnswerSubmit"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DrillAnswerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/drills/{attempt_id}/submit":{"post":{"tags":["drills"],"summary":"Submit Drill","description":"Submit the drill for final scoring.\n\nCalculates score, accuracy breakdown by section/topic, and generates insights.","operationId":"submit_drill_api_v1_drills__attempt_id__submit_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Attempt Id"}},{"name":"study_plan_progress_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"If this drill was launched from a study plan task, the UserStudyPlanProgress.id to auto-complete (#349).","title":"Study Plan Progress Id"},"description":"If this drill was launched from a study plan task, the UserStudyPlanProgress.id to auto-complete (#349)."},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DrillResultsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/drills/{attempt_id}/results":{"get":{"tags":["drills"],"summary":"Get Results","description":"Get results for a completed drill.\n\nReturns score, accuracy breakdown, and insights.","operationId":"get_results_api_v1_drills__attempt_id__results_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Attempt Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DrillResultsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/drills/history":{"get":{"tags":["drills"],"summary":"Get History","description":"Get paginated drill history.\n\nReturns completed drills ordered by most recent first.","operationId":"get_history_api_v1_drills_history_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number","default":1,"title":"Page"},"description":"Page number"},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Items per page","default":10,"title":"Page Size"},"description":"Items per page"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DrillHistoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/drills/quota":{"get":{"tags":["drills"],"summary":"Get Quota","description":"Get current drill quota information.\n\nReturns per-subject usage breakdown (display only) and the total quota\n(the actual enforcement axis post-#635). The per-subject limit/remaining\nfields mirror the total values for backward-compat with older clients\nthat read `quota.math.remaining` — new clients should read `quota.total`.","operationId":"get_quota_api_v1_drills_quota_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DrillQuotaResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/drills/stats":{"get":{"tags":["drills"],"summary":"Get Stats","description":"Get drill statistics broken down by subject.\n\nReturns total drills completed and average accuracy for each subject.","operationId":"get_stats_api_v1_drills_stats_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DrillStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/study-plan/current":{"get":{"tags":["study-plan"],"summary":"Get Current Plan","description":"Get user's active study plan with segment + summary metadata.","operationId":"get_current_plan_api_v1_study_plan_current_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudyPlanWithSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/study-plan/generate":{"post":{"tags":["study-plan"],"summary":"Generate New Plan","description":"Create a new study plan with segment 1 generated from current mastery.","operationId":"generate_new_plan_api_v1_study_plan_generate_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudyPlanCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudyPlanResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/study-plan/replan":{"post":{"tags":["study-plan"],"summary":"Replan Plan","description":"Regenerate the current segment with new plan settings.\n\nAny of pace, target_date, or study_days_of_week can be updated.\nCompleted tasks in the current segment are preserved; pending ones\nare regenerated.","operationId":"replan_plan_api_v1_study_plan_replan_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudyPlanReplanRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudyPlanResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/study-plan/tasks/today":{"get":{"tags":["study-plan"],"summary":"Get Today Tasks","description":"Return tasks from the active segment with calendar_date ≤ today.\n\nIncludes any overdue tasks (backlog). The frontend shows everything\ndue today or earlier as 'today's queue' and surfaces a replan nudge\nwhen backlog_count exceeds the threshold.","operationId":"get_today_tasks_api_v1_study_plan_tasks_today_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BacklogTasksResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/study-plan/segments/current":{"get":{"tags":["study-plan"],"summary":"Get Current Segment Endpoint","description":"Return the active segment for the current plan.","operationId":"get_current_segment_endpoint_api_v1_study_plan_segments_current_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SegmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/study-plan/tasks/segment":{"get":{"tags":["study-plan"],"summary":"Get Segment Tasks","description":"Return every task in a segment (pending, in_progress, completed,\nskipped). The frontend uses this to render the calendar day grid.\n\nBy default returns tasks for the *active* segment. Pass\n`segment_number` to fetch any other segment in the user's plan —\nused by the SegmentDetailPage when revisiting a completed segment\nafter the trial / guided plan has finished.","operationId":"get_segment_tasks_api_v1_study_plan_tasks_segment_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"segment_number","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"When provided, return tasks for this segment number (1-indexed within the user's plan). When omitted, defaults to the active segment. Used to surface tasks for completed segments so students can revisit them.","title":"Segment Number"},"description":"When provided, return tasks for this segment number (1-indexed within the user's plan). When omitted, defaults to the active segment. Used to surface tasks for completed segments so students can revisit them."},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TaskProgressResponse"},"title":"Response Get Segment Tasks Api V1 Study Plan Tasks Segment Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/study-plan/tasks/{progress_id}/start":{"post":{"tags":["study-plan"],"summary":"Start Task Endpoint","description":"Start a task (mark as in_progress).","operationId":"start_task_endpoint_api_v1_study_plan_tasks__progress_id__start_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"progress_id","in":"path","required":true,"schema":{"type":"integer","title":"Progress Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskStartResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/study-plan/tasks/{progress_id}/complete":{"post":{"tags":["study-plan"],"summary":"Complete Task Endpoint","description":"Complete a task. If this is a checkpoint and the segment's\ncheckpoints are all done, the plan advances to the next segment\n(or finishes if this was the final segment).\n\nFor MOCK_REVIEW completions the LLM-driven post-mock analysis runs\nvia `background_tasks` (#460b) so the response doesn't block on the\nLLM call (was up to 180s worst-case).","operationId":"complete_task_endpoint_api_v1_study_plan_tasks__progress_id__complete_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"progress_id","in":"path","required":true,"schema":{"type":"integer","title":"Progress Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Body_complete_task_endpoint_api_v1_study_plan_tasks__progress_id__complete_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__study_plan__TaskCompleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/study-plan/segments":{"get":{"tags":["study-plan"],"summary":"Get Plan Segments Endpoint","description":"Return every segment in the active plan — past, current, future.\n\nPowers the SegmentTimeline component (#344L) on SAT Home.\nIncludes mastery diff for completed segments, placeholder items\nfor segments that haven't been generated yet (future segments are\nlazy-materialized; the timeline still wants to show them).\n\n404 if the user has no active plan.","operationId":"get_plan_segments_endpoint_api_v1_study_plan_segments_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SegmentTimelineResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/study-plan/reveal/{attempt_id}":{"get":{"tags":["study-plan"],"summary":"Get Checkpoint Reveal","description":"Return the post-mock reveal for a completed mock attempt.\n\nTwo modes (decided by the user's entitlements, not the URL):\n  - **Plan mode** (`study_plan` entitlement): full v2.5 payload\n    with mastery_delta + next_segment + plan-revelation fields.\n    `is_checkpoint=true` when this attempt was a segment checkpoint.\n  - **Attempt mode** (#584, `deep_insights_per_mock` entitlement,\n    no `study_plan`): returns a Practice-Plus-shaped payload with\n    `is_checkpoint=false`, plan-only fields null, but\n    `focus_directive` + `insights` + `mock_review_status` populated\n    so the FE Skills & Insights tab can render.\n\nUsers with neither entitlement get a thin payload with\n`is_checkpoint=false` and everything else null — the FE falls back\nto the legacy v1 heuristic insights.","operationId":"get_checkpoint_reveal_api_v1_study_plan_reveal__attempt_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Attempt Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckpointRevealResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/study-plan/reveal/{attempt_id}/retry-insights":{"post":{"tags":["study-plan"],"summary":"Retry Post Mock Insights","description":"Re-run the post-mock LLM analysis (#559).\n\nThe FE calls this when the Skills tab is in the all-providers-failed\nerror state and the student clicks \"Try again\". We delete the\nfailed FocusDirective row (so the lazy-backfill path on the next\nreveal call writes a fresh one) and tell the FE to refetch the\nreveal.\n\nThe 1-minute cooldown is enforced on the FE so the student can't\nspam this endpoint; backend stays a thin write so a determined\nuser can't flood the LLM provider via curl, but with the cooldown\n+ auth it's a low-risk surface.\n\nEntitlement gate (codex review on PR #609): any user who can REACH\nthe reveal (plan-mode OR attempt-mode via `deep_insights_per_mock`)\nmust be able to retry on a failed analysis. Previously this was\ngated on `study_plan`, which 403'd practice/free users on\nattempt-mode reveal — stranding them in the failed-insights state\nafter any transient LLM outage. Replaced with the same entitlement\ncheck the reveal endpoint uses: plan_entitled OR insights_entitled.\nRetry does NOT increment any usage counter — the user already paid\nfor the insight when they reached reveal; this is a quality recovery.","operationId":"retry_post_mock_insights_api_v1_study_plan_reveal__attempt_id__retry_insights_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Attempt Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/study-plan/tasks/{progress_id}/skip":{"post":{"tags":["study-plan"],"summary":"Skip Task Endpoint","description":"Skip a task.","operationId":"skip_task_endpoint_api_v1_study_plan_tasks__progress_id__skip_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"progress_id","in":"path","required":true,"schema":{"type":"integer","title":"Progress Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskSkipResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/study-plan/progress/{progress_id}/reflections/{question_id}":{"post":{"tags":["study-plan"],"summary":"Write Reflection Endpoint","description":"Write or overwrite the per-question reflection on a MOCK_REVIEW task.\n\nIdempotent on `(progress_id, question_id)` — resubmits update in\nplace. Validates ownership, that the progress belongs to a\nMOCK_REVIEW task, and that the question is part of the underlying\nmock attempt. Section-level summary writes use a separate path\n(planned for slice 355b's adaptive-depth UI).","operationId":"write_reflection_endpoint_api_v1_study_plan_progress__progress_id__reflections__question_id__post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"progress_id","in":"path","required":true,"schema":{"type":"integer","title":"Progress Id"}},{"name":"question_id","in":"path","required":true,"schema":{"type":"integer","title":"Question Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReflectionWriteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReflectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/study-plan/progress/{progress_id}/reflections":{"get":{"tags":["study-plan"],"summary":"List Reflections Endpoint","description":"List all reflections attached to a MOCK_REVIEW progress row.\n\nUsed by the frontend to hydrate the review page on resume.","operationId":"list_reflections_endpoint_api_v1_study_plan_progress__progress_id__reflections_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"progress_id","in":"path","required":true,"schema":{"type":"integer","title":"Progress Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReflectionListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/lessons":{"get":{"tags":["lessons"],"summary":"List Lessons","description":"List lessons accessible to current user.\n\nTier-based access:\n- Guest: Sample lessons only (#533h — was unreachable because the\n  endpoint used get_current_user which rejects guest tokens; swapped\n  to get_optional_user. The service layer already does the\n  sample-only filter via the effective tier == UserTier.guest on\n  GuestUser.)\n- Registered: 3 per topic\n- Trial/Guided: Unlimited\n- Free: 5 per topic","operationId":"list_lessons_api_v1_lessons_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"module","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^[a-z_]+$"},{"type":"null"}],"description":"Filter by module (SAT: math/reading_writing; IELTS: skill area)","title":"Module"},"description":"Filter by module (SAT: math/reading_writing; IELTS: skill area)"},{"name":"topic","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by topic name","title":"Topic"},"description":"Filter by topic name"},{"name":"skill_node_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter by L3 skill node ID (preferred over topic)","title":"Skill Node Id"},"description":"Filter by L3 skill node ID (preferred over topic)"},{"name":"exam","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z]+$","description":"Exam slug: sat, ielts, toefl, …","default":"sat","title":"Exam"},"description":"Exam slug: sat, ielts, toefl, …"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/lessons/stats":{"get":{"tags":["lessons"],"summary":"Get Lesson Stats","description":"Get overall lesson statistics for the current user.\n\nReturns total started, completed, and topics with progress.","operationId":"get_lesson_stats_api_v1_lessons_stats_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserLessonStats"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/lessons/topics/{topic}/progress":{"get":{"tags":["lessons"],"summary":"Get Topic Progress","description":"Get completion progress for a specific topic.\n\nReturns completed count, total count, and percentage.","operationId":"get_topic_progress_api_v1_lessons_topics__topic__progress_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"topic","in":"path","required":true,"schema":{"type":"string","title":"Topic"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopicProgress"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/lessons/{lesson_id}":{"get":{"tags":["lessons"],"summary":"Get Lesson","description":"Get lesson content with user's progress.\n\nReturns full lesson content (video URL, text body, or slides data)\nalong with the user's progress if any.\n\nReturns 404 if lesson not found.\nReturns 403 if user's tier doesn't allow access.\n\n#533h: switched from get_current_user to get_optional_user so the\nsample-tier (per LESSON_LIMITS[UserTier.guest] = per_topic: 1) is\nreachable for guests via the detail page after clicking through\nfrom the listing. The `require_entitlement(\"lessons\")` gate was\nalso removed — `can_access_lesson` is the authoritative tier check\nvia LESSON_LIMITS (the entitlement gate only added a usage counter\nthat doesn't apply to the sample-only path). Authenticated users\nstill go through the same can_access check below.","operationId":"get_lesson_api_v1_lessons__lesson_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"lesson_id","in":"path","required":true,"schema":{"type":"integer","title":"Lesson Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/lessons/{lesson_id}/start":{"post":{"tags":["lessons"],"summary":"Start Lesson","description":"Mark lesson as started.\n\nCreates a progress record with started_at timestamp.\nIdempotent - calling multiple times won't reset the start time.\n\n#533h: guest callers are tolerated — access check still applies via\ncan_access_lesson (sample-tier limits) but DB progress write is\nskipped (GuestUser.id=0 has no real user row). The response returns\na sentinel id=0 progress so the frontend's `lessonsApi.startLesson`\ncall doesn't 401 and break the lesson view.","operationId":"start_lesson_api_v1_lessons__lesson_id__start_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"lesson_id","in":"path","required":true,"schema":{"type":"integer","title":"Lesson Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonStartResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/lessons/{lesson_id}/progress":{"put":{"tags":["lessons"],"summary":"Update Progress","description":"Update progress (position or slide completion).\n\nFor video: position is seconds watched.\nFor interactive: position is current slide index, slide_completed marks a slide done.\n\n#533h: tolerates guest callers. For GuestUser the DB write is\nskipped and a sentinel progress is returned (frontend reflects\ncompletion via localStorage, mirroring VideoLessonsCard #533g).","operationId":"update_progress_api_v1_lessons__lesson_id__progress_put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"lesson_id","in":"path","required":true,"schema":{"type":"integer","title":"Lesson Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProgressUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonProgressOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/lessons/{lesson_id}/complete":{"post":{"tags":["lessons"],"summary":"Complete Lesson","description":"Mark lesson as completed.\n\nSets the completed_at timestamp. Automatically starts the lesson\nif not already started.\n\n#533h: guest callers tolerated — DB write skipped (GuestUser.id=0\nhas no real user row). Frontend mirrors guest completion in\nlocalStorage per `guest-${sessionId}`, same pattern as\nVideoLessonsCard.","operationId":"complete_lesson_api_v1_lessons__lesson_id__complete_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"lesson_id","in":"path","required":true,"schema":{"type":"integer","title":"Lesson Id"}},{"name":"study_plan_progress_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"If this lesson was launched from a study plan task, the UserStudyPlanProgress.id to auto-complete (#349).","title":"Study Plan Progress Id"},"description":"If this lesson was launched from a study plan task, the UserStudyPlanProgress.id to auto-complete (#349)."},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonCompleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/lead-magnet/register":{"post":{"tags":["lead-magnet"],"summary":"Register Engine Lead","description":"Register a lead for an exam's free diagnostic + send a login OTP.\n\nGet-or-creates a password-less Free user (idempotent) and emails a code.\nThe client then verifies via ``/auth/verify-otp`` to obtain tokens.\n\nUnlike ``/auth/send-otp``, there is no anti-enumeration branch here: this is\nan explicit register CTA, and the response + behavior are identical whether\nor not the email already existed (a returning lead just gets a login code).\nRate-limited via ``OTP_LIMIT`` to prevent code-spam.","operationId":"register_engine_lead_api_v1_lead_magnet_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EngineLeadRegisterRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EngineLeadRegisterResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/insights/attempts/{attempt_id}/mock-report":{"get":{"tags":["insights"],"summary":"Get Mock Report","description":"Deterministic 5-section Mock Test Performance Report for the student's\nown completed mock/diagnostic attempt (#856e). No tier gating — it is the\nstudent's own assessment data, surfaced as a standalone report page.","operationId":"get_mock_report_api_v1_insights_attempts__attempt_id__mock_report_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Attempt Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MockReportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/insights/weekly-report":{"get":{"tags":["insights"],"summary":"Get Weekly Report","description":"Per-student Weekly Progress Report for the student's own active cohort\n(#856f). Auto-resolves the active membership; `week_start` defaults to the\nMonday of the current week in the cohort's timezone.","operationId":"get_weekly_report_api_v1_insights_weekly_report_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"week_start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Week Start"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeeklyReportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/insights/attempts/{attempt_id}":{"get":{"tags":["insights"],"summary":"Get Insights Summary","description":"Get basic insights summary (available to all tiers).\n\nReturns total score, section scores, and percentile estimate.\nFor detailed insights, use the /detail endpoint (Guided+ only).","operationId":"get_insights_summary_api_v1_insights_attempts__attempt_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Attempt Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsightsSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/insights/attempts/{attempt_id}/detail":{"get":{"tags":["insights"],"summary":"Get Insights Detail","description":"Get full deep insights.\n\nAccess rules (Feb 23 spec - Issue #237):\n- Diagnostic tests: Available to all users\n- Mock tests: Limited by tier (free=1, practice/guided=5)\n- Feedback session purchase: Bypasses limit\n\nReturns 403 with upgrade info when limit reached.\nRecords usage when first viewing a mock's insights.","operationId":"get_insights_detail_api_v1_insights_attempts__attempt_id__detail_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Attempt Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsightsDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/insights/attempts/{attempt_id}/questions":{"get":{"tags":["insights"],"summary":"Get Question Level Insights","description":"Get question-level deep dive data.\n\nAccess rules (Feb 23 spec - Issue #237):\n- Diagnostic tests: Available to all users\n- Mock tests: Limited by tier (free=1, practice/guided=5)","operationId":"get_question_level_insights_api_v1_insights_attempts__attempt_id__questions_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Attempt Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/insights/attempts/{attempt_id}/generate":{"post":{"tags":["insights"],"summary":"Trigger Insights Generation","description":"Manually trigger insights generation for an attempt.\n\nUsually insights are generated automatically after assessment completion.\nThis endpoint allows manual regeneration or triggering if automatic\ngeneration failed.\n\nReturns:\n- status: \"exists\" if insights already exist\n- status: \"generating\" if background generation started\n- status: \"completed\" if generation finished (synchronous)","operationId":"trigger_insights_generation_api_v1_insights_attempts__attempt_id__generate_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Attempt Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsightsGenerateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/insights/attempts/{attempt_id}/regenerate":{"post":{"tags":["insights"],"summary":"Regenerate Insights","description":"Regenerate insights for an attempt (replaces existing).\n\nUseful when insight rules or algorithms are updated.\nAccess rules (Feb 23 spec - Issue #237):\n- Diagnostic tests: Available to all users\n- Mock tests: Limited by tier (free=1, practice/guided=5)","operationId":"regenerate_insights_api_v1_insights_attempts__attempt_id__regenerate_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Attempt Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InsightsGenerateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/insights/access-check":{"get":{"tags":["insights"],"summary":"Check Insights Access","description":"Check what level of insights access the current user has.\n\nUseful for frontend to determine what UI to show.\n\nNote: Access varies by assessment type (Feb 23 spec - Issue #237):\n- Diagnostic tests: Full insights for ALL users\n- Mock tests: Limited by tier (free=1, practice/guided=5)","operationId":"check_insights_access_api_v1_insights_access_check_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/insights/usage":{"get":{"tags":["insights"],"summary":"Get Deep Insights Usage","description":"Get user's deep insights usage statistics.\n\nReturns current usage count, tier limit, and list of viewed attempts.\nThis is the primary endpoint for frontend to check quota status.\n\nPer Feb 23 spec (Issue #237):\n- Tracks unique mocks viewed (not total views)\n- Re-viewing same attempt is free","operationId":"get_deep_insights_usage_api_v1_insights_usage_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/insights/attempts/{attempt_id}/recommendations":{"get":{"tags":["insights"],"summary":"Get Recommendations","description":"Get prioritized recommendations for an attempt.\n\nReturns up to 10 recommendations sorted by priority and estimated impact.\nEach recommendation includes actionable advice and linked content.\n\nAccess rules (Feb 23 spec - Issue #237):\n- Diagnostic tests: Available to all users\n- Mock tests: Limited by tier (free=1, practice/guided=5)\n\nArgs:\n    attempt_id: Assessment attempt ID\n    limit: Maximum number of recommendations (default 10)","operationId":"get_recommendations_api_v1_insights_attempts__attempt_id__recommendations_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Attempt Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/insights/attempts/{attempt_id}/key-takeaways":{"get":{"tags":["insights"],"summary":"Get Key Takeaways","description":"Get key takeaways for an attempt.\n\nReturns 3-5 actionable summary points prioritized by importance.\n\nAccess rules (Feb 23 spec - Issue #237):\n- Diagnostic tests: Available to all users\n- Mock tests: Limited by tier (free=1, practice/guided=5)","operationId":"get_key_takeaways_api_v1_insights_attempts__attempt_id__key_takeaways_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Attempt Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/insights/attempts/{attempt_id}/trends":{"get":{"tags":["insights"],"summary":"Get Trend Analysis","description":"Get trend analysis comparing to previous attempts.\n\nReturns score deltas, topic trends, and overall trend direction.\nFor diagnostic (first) tests, returns has_history=False with helpful message.\n\nAccess rules (Feb 23 spec - Issue #237):\n- Diagnostic tests: Available to all users\n- Mock tests: Limited by tier (free=1, practice/guided=5)","operationId":"get_trend_analysis_api_v1_insights_attempts__attempt_id__trends_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Attempt Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/insights/attempts/{attempt_id}/enhanced":{"get":{"tags":["insights"],"summary":"Get Enhanced Insights","description":"Get GRE PFR-style enhanced insights (Task 4.5.7).\n\nReturns comprehensive insights in GRE Personal Feedback Report style including:\n- High-level observations per section (Accuracy & Time, Topics, Question Types)\n- Mistake categories aggregated from answer_insights\n- Question-specific insights from answer_insights\n- Structured section-by-section breakdown\n\nAccess rules (Feb 23 spec - Issue #237):\n- Diagnostic tests: Available to all users\n- Mock tests: Limited by tier (free=1, practice/guided=5)\n\nReturns 'locked: true' for users without access to mock test insights.","operationId":"get_enhanced_insights_api_v1_insights_attempts__attempt_id__enhanced_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Attempt Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/insights/attempts/{attempt_id}/mistake-categories":{"get":{"tags":["insights"],"summary":"Get Mistake Categories","description":"Get aggregated mistake categories from answer_insights (Task 4.5.7).\n\nReturns mistake categories in GRE PFR format:\n- Category name (e.g., \"Calculation Mistake\")\n- Questions affected (e.g., \"Section 1 Qn 4; Section 2 Qn 14\")\n- Remediation hint\n\nAccess rules (Feb 23 spec - Issue #237):\n- Diagnostic tests: Available to all users\n- Mock tests: Limited by tier (free=1, practice/guided=5)","operationId":"get_mistake_categories_api_v1_insights_attempts__attempt_id__mistake_categories_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Attempt Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/insights/attempts/{attempt_id}/question-insights":{"get":{"tags":["insights"],"summary":"Get Question Specific Insights","description":"Get question-specific insights from answer_insights (Task 4.5.7).\n\nReturns individual question insights in GRE PFR format:\n- Question reference (e.g., \"Section 1 Qn 3\")\n- Topic\n- Specific insight for the wrong answer\n- Remediation hint\n\nAccess rules (Feb 23 spec - Issue #237):\n- Diagnostic tests: Available to all users\n- Mock tests: Limited by tier (free=1, practice/guided=5)","operationId":"get_question_specific_insights_api_v1_insights_attempts__attempt_id__question_insights_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Attempt Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/knowledge-graph/tree":{"get":{"tags":["Knowledge Graph"],"summary":"Get Skill Tree","description":"Hierarchical concept tree. Public — taxonomy structure only.","operationId":"get_skill_tree_api_v1_knowledge_graph_tree_get","parameters":[{"name":"exam","in":"query","required":false,"schema":{"type":"string","description":"Exam to get tree for","default":"SAT","title":"Exam"},"description":"Exam to get tree for"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__knowledge_graph__SkillTreeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/knowledge-graph/flat":{"get":{"tags":["Knowledge Graph"],"summary":"Get Skill Nodes Flat","description":"Flat list of concept nodes for dropdowns.","operationId":"get_skill_nodes_flat_api_v1_knowledge_graph_flat_get","parameters":[{"name":"exam","in":"query","required":false,"schema":{"type":"string","description":"Filter by exam","default":"SAT","title":"Exam"},"description":"Filter by exam"},{"name":"level","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter by level","title":"Level"},"description":"Filter by level"},{"name":"module","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by module","title":"Module"},"description":"Filter by module"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillNodeFlatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/knowledge-graph/domains":{"get":{"tags":["Knowledge Graph"],"summary":"Get Domains","description":"All level-2 domain nodes for an exam (Algebra, Advanced Math, etc.).","operationId":"get_domains_api_v1_knowledge_graph_domains_get","parameters":[{"name":"exam","in":"query","required":false,"schema":{"type":"string","description":"Exam to get domains for","default":"SAT","title":"Exam"},"description":"Exam to get domains for"},{"name":"module","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by module","title":"Module"},"description":"Filter by module"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillNodeFlatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/knowledge-graph/skills":{"get":{"tags":["Knowledge Graph"],"summary":"Get Skills","description":"All level-3 skill nodes (CB skills) for an exam, optionally\nscoped to one domain path.","operationId":"get_skills_api_v1_knowledge_graph_skills_get","parameters":[{"name":"exam","in":"query","required":false,"schema":{"type":"string","description":"Exam to get skills for","default":"SAT","title":"Exam"},"description":"Exam to get skills for"},{"name":"module","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by module","title":"Module"},"description":"Filter by module"},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by domain path (e.g., SAT.math.algebra)","title":"Domain"},"description":"Filter by domain path (e.g., SAT.math.algebra)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillNodeFlatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/knowledge-graph/weights":{"get":{"tags":["Knowledge Graph"],"summary":"Get Domain Weights","description":"Domain weights for scoring. Returns contribution_to_parent on\neach L2 node, grouped by module.","operationId":"get_domain_weights_api_v1_knowledge_graph_weights_get","parameters":[{"name":"exam","in":"query","required":false,"schema":{"type":"string","description":"Exam to get weights for","default":"SAT","title":"Exam"},"description":"Exam to get weights for"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DomainWeightsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/knowledge-graph/by-path/{path}":{"get":{"tags":["Knowledge Graph"],"summary":"Get Skill Node By Path","operationId":"get_skill_node_by_path_api_v1_knowledge_graph_by_path__path__get","parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillNodeBase"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/payments/pricing":{"get":{"tags":["payments"],"summary":"Get Pricing Plans","description":"Return all active, Nova-sellable packages with geo-aware pricing.\n\nReads Package.pricing_by_country for the detected country, falling back\nto DEFAULT and then to Package.price / Package.price_cents.\n\n#855b adversarial review: sellable_in_nova=False packages are filtered\nout here — initiate rejects them, so rendering a buyable card whose\nerror copy points back at this very page would be a contradiction.\n\n#902: listed_publicly=False packages are also filtered — they stay\npurchasable (initiate + counselor checkout links do NOT filter on it)\nbut are never advertised to anonymous buyers.\n\n#1443 (Sriram, 2026-09-11): launch_cleared=False packages are filtered\ntoo. It is the human go/no-go gate (models/entitlement.py); the results\nbuy wall picks its SKU from this list, and an uncleared row sharing a\ntier and a price with a cleared one was decided by sort order.","operationId":"get_pricing_plans_api_v1_payments_pricing_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PricingPlanResponse"},"type":"array","title":"Response Get Pricing Plans Api V1 Payments Pricing Get"}}}}}}},"/api/v1/payments/discount/validate":{"post":{"tags":["payments"],"summary":"Validate Discount","description":"Validate a discount code for a specific tier.\n\n#1313 review F4/F10: this used to take a bare `dict` with no bounds and no\nrate limit, which made it a code-guessing oracle keyed to a user id — and\n#1313 widened who can reach it. Now a bounded schema behind a limiter.","operationId":"validate_discount_api_v1_payments_discount_validate_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscountValidateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/payments/extensions":{"get":{"tags":["payments"],"summary":"Get Extension Bundles List","description":"Return available validity-extension bundles with geo-aware pricing.","operationId":"get_extension_bundles_list_api_v1_payments_extensions_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtensionBundlesListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/payments/addons":{"get":{"tags":["payments"],"summary":"Get Addon Packages List","description":"List purchasable add-ons for the given exam (or all exams if no slug).\n\nPublic to any authenticated user — free-tier users can purchase\nadd-ons too (the auto-create-Free-Subscription invariant ensures\nthey have a base sub to attach the add-on to).\n\nRate limiting follows the standard API_LIMIT applied via the\n`payments` router decorators above (see existing /pricing,\n/extensions endpoints for the precedent).","operationId":"get_addon_packages_list_api_v1_payments_addons_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"exam_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exam Slug"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddonPackagesListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/payments/initiate":{"post":{"tags":["payments"],"summary":"Initiate Payment","description":"Create a PaymentOrder and call the gateway's initiate API.\n\nReturns an InitiateResponse with a `frontend_payload` object that tells\nthe frontend how to render checkout (razorpay_checkout / easebuzz_redirect\n/ mock_modal).\n\nCodex finding #4: country_code on the request payload is ignored for\npricing. Allowing the client to pick country would let a US user force\nIN pricing (or vice versa). Country is always derived from the request\nIP. The field remains on the payload for backward-compat with the\nexisting frontend but has no effect on price selection.","operationId":"initiate_payment_api_v1_payments_initiate_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitiateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitiateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/payments/gateways":{"get":{"tags":["payments"],"summary":"Checkout Gateways","description":"#1584b: payment methods this buyer may pick, default first.\n\nRead-only. Country comes from the request IP, exactly as /initiate\nresolves it, so the picker never offers a method /initiate would refuse.","operationId":"checkout_gateways_api_v1_payments_gateways_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"item_type","in":"query","required":false,"schema":{"enum":["package","extension","addon"],"type":"string","default":"package","title":"Item Type"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutGatewaysResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/payments/grading-unlock/offer":{"get":{"tags":["payments"],"summary":"Grading Unlock Offer","description":"#1176 (slice F): region-aware grading-unlock offer for the checkout page.\n\nRead-only. Returns availability/state (mirrors the results projector) plus\nthe region-resolved price when purchasable. The exact charge is re-derived\nserver-side at /initiate; this is the display price.","operationId":"grading_unlock_offer_api_v1_payments_grading_unlock_offer_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"attempt_id","in":"query","required":true,"schema":{"type":"integer","title":"Attempt Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GradingUnlockOfferResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/payments/verify":{"post":{"tags":["payments"],"summary":"Verify Payment","description":"Verify a client-side payment callback. Idempotent.","operationId":"verify_payment_api_v1_payments_verify_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentOrderResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/payments/webhooks/razorpay":{"post":{"tags":["payments"],"summary":"Razorpay Webhook","description":"Async Razorpay webhook. Signature verified inside payment_service via\nthe RazorpayGateway's parse_webhook.\n\nSecurity review HIGH-2: rate-limited via WEBHOOK_LIMIT per-IP and\ngated by Razorpay's published webhook IP allowlist before any HMAC\nwork happens. Attacker floods from random IPs get rejected cheaply.","operationId":"razorpay_webhook_api_v1_payments_webhooks_razorpay_post","parameters":[{"name":"x-razorpay-signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Razorpay-Signature"}},{"name":"x-razorpay-event-id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Razorpay-Event-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/payments/webhooks/easebuzz":{"post":{"tags":["payments"],"summary":"Easebuzz Webhook","description":"Easebuzz webhook (relayed through dmango-entrayn).\n\nSignature verification happens inside EasebuzzGateway.parse_webhook against\nthe shared merchant salt — dmango-entrayn forwards payloads verbatim.\n\nSecurity review HIGH-2: rate-limited + source-IP check before HMAC work.\nThe Easebuzz relay IP is an env-configurable allowlist (see\nutils/webhook_origin.EASEBUZZ_RELAY_IPS) so ops can pin it to\ndmango-entrayn's egress when that's provisioned.","operationId":"easebuzz_webhook_api_v1_payments_webhooks_easebuzz_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/payments/webhooks/paypal":{"post":{"tags":["payments"],"summary":"Paypal Webhook","description":"PayPal webhook (#1584c). PUBLIC: authenticated by PayPal's signature.\n\nThe event is verified inside PayPalGateway.parse_webhook by asking PayPal\n(verify-webhook-signature). PayPal publishes no stable source-IP list, so\nthe IP check below is a no-op unless ops set WEBHOOK_ALLOWLIST_PAYPAL; the\nsignature is the gate.\n\nAnswers PayPal retries on (5xx) are deliberate: an event Nova could not\nverify or act on because PayPal or a secret was unavailable is worth\nanother delivery. A forged or malformed event is a 4xx and is not retried.","operationId":"paypal_webhook_api_v1_payments_webhooks_paypal_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/payments/orders/{order_id}/status":{"get":{"tags":["payments"],"summary":"Get Order Status","description":"Owner-only derived order status for the /payment/processing poll.\n\nRead-only — no state mutation, safe to poll every 2s. Returns 404 for\nunknown orders AND for other users' orders (identical response, so order\nids can't be enumerated). Payload is PII-free: state + exam +\nredirect_url + order_reference only.","operationId":"get_order_status_api_v1_payments_orders__order_id__status_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"integer","title":"Order Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/payments/history":{"get":{"tags":["payments"],"summary":"Get Payment History","description":"Return the current user's order history (paginated).","operationId":"get_payment_history_api_v1_payments_history_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"skip","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Skip"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentHistoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/purchase/start":{"post":{"tags":["purchase"],"summary":"Purchase Start","operationId":"purchase_start_api_v1_purchase_start_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseStartRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseStartResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/purchase/link-info":{"get":{"tags":["purchase"],"summary":"Purchase Link Info","description":"Resolve a signed checkout link to its plan (#855k).\n\n# PUBLIC: anonymous visitors land here from a counselor-shared link —\n# the token's HMAC signature is the gate, and this endpoint only\n# reveals what the pricing page already shows (plan name + price).\n# Rate-limited per IP against token-guessing.","operationId":"purchase_link_info_api_v1_purchase_link_info_get","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":1024,"title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutLinkInfoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/purchase/verify-otp":{"post":{"tags":["purchase"],"summary":"Purchase Verify Otp","operationId":"purchase_verify_otp_api_v1_purchase_verify_otp_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseVerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PurchaseVerifyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/settings/contact":{"get":{"tags":["settings"],"summary":"Get Contact Info","description":"Get public contact information (WhatsApp number, message, CTA enabled).\n\nThis endpoint is public and does not require authentication.","operationId":"get_contact_info_api_v1_settings_contact_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactInfoResponse"}}}}}}},"/api/v1/settings/testimonials":{"get":{"tags":["settings"],"summary":"Get Testimonials","description":"Get active testimonials for display on the frontend.\n\nArgs:\n    featured_only: If True, only return featured testimonials\n    limit: Maximum number of testimonials to return (default: 10)\n\nThis endpoint is public and does not require authentication.","operationId":"get_testimonials_api_v1_settings_testimonials_get","parameters":[{"name":"featured_only","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Featured Only"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicTestimonialResponse"},"title":"Response Get Testimonials Api V1 Settings Testimonials Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/public/event-mappings/keys":{"get":{"tags":["public-event-mappings"],"summary":"List Event Mapping Keys","description":"The full set of event keys present in this environment's database.\n\nPUBLIC: deliberately unauthenticated (#1212, 2026-07-29). Every key\nreturned here is already public — each one is emitted in a client-side JS\nbundle on the marketing site, so there is nothing to leak. Requiring a\nsecret would push gtp-wp CI toward skipping the check whenever the secret\nis absent, which is the \"guard that silently stops guarding\" pattern this\nendpoint exists to eliminate.\n\n**No pagination and no filtering.** This knowingly departs from\n`.claude/rules/architecture.md` (\"every list endpoint must paginate, max\n100\"): a partial or filtered set would make the gtp-wp conformance gate\nsilently wrong — CI would go green against a key set that isn't the real\none. Bounded in practice by the seed (tens of rows, operator-created, not\nuser-created), so there is no unbounded-growth exposure.\n\nInactive mappings are included, which \"no filtering\" requires and which is\nalso the behaviour CI wants: a deactivated mapping still means the key is\n*known*, and gtp-wp emitting it is a dispatch-time skip to triage, not a\nmissing-key failure.\n\n``Cache-Control: no-store`` — a cached response would reintroduce exactly\nthe stale-state window a live read is meant to close.","operationId":"list_event_mapping_keys_api_v1_public_event_mappings_keys_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventMappingKeysResponse"}}}}}}},"/api/v1/exclusive/inquiry":{"post":{"tags":["exclusive"],"summary":"Submit Inquiry","description":"Public endpoint — anyone can submit an Exclusive interest form.\n\nIf the submitter is logged in (real User, not GuestUser), `user_id` is\ncaptured for admin context. GuestUser sessions don't link.","operationId":"submit_inquiry_api_v1_exclusive_inquiry_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExclusiveInquiryCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExclusiveInquiryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/funnel/events":{"post":{"tags":["funnel"],"summary":"Ingest Funnel Event","description":"# PUBLIC: pre-signup lead-magnet view events; allowlisted + rate-limited.","operationId":"ingest_funnel_event_api_v1_funnel_events_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunnelEventIngestRequest"}}},"required":true},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunnelEventIngestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/funnel/identity-link":{"post":{"tags":["funnel"],"summary":"Link Funnel Identity","description":"Stitch a pre-signup ``anon_id`` (from the browser shim's localStorage) to the\nauthenticated user, so the funnel query layer can credit anonymous view events\nto them. Called after signup/login.\n\nThe ``user_id`` comes from the SESSION, never the request body — a client can\nonly ever link its own identity, never forge a link for someone else. The write\nis best-effort + idempotent (see ``funnel_event_service.link_identity``).","operationId":"link_funnel_identity_api_v1_funnel_identity_link_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunnelIdentityLinkRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunnelIdentityLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/catalog/exams":{"get":{"tags":["catalog"],"summary":"Get Exam Catalog","description":"Return the exams + tiers + add-ons available for a given degree.\n\nFilters out exams that don't have a registered ExamConfig (per\n`core.catalog.exams_for_degree`) so mid-rollout the catalog only\nadvertises exams the rest of the platform can handle.","operationId":"get_exam_catalog_api_v1_catalog_exams_get","parameters":[{"name":"degree","in":"query","required":true,"schema":{"type":"string","description":"Target degree. One of: Bachelors, Masters, MBA, PhD, Unsure","title":"Degree"},"description":"Target degree. One of: Bachelors, Masters, MBA, PhD, Unsure"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CatalogResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/account/delete-request":{"post":{"tags":["account-deletion"],"summary":"Request Account Deletion","description":"Public endpoint — accept an account-deletion request from a user.\n\nRequired by Play Store / App Store data-deletion policies. Persists the\nrequest and notifies ops; never auto-deletes.","operationId":"request_account_deletion_api_v1_account_delete_request_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountDeletionRequestCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountDeletionRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/upgrade-interest":{"post":{"tags":["upgrade-interest"],"summary":"Create Upgrade Interest","description":"Record that the user asked to upgrade, and publish the marketing event.","operationId":"create_upgrade_interest_api_v1_me_upgrade_interest_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpgradeInterestCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpgradeInterestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/profile-intent":{"put":{"tags":["profile-intent"],"summary":"Put Profile Intent","description":"Declare (or update) the user's plan for one exam.","operationId":"put_profile_intent_api_v1_me_profile_intent_put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileIntentUpsert"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileIntentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/checkout-link":{"post":{"tags":["checkout-session"],"summary":"Create Checkout Link","description":"Mint a short-lived, payment-scoped checkout URL for the calling user.\n\n`get_verified_user` rather than `get_current_user`: the minted token is\naccepted by the payment path, which enforces HIGH-5 email verification, so\nfailing here surfaces that in the app instead of at the Pay button.","operationId":"create_checkout_link_api_v1_me_checkout_link_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutLinkCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutLinkResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/purchase/checkout-session":{"get":{"tags":["checkout-session"],"summary":"Resolve Checkout Session","description":"Resolve a checkout token to its buyer + plan.\n\n# PUBLIC: the token IS the credential — the browser that opened the\n# handoff URL has no session yet, which is the entire problem #1313\n# solves. Rate-limited per IP against guessing, same as /link-info.\n\nThe credential is read from the **Authorization header**, never a query\nparameter (#1313 review F1). Cloud Run records `httpRequest.requestUrl`\nincluding the query string and Sentry records `query_string`, so a token in\nthe URL is a token in the logs — which would defeat the whole point of\nminting it into the URL *fragment* in the first place.\n\nThe response deliberately carries only what the checkout page renders\n(email, first name, plan). It is NOT a profile endpoint: a leaked token\nmust not become a way to read the buyer's attempts, scores or PII.","operationId":"resolve_checkout_session_api_v1_purchase_checkout_session_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/vocab/sets":{"get":{"tags":["vocab"],"summary":"List Sets","operationId":"list_sets_api_v1_vocab_sets_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/VocabSetSummary"},"type":"array","title":"Response List Sets Api V1 Vocab Sets Get"}}}}}}},"/api/v1/vocab/sets/{set_id}":{"get":{"tags":["vocab"],"summary":"Get Set","operationId":"get_set_api_v1_vocab_sets__set_id__get","parameters":[{"name":"set_id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"title":"Set Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VocabSetDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/vocab/sets/{set_id}/download":{"get":{"tags":["vocab"],"summary":"Download Set","description":"302 redirect to the GCS public URL for the per-set ZIP.","operationId":"download_set_api_v1_vocab_sets__set_id__download_get","parameters":[{"name":"set_id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"title":"Set Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/vocab/words/{word_id}":{"get":{"tags":["vocab"],"summary":"Get Word","operationId":"get_word_api_v1_vocab_words__word_id__get","parameters":[{"name":"word_id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"title":"Word Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VocabWordDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/vocab/me/state":{"get":{"tags":["vocab"],"summary":"Get My State","description":"Aggregate state. Lazy-creates the profile row on first call (§11.1).","operationId":"get_my_state_api_v1_vocab_me_state_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VocabUserStateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/vocab/me/stats":{"get":{"tags":["vocab"],"summary":"Get My Stats","operationId":"get_my_stats_api_v1_vocab_me_stats_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VocabStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/vocab/me/sets/{set_id}":{"patch":{"tags":["vocab"],"summary":"Patch Set State","operationId":"patch_set_state_api_v1_vocab_me_sets__set_id__patch","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"set_id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"title":"Set Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VocabSetStatePatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VocabSetStateOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/vocab/me/words/{word_id}":{"patch":{"tags":["vocab"],"summary":"Patch Word State","operationId":"patch_word_state_api_v1_vocab_me_words__word_id__patch","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"word_id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"title":"Word Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VocabWordStatePatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VocabWordStateOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/vocab/me/ltm":{"post":{"tags":["vocab"],"summary":"Post Ltm Event","operationId":"post_ltm_event_api_v1_vocab_me_ltm_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VocabLtmEventCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VocabLtmEventResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/vocab/me":{"delete":{"tags":["vocab"],"summary":"Delete My Vocab State","operationId":"delete_my_vocab_state_api_v1_vocab_me_delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VocabDeleteMeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/vocab/me/fcm/register":{"post":{"tags":["vocab"],"summary":"Register Fcm Token","description":"Idempotent upsert: same (user_id, app='vocab', token) refreshes last_seen_at.","operationId":"register_fcm_token_api_v1_vocab_me_fcm_register_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PushTokenRegister"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericSuccess"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/vocab/me/fcm/{token}":{"delete":{"tags":["vocab"],"summary":"Unregister Fcm Token","operationId":"unregister_fcm_token_api_v1_vocab_me_fcm__token__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericSuccess"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/vocab/me/fvf-intent":{"post":{"tags":["vocab"],"summary":"Post Fvf Intent","description":"Persist the Cordova FVF (First Visit Form) intent payload.\n\nReplaces vocab_user_profile.fvf_intent wholesale on each write — no\nmerge semantics. Cordova may submit partial payloads; missing fields\nare stored as null. captured_at is server-set to avoid client-clock\ndrift.\n\nAuth: existing get_current_user bearer dep. The shim issues\ninterchangeable JWTs (#667 Bearer path), so Cordova WebView can\nattach the same token it used for /api/v1/user/* shim calls.","operationId":"post_fvf_intent_api_v1_vocab_me_fvf_intent_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FvfIntentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenericSuccess"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/vocab/wotd/today":{"get":{"tags":["vocab-wotd"],"summary":"Get Today","description":"PUBLIC-ish (optional auth): the exam's word for a date.\n\nIdempotent — the first request for a date schedules a random unscheduled\nword and every later request returns that same word. `is_saved` is False\nfor anonymous callers rather than absent, so the client renders one shape.","operationId":"get_today_api_v1_vocab_wotd_today_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"exam","in":"query","required":true,"schema":{"type":"string","description":"gre | sat | toefl (case-insensitive)","title":"Exam"},"description":"gre | sat | toefl (case-insensitive)"},{"name":"date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"YYYY-MM-DD; defaults to today (IST)","title":"Date"},"description":"YYYY-MM-DD; defaults to today (IST)"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WotdWordOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/vocab/wotd/saved":{"post":{"tags":["vocab-wotd"],"summary":"Save Word","description":"Bookmark a word. Idempotent — re-saving returns 201 with the same row\nrather than a conflict, because mobile clients retry on flaky networks.","operationId":"save_word_api_v1_vocab_wotd_saved_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WotdSaveRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WotdWordOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["vocab-wotd"],"summary":"List Saved","operationId":"list_saved_api_v1_vocab_wotd_saved_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"exam","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by exam; omit for all exams","title":"Exam"},"description":"Filter by exam; omit for all exams"},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WotdSavedListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/vocab/wotd/saved/{word_id}":{"delete":{"tags":["vocab-wotd"],"summary":"Unsave Word","description":"404 when it wasn't saved — an unsave of something absent should be\nhonest rather than a silent success.","operationId":"unsave_word_api_v1_vocab_wotd_saved__word_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"word_id","in":"path","required":true,"schema":{"type":"integer","title":"Word Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/user/login.json":{"post":{"summary":"Shim Login","operationId":"shim_login_api_v1_user_login_json_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/entraynuser":{"post":{"summary":"Shim Signup","description":"Cordova's `register-view.js:299` only treats 200 as success — 201 falls\ninto the error branch. The 200 here is load-bearing.\n\nAudit fix 2026-05-22: also queues the verification OTP email so\nCordova's showEmailVerificationModal at register-view.js:282 has an\nactual email to wait for. Nova's native /auth/signup does NOT send\nthe OTP automatically (the web client is expected to call /send-otp);\nthe shim takes responsibility because the Cordova client doesn't have\na separate send-otp call in its signup flow.","operationId":"shim_signup_api_v1_entraynuser_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/user/request_password_reset.json":{"post":{"summary":"Shim Request Password Reset","description":"Maps to Nova's send-OTP. Success-shaped 200 even when the email is\nunknown (anti-enumeration).\n\nSecurity hardening (review CRITICAL-3): the SES send dispatches to a\nbackground task so response time is constant regardless of whether\nthe email exists. The previous synchronous send leaked a ~hundreds-of-ms\ntiming side channel between known and unknown emails.","operationId":"shim_request_password_reset_api_v1_user_request_password_reset_json_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/user/verify_otp.json":{"post":{"summary":"Shim Verify Otp","description":"Verify the OTP issued by /api/v1/entraynuser (signup) or the\nunverified-user branch of /api/v1/user/login.json.\n\nSuccess contract (#672a):\n  200 + login-shape envelope + is_first_verification flag.\n  The vocab_session cookie is set here, NOT on signup.\n  When is_first_verification=true, a one-time vocab welcome email\n  (#672c) is dispatched in the background.\n\nError contract (Drupal-shaped):\n  400 invalid_otp     — wrong code; body carries attempts_remaining\n  410 otp_expired     — code expired; client should /resend_otp.json\n  429 otp_locked      — too many wrong attempts; body carries retry_after_seconds","operationId":"shim_verify_otp_api_v1_user_verify_otp_json_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/user/resend_otp.json":{"post":{"summary":"Shim Resend Otp","description":"Resend the OTP for `email`.\n\nTwo layers of throttling:\n  1. IP-based AUTH_LIMIT via slowapi (above).\n  2. Per-email floor: 1 send per 60s + 5 sends per hour (#672 spec).\n     Enforced by reading the OTP table — see _resend_throttle_check.\n\nAnti-enumeration (strict): the response shape is identical for every\ncase the email lookup could reveal — unknown email, already-verified\nuser, throttled real-unverified, or fresh real-unverified all return\n200 + {\"otp_sent_to\": \"<masked>\"}. The throttle still gates the\nactual send under the hood; the client just can't distinguish the\nbranches from the wire. Codex review #672a flagged the prior 429\nbranch as letting an attacker send the same email twice within 60s\nto fingerprint \"real unverified\" vs \"unknown/verified\" — the spec's\nretry_after_seconds UX loses to that security primitive.","operationId":"shim_resend_otp_api_v1_user_resend_otp_json_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/user/request_login_otp.json":{"post":{"summary":"Shim Request Login Otp","description":"#766 — mint + send a fresh login OTP for ANY registered account.\n\nDistinct from /resend_otp.json: resend only re-sends a *pending* signup/\nlogin OTP and no-ops for already-verified accounts, so 'forgot password'\non an existing (verified) account produced no code (the #766 blocker).\nThe background dispatch passes `allow_verified=True`, so a verified account\ngets a fresh OTP. /verify_otp.json then logs them in (passwordless) and\nmints the capability token /set_new_password.json requires.\n\nReuse: same create_otp + SES send + per-email throttle as the rest of the\nshim — no new OTP/crypto logic. Google-auth accounts are eligible (#766\nproduct decision: they may set a password and gain email+password login).\n\nAnti-enumeration (strict): the handler does only a user lookup, then schedules\nthe mint+send as a background task and returns 200 + {\"otp_sent_to\": masked}.\nKnown and unknown emails therefore take the same time on the request path —\nthe SES send (50ms-5s) no longer leaks account existence by latency\n(mirrors /request_password_reset.json's hardening).","operationId":"shim_request_login_otp_api_v1_user_request_login_otp_json_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/file_create_url":{"post":{"summary":"Shim File Create Url","operationId":"shim_file_create_url_file_create_url_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/user/google/mobile-start":{"get":{"summary":"Google Mobile Start","description":"Issue CSRF state + OIDC nonce cookies + 302 to Google's consent screen.","operationId":"google_mobile_start_api_v1_user_google_mobile_start_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/user/google/mobile-complete":{"get":{"summary":"Google Mobile Complete","operationId":"google_mobile_complete_api_v1_user_google_mobile_complete_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Error"}},{"name":"vocab_oauth_state","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vocab Oauth State"}},{"name":"vocab_oauth_nonce","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vocab Oauth Nonce"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/user/google/mobile-verify-idtoken":{"post":{"summary":"Google Mobile Verify Idtoken","description":"Verify a Google idToken posted by the native Play Services plugin.\n\nSpec §4.2 invariant: idToken IS the security boundary. We do NOT trust\nthe plugin's access_token via /userinfo (cross-OAuth-client replay).\nAudience binding is enforced inside `_verify_google_id_token` via\ngoogle-auth's `verify_oauth2_token(audience=settings.google_client_id)`.\n\nNo CSRF state / OIDC nonce cookies here — there's no redirect to mint\nthem against. The native SDK already enforces audience binding via the\nregistered Android OAuth client; that's the equivalent mitigation.\n\nBody parsing routes through `parse_shim_body` so Cordova's $.ajax quirk\n(form-encoded payload under `Content-Type: application/json`) hydrates\ncorrectly. We call it *inside* a try/except instead of `Depends(...)` so\nits `DrupalShimError` (which the global shim handler would rewrite to\n`{form_errors:{general:...}}`) doesn't leak the wrong envelope shape on\nunparseable bodies. All four error paths on this endpoint emit the\nissue-spec `{error, message}` JSON envelope.","operationId":"google_mobile_verify_idtoken_api_v1_user_google_mobile_verify_idtoken_post","requestBody":{"content":{"application/json":{"schema":{"properties":{"id_token":{"type":"string","maxLength":8192,"minLength":1,"description":"Google idToken returned by the native Play Services sign-in plugin"},"app_source":{"type":"string","maxLength":50,"description":"Which app is signing in (#1289). `toefl_android` / `toefl_ios` attribute the signup to the TOEFL app; omitted or any other value keeps the legacy vocab-app attribution."},"utm_source":{"type":"string","maxLength":255},"utm_medium":{"type":"string","maxLength":255},"utm_campaign":{"type":"string","maxLength":255},"utm_term":{"type":"string","maxLength":255},"utm_content":{"type":"string","maxLength":255}},"type":"object","required":["id_token"]}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/_VerifyIdTokenSuccess"}}}},"400":{"description":"Malformed body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/_VerifyIdTokenError"}}}},"401":{"description":"Invalid idToken","content":{"application/json":{"schema":{"$ref":"#/components/schemas/_VerifyIdTokenError"}}}},"403":{"description":"Refused to link Google identity to an unverified email-signup account","content":{"application/json":{"schema":{"$ref":"#/components/schemas/_VerifyIdTokenError"}}}},"429":{"description":"Rate limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/_VerifyIdTokenError"}}}},"500":{"description":"User upsert failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/_VerifyIdTokenError"}}}},"503":{"description":"Google OAuth not configured on this server","content":{"application/json":{"schema":{"$ref":"#/components/schemas/_VerifyIdTokenError"}}}}}}},"/api/v1/user/set_new_password.json":{"post":{"summary":"Shim Set New Password","description":"#766 — rotate the password for the currently-authenticated account.\n\nAuth is TWO-factor by construction:\n  1. the vocab_session cookie (or Bearer) — identifies the account, and\n  2. a `pw_reset_token` capability minted by /verify_otp.json — proves the\n     session JUST passed an OTP challenge for THIS user.\n\nRequiring (2) is what stops an arbitrary live session (an ordinary password/\ngoogle login, or a stolen 30-day cookie) from rotating the password without\nfresh OTP possession, and — because the token rides in the body, not a cookie\n— it also closes the CSRF vector on this state-changing endpoint. The token\nis short-lived (_PW_RESET_TOKEN_TTL) and carries a distinct type\n(_PW_RESET_TOKEN_TYPE) so it can never double as a session credential.\n\nRecovery flow: request_login_otp → verify_otp (logs in + returns the token) →\nset_new_password (cookie + token).\n\nReuse: Nova's password policy (validate_password_complexity) and hasher\n(get_password_hash) — the exact logic native /reset-password runs. For\ngoogle-auth accounts this populates password_hash, granting email+password\nlogin alongside Google sign-in (#766 product decision: allow).","operationId":"shim_set_new_password_api_v1_user_set_new_password_json_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"vocab_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vocab Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/user/logout.json":{"post":{"summary":"Shim Logout","operationId":"shim_logout_api_v1_user_logout_json_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"vocab_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vocab Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/user/{uid}":{"get":{"summary":"Shim Get User","description":"Bare Drupal user object (no envelope) — `user.js:845` wraps it client-side.","operationId":"shim_get_user_api_v1_user__uid__get","parameters":[{"name":"uid","in":"path","required":true,"schema":{"type":"integer","minimum":1,"title":"Uid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"vocab_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vocab Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"summary":"Shim Put User","description":"Apply the §6.5 field mapping, return the bare user object reflecting\nthe persisted state. Mass-assignment hardening lives in\nShimUserPutRequest — `setattr` only ever runs on validated, length-capped\nvalues mapped through `_FIELD_TO_PROFILE_COLUMN`.","operationId":"shim_put_user_api_v1_user__uid__put","parameters":[{"name":"uid","in":"path","required":true,"schema":{"type":"integer","minimum":1,"title":"Uid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"vocab_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vocab Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/home/c.json":{"get":{"summary":"Shim Home C Json","description":"Aggregate vocab state in the legacy Drupal shape.\n\n`user_id` and `exam` are declared so FastAPI advertises them in OpenAPI\nand so the IDOR query-param check in `enforce_session_identity` fires.\nThe cookie user is the source of truth; we never trust the query value.","operationId":"shim_home_c_json_api_v1_home_c_json_get","parameters":[{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Id"}},{"name":"exam","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exam"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"vocab_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vocab Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Shim Home C Json Api V1 Home C Json Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vocab/uid/{uid}/":{"get":{"summary":"Shim Vocab State","operationId":"shim_vocab_state_vocab_uid__uid___get","parameters":[{"name":"uid","in":"path","required":true,"schema":{"type":"integer","minimum":1,"title":"Uid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"vocab_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vocab Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Shim Vocab State Vocab Uid  Uid   Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vocab/uid/{uid}/stats/":{"get":{"summary":"Shim Vocab Stats","operationId":"shim_vocab_stats_vocab_uid__uid__stats__get","parameters":[{"name":"uid","in":"path","required":true,"schema":{"type":"integer","minimum":1,"title":"Uid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"vocab_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vocab Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Shim Vocab Stats Vocab Uid  Uid  Stats  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vocab/user_set_state/":{"post":{"summary":"Shim User Set State","operationId":"shim_user_set_state_vocab_user_set_state__post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"vocab_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vocab Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Shim User Set State Vocab User Set State  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vocab/move_word_list/":{"post":{"summary":"Shim Move Word List","description":"§6.8: lid ∈ {-1, 0..6}; validated BEFORE the word lookup so callers\nget a 400 (per spec) rather than a 404 (misleading) for invalid lid.","operationId":"shim_move_word_list_vocab_move_word_list__post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"vocab_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vocab Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Shim Move Word List Vocab Move Word List  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vocab/bookmark_word/":{"post":{"summary":"Shim Bookmark Word","operationId":"shim_bookmark_word_vocab_bookmark_word__post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"vocab_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vocab Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Shim Bookmark Word Vocab Bookmark Word  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/vocab/ltm/":{"post":{"summary":"Shim Ltm","operationId":"shim_ltm_vocab_ltm__post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"vocab_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Vocab Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Shim Ltm Vocab Ltm  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sat-free-resources/{lead_magnet}/config":{"get":{"tags":["lead-magnet"],"summary":"Get Lead Magnet Config Endpoint","description":"Get configuration for a specific lead magnet.\n\nReturns title, description, estimated time, and other display info.\nUsed by frontend to render the registration page.","operationId":"get_lead_magnet_config_endpoint_api_sat_free_resources__lead_magnet__config_get","parameters":[{"name":"lead_magnet","in":"path","required":true,"schema":{"type":"string","description":"Lead magnet slug","title":"Lead Magnet"},"description":"Lead magnet slug"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadMagnetConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sat-free-resources/{lead_magnet}/register":{"post":{"tags":["lead-magnet"],"summary":"Lead Magnet Register","description":"Register for a lead magnet (Gate 1).\n\nCreates user account (or finds existing) and sends OTP to email.\nReturns a redirect token for the verification page.\n\nThis endpoint is idempotent - calling multiple times with same email\nwill generate a new OTP each time.","operationId":"lead_magnet_register_api_sat_free_resources__lead_magnet__register_post","parameters":[{"name":"lead_magnet","in":"path","required":true,"schema":{"type":"string","description":"Lead magnet slug","title":"Lead Magnet"},"description":"Lead magnet slug"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadMagnetRegisterRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadMagnetRegisterResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sat-free-resources/{lead_magnet}/info":{"get":{"tags":["lead-magnet"],"summary":"Get Registration Info Endpoint","description":"Get registration info for the verification page.\n\nReturns masked email, attempts remaining, and other display info.\nDoes NOT return the OTP code.","operationId":"get_registration_info_endpoint_api_sat_free_resources__lead_magnet__info_get","parameters":[{"name":"lead_magnet","in":"path","required":true,"schema":{"type":"string","description":"Lead magnet slug","title":"Lead Magnet"},"description":"Lead magnet slug"},{"name":"token","in":"query","required":true,"schema":{"type":"string","description":"Redirect token from registration","title":"Token"},"description":"Redirect token from registration"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadMagnetInfoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sat-free-resources/{lead_magnet}/verify-otp":{"post":{"tags":["lead-magnet"],"summary":"Verify Otp Endpoint","description":"Verify OTP code for lead magnet registration.\n\nOn success:\n- Marks email as verified\n- Returns JWT tokens for authentication\n- Returns redirect URL for the lead magnet start page","operationId":"verify_otp_endpoint_api_sat_free_resources__lead_magnet__verify_otp_post","parameters":[{"name":"lead_magnet","in":"path","required":true,"schema":{"type":"string","description":"Lead magnet slug","title":"Lead Magnet"},"description":"Lead magnet slug"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadMagnetVerifyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadMagnetVerifyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sat-free-resources/{lead_magnet}/resend-otp":{"post":{"tags":["lead-magnet"],"summary":"Resend Otp Endpoint","description":"Resend OTP code for an existing registration.\n\n- Generates new OTP\n- Resets attempt counter\n- Extends expiry time\n- Limited to 3 resends per registration\n- 60-second cooldown between resends","operationId":"resend_otp_endpoint_api_sat_free_resources__lead_magnet__resend_otp_post","parameters":[{"name":"lead_magnet","in":"path","required":true,"schema":{"type":"string","description":"Lead magnet slug","title":"Lead Magnet"},"description":"Lead magnet slug"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadMagnetResendRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadMagnetResendResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sat-sample-test/register":{"post":{"tags":["sat-sample-test"],"summary":"Register","description":"Register for SAT Sample Test.\n\nCreates user account (or finds existing) and sends OTP to email.\nReturns user_id for subsequent verification.\n\n⛔ Never returns tokens. An already-verified user gets an OTP like anyone\nelse and must complete /verify-otp. This docstring used to promise tokens\n\"for immediate access\", which is the shape of the bypass removed in\nv4.13.1 — no caller obtains a session without proving possession of a\ncurrent code.","operationId":"register_api_sat_sample_test_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SATSampleTestRegisterRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SATSampleTestRegisterResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sat-sample-test/info/{user_id}":{"get":{"tags":["sat-sample-test"],"summary":"Get Info","description":"Get user info for verification page.\n\nReturns masked email and verification status.","operationId":"get_info_api_sat_sample_test_info__user_id__get","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SATSampleTestInfoResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sat-sample-test/verify-otp":{"post":{"tags":["sat-sample-test"],"summary":"Verify Otp","description":"Verify OTP code for SAT Sample Test registration.\n\nOn success:\n- Marks email as verified\n- Returns JWT tokens for authentication\n- Returns redirect URL for the test start page","operationId":"verify_otp_api_sat_sample_test_verify_otp_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SATSampleTestVerifyRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SATSampleTestVerifyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/sat-sample-test/resend-otp":{"post":{"tags":["sat-sample-test"],"summary":"Resend Otp","description":"Resend OTP code for SAT Sample Test verification.","operationId":"resend_otp_api_sat_sample_test_resend_otp_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SATSampleTestResendRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SATSampleTestResendResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/log.json":{"post":{"tags":["vocab-client"],"summary":"Vocab Client Log","operationId":"vocab_client_log_api_v1_log_json_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/system/data-to-spreadsheet":{"post":{"tags":["vocab-client"],"summary":"Vocab Lead Data To Spreadsheet","operationId":"vocab_lead_data_to_spreadsheet_api_v1_system_data_to_spreadsheet_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileLeadSubmissionResponse"}}}}}}},"/api/v1/system/fvf-user-data-to-spreadsheet":{"post":{"tags":["vocab-client"],"summary":"Vocab Lead Fvf User Data To Spreadsheet","operationId":"vocab_lead_fvf_user_data_to_spreadsheet_api_v1_system_fvf_user_data_to_spreadsheet_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MobileLeadSubmissionResponse"}}}}}}},"/api/internal/auth/login":{"post":{"tags":["internal-auth"],"summary":"Internal Login","description":"Login endpoint for internal users.\n\nHIGH-5: Rate limited to prevent brute-force attacks against admin accounts.","operationId":"internal_login_api_internal_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalLoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InternalLoginResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/auth/me":{"get":{"tags":["internal-auth"],"summary":"Get Current User","description":"Get current internal user's info","operationId":"get_current_user_api_internal_auth_me_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__internal__auth__InternalUserResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/auth/change-password":{"post":{"tags":["internal-auth"],"summary":"Change Password","description":"Change the current user's password.\n\nHIGH-4: Enhanced password requirements for internal users:\n- Minimum 12 characters\n- Must contain uppercase, lowercase, number, and special character\n- Cannot be a common password\n\nHIGH-5: Rate limited to prevent abuse.","operationId":"change_password_api_internal_auth_change_password_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePasswordRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangePasswordResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/internal/update-grades/":{"post":{"tags":["internal-grading"],"summary":"Update Grades","description":"Process a bulk grading callback from the AI grading worker.\n\nOrder of operations:\n  1. IP allowlist (Depends) — 401 on miss.\n  2. Shared-secret auth (Depends) — 401 on miss.\n  3. Schema-version check — 400 on unknown.\n  4. Attempt lookup with row lock — 404 if missing.\n  5. Per-result idempotent grading (service layer).\n  6. Return aggregate counts.","operationId":"update_grades_api_v1_internal_update_grades__post","parameters":[{"name":"x-grading-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Grading-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GradingCallbackRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GradingCallbackResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/internal/grading/requeue/{queue_id}":{"post":{"tags":["internal-grading-admin"],"summary":"Requeue Queue Entry","description":"Rebuild payload + reset a FAILED grading queue row to PENDING.\n\nUse when the dispatcher has given up on a row (FAILED status) and\nyou want it picked up on the next 30s drain. Rebuilds the payload\nfrom current DB state — so a row that failed because of a stale\npayload (post-schema-fix) recovers on the next dispatch.\n\nReturns the new queue state + summary of what was replaced.","operationId":"requeue_queue_entry_api_v1_internal_grading_requeue__queue_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"queue_id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"description":"nova_grading_queue.id of the FAILED row","title":"Queue Id"},"description":"nova_grading_queue.id of the FAILED row"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequeueResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/internal/grading/queue":{"get":{"tags":["internal-grading-admin"],"summary":"List Grading Queue","description":"List AI-grading-queue rows (newest first) with status + response counts.\n\nAdmin-only: a row's payload holds the student's essay text and audio URLs.","operationId":"list_grading_queue_api_v1_internal_grading_queue_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"pending | in_flight | complete | failed","title":"Status"},"description":"pending | in_flight | complete | failed"},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"assessment_engine | sat_assessment","title":"Source"},"description":"assessment_engine | sat_assessment"},{"name":"exam","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"TOEFL | IELTS | GRE | PTE | SAT","title":"Exam"},"description":"TOEFL | IELTS | GRE | PTE | SAT"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GradingHistoryList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/internal/grading/queue/{queue_id}":{"get":{"tags":["internal-grading-admin"],"summary":"Get Grading Queue Entry","description":"One queue row with the full response list it carries (essay text, audio\nURLs, task types) — the exact payload the grader was/will be sent.","operationId":"get_grading_queue_entry_api_v1_internal_grading_queue__queue_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"queue_id","in":"path","required":true,"schema":{"type":"integer","minimum":1,"title":"Queue Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GradingHistoryDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/internal/impersonation/start":{"post":{"tags":["internal-impersonation"],"summary":"Start Impersonation","description":"Mint a read-only token for viewing the product as ``email``.","operationId":"start_impersonation_api_v1_internal_impersonation_start_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartImpersonationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartImpersonationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/internal/lead-magnets/summary":{"get":{"tags":["internal-lead-magnets"],"summary":"Lead Magnet Summary","description":"Funnel rollup per configured lead magnet.","operationId":"lead_magnet_summary_api_v1_internal_lead_magnets_summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"exam","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter to one exam, e.g. PTE","title":"Exam"},"description":"Filter to one exam, e.g. PTE"},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Attempts created on/after this date","title":"Date From"},"description":"Attempts created on/after this date"},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Attempts created on/before this date","title":"Date To"},"description":"Attempts created on/before this date"},{"name":"exclude_internal","in":"query","required":false,"schema":{"type":"boolean","description":"Hold out staff/test/QA accounts (default on)","default":true,"title":"Exclude Internal"},"description":"Hold out staff/test/QA accounts (default on)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MagnetSummaryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/internal/lead-magnets/leads":{"get":{"tags":["internal-lead-magnets"],"summary":"Lead Magnet Leads","description":"The people who came through a lead magnet, newest first.","operationId":"lead_magnet_leads_api_v1_internal_lead_magnets_leads_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"exam","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exam"}},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"diagnostic | full_mock | section | sample","title":"Kind"},"description":"diagnostic | full_mock | section | sample"},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"not_started | started | submitted | graded","title":"State"},"description":"not_started | started | submitted | graded"},{"name":"converted","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"On a paid tier","title":"Converted"},"description":"On a paid tier"},{"name":"attributed","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Has a known magnet source","title":"Attributed"},"description":"Has a known magnet source"},{"name":"grading","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ai_graded | withheld | in_flight | failed | not_submitted","title":"Grading"},"description":"ai_graded | withheld | in_flight | failed | not_submitted"},{"name":"unlock_paid","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Bought the #1176 grading unlock","title":"Unlock Paid"},"description":"Bought the #1176 grading unlock"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Email or name substring","title":"Search"},"description":"Email or name substring"},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date To"}},{"name":"exclude_internal","in":"query","required":false,"schema":{"type":"boolean","description":"Hold out staff/test/QA accounts (default on)","default":true,"title":"Exclude Internal"},"description":"Hold out staff/test/QA accounts (default on)"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/internal/lead-magnets/timeseries":{"get":{"tags":["internal-lead-magnets"],"summary":"Lead Magnet Timeseries","description":"Daily funnel counts, zero-filled — powers deltas, 7-day average, sparklines.","operationId":"lead_magnet_timeseries_api_v1_internal_lead_magnets_timeseries_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"exam","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter to one exam, e.g. PTE","title":"Exam"},"description":"Filter to one exam, e.g. PTE"},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"diagnostic | full_mock | section | sample","title":"Kind"},"description":"diagnostic | full_mock | section | sample"},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"First day (defaults to 29 days before date_to)","title":"Date From"},"description":"First day (defaults to 29 days before date_to)"},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Last day (defaults to today)","title":"Date To"},"description":"Last day (defaults to today)"},{"name":"exclude_internal","in":"query","required":false,"schema":{"type":"boolean","description":"Hold out staff/test/QA accounts (default on)","default":true,"title":"Exclude Internal"},"description":"Hold out staff/test/QA accounts (default on)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TimeseriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/internal/lead-magnets/revenue":{"get":{"tags":["internal-lead-magnets"],"summary":"Lead Magnet Revenue","description":"Unlock + subscription revenue from the lead-magnet population, per currency.","operationId":"lead_magnet_revenue_api_v1_internal_lead_magnets_revenue_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"exam","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter to one exam, e.g. PTE","title":"Exam"},"description":"Filter to one exam, e.g. PTE"},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Orders paid on/after this date","title":"Date From"},"description":"Orders paid on/after this date"},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Orders paid on/before this date","title":"Date To"},"description":"Orders paid on/before this date"},{"name":"exclude_internal","in":"query","required":false,"schema":{"type":"boolean","description":"Hold out staff/test/QA accounts (default on)","default":true,"title":"Exclude Internal"},"description":"Hold out staff/test/QA accounts (default on)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevenueResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/internal/lead-magnets/sources":{"get":{"tags":["internal-lead-magnets"],"summary":"Lead Magnet Sources","description":"Country / device / entry-page distributions + source-coverage (no UTM).","operationId":"lead_magnet_sources_api_v1_internal_lead_magnets_sources_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"exam","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter to one exam, e.g. PTE","title":"Exam"},"description":"Filter to one exam, e.g. PTE"},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date To"}},{"name":"exclude_internal","in":"query","required":false,"schema":{"type":"boolean","description":"Hold out staff/test/QA accounts (default on)","default":true,"title":"Exclude Internal"},"description":"Hold out staff/test/QA accounts (default on)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourcesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/internal/lead-magnets/crm":{"get":{"tags":["internal-lead-magnets"],"summary":"Lead Magnet Crm","description":"CRM reach: Zoho sync status of lead-magnet leads + their intent-tier spread.","operationId":"lead_magnet_crm_api_v1_internal_lead_magnets_crm_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"exam","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter to one exam, e.g. PTE","title":"Exam"},"description":"Filter to one exam, e.g. PTE"},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date To"}},{"name":"exclude_internal","in":"query","required":false,"schema":{"type":"boolean","description":"Hold out staff/test/QA accounts (default on)","default":true,"title":"Exclude Internal"},"description":"Hold out staff/test/QA accounts (default on)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrmStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/internal/lead-magnets/leads/{attempt_id}/timeline":{"get":{"tags":["internal-lead-magnets"],"summary":"Lead Magnet Lead Timeline","description":"One lead's reconstructed lifecycle for a magnet attempt (lead drawer).","operationId":"lead_magnet_lead_timeline_api_v1_internal_lead_magnets_leads__attempt_id__timeline_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Attempt Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadTimelineResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessment-engine/internal/update-grades/":{"post":{"tags":["assessment-engine-internal"],"summary":"Update Engine Grades","description":"Process a bulk grading callback for an EngineAttempt.","operationId":"update_engine_grades_api_v1_assessment_engine_internal_update_grades__post","parameters":[{"name":"x-grading-api-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Grading-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GradingCallbackRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GradingCallbackResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/questions":{"get":{"tags":["internal-questions"],"summary":"List Questions","description":"List questions with filtering and pagination.\n\nQuestion rows aren't tagged with `exam` directly; they inherit it\nfrom their associated SkillNode. The `exam` filter therefore scopes\ndomain/skill lookups (which resolve via SkillNode) to that exam.","operationId":"list_questions_api_internal_questions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Page Size"}},{"name":"subject_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter by subject_id (math=18, reading_writing=2)","title":"Subject Id"},"description":"Filter by subject_id (math=18, reading_writing=2)"},{"name":"module","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by module name: 'math' or 'reading_writing' (converted to subject_id)","title":"Module"},"description":"Filter by module name: 'math' or 'reading_writing' (converted to subject_id)"},{"name":"domain","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Domain/Topic path from skill tree (maps to topic field)","title":"Domain"},"description":"Domain/Topic path from skill tree (maps to topic field)"},{"name":"skill","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Skill path from skill tree (maps to subtopic field)","title":"Skill"},"description":"Skill path from skill tree (maps to subtopic field)"},{"name":"topic","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topic"}},{"name":"difficulty_label","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Difficulty Label"}},{"name":"usage_context","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Usage Context"}},{"name":"question_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by question type: multiple_choice or grid_in","title":"Question Type"},"description":"Filter by question type: multiple_choice or grid_in"},{"name":"tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated list of tags to filter by (AND logic)","title":"Tags"},"description":"Comma-separated list of tags to filter by (AND logic)"},{"name":"exclude_tags","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Comma-separated list of tags to exclude","title":"Exclude Tags"},"description":"Comma-separated list of tags to exclude"},{"name":"unused_only","in":"query","required":false,"schema":{"type":"boolean","description":"Filter for questions not used in any assessment","default":false,"title":"Unused Only"},"description":"Filter for questions not used in any assessment"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"exam","in":"query","required":false,"schema":{"type":"string","description":"Exam slug (sat/toefl/ielts/gre/pte/det). Defaults to 'sat' for back-compat.","default":"sat","title":"Exam"},"description":"Exam slug (sat/toefl/ielts/gre/pte/det). Defaults to 'sat' for back-compat."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/questions/tags":{"get":{"tags":["internal-questions"],"summary":"Get All Tags","description":"Get all unique tags used across questions, sorted by frequency","operationId":"get_all_tags_api_internal_questions_tags_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/questions/stats/summary":{"get":{"tags":["internal-questions"],"summary":"Get Question Stats","description":"Get question bank statistics","operationId":"get_question_stats_api_internal_questions_stats_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/questions/import":{"post":{"tags":["internal-questions"],"summary":"Import Questions","description":"Import questions from JSON.\n\nSet preview_only=True to validate without saving.\nReturns validation results and any errors.","operationId":"import_questions_api_internal_questions_import_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportQuestionsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/questions/bulk/usage-contexts":{"patch":{"tags":["internal-questions"],"summary":"Bulk Update Usage Contexts","description":"Bulk update usage contexts for multiple questions.\n\nCan add and/or remove contexts from selected questions.\nD21 - Question Pool Isolation compliance.","operationId":"bulk_update_usage_contexts_api_internal_questions_bulk_usage_contexts_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpdateContextsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkUpdateContextsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/questions/{question_id}":{"get":{"tags":["internal-questions"],"summary":"Get Question","description":"Get full question details","operationId":"get_question_api_internal_questions__question_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"question_id","in":"path","required":true,"schema":{"type":"integer","title":"Question Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["internal-questions"],"summary":"Update Question","description":"Update question properties and content.\n\nAll fields are optional - only provided fields will be updated.","operationId":"update_question_api_internal_questions__question_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"question_id","in":"path","required":true,"schema":{"type":"integer","title":"Question Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateQuestionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/questions/{question_id}/usage-contexts":{"patch":{"tags":["internal-questions"],"summary":"Update Usage Contexts","description":"Update question's usage contexts (D21 - Question Pool Isolation)","operationId":"update_usage_contexts_api_internal_questions__question_id__usage_contexts_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"question_id","in":"path","required":true,"schema":{"type":"integer","title":"Question Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUsageContextsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/questions/{question_id}/assessments":{"get":{"tags":["internal-questions"],"summary":"Get Question Assessments","description":"Get all assessments that use this question.\n\nReturns assessment details including type, title, active status,\nand total attempts for understanding question usage.","operationId":"get_question_assessments_api_internal_questions__question_id__assessments_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"question_id","in":"path","required":true,"schema":{"type":"integer","title":"Question Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/questions/import-with-images":{"post":{"tags":["internal-questions"],"summary":"Import Questions With Images","description":"Import questions with associated images.\n\nThis endpoint:\n1. Parses the questions JSON\n2. Uploads provided images to GCS\n3. Replaces local image paths with GCS URLs in question content\n4. Validates and imports questions\n\nImport modes:\n- create_only: Create new questions, skip existing (default)\n- update_only: Update existing questions, skip new ones\n- create_and_update: Create new questions AND update existing ones\n\nImage references in content are detected in these formats:\n- <img src=\"images/filename.png\">\n- <img src=\"./images/filename.png\">\n- [IMAGE: filename.png]\n\nAlready-uploaded images (https://storage...) are left unchanged.","operationId":"import_questions_with_images_api_internal_questions_import_with_images_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_import_questions_with_images_api_internal_questions_import_with_images_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportWithImagesResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/questions/upload-images":{"post":{"tags":["internal-questions"],"summary":"Upload Images Batch","description":"Upload images to GCS in a batch (max 10 images per request).\n\nThis endpoint is designed for uploading images separately before importing questions.\nReturns the GCS URLs for each uploaded image, which can then be used in question content.\n\nUse this endpoint to avoid the 32MB Cloud Run request size limit when importing\nmany questions with images.","operationId":"upload_images_batch_api_internal_questions_upload_images_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_images_batch_api_internal_questions_upload_images_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchUploadImagesResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/questions/check-existing":{"post":{"tags":["internal-questions"],"summary":"Check Existing Questions","description":"Check which questions already exist in the database by source_id.\n\nThis endpoint is used before importing to determine which questions are new\nvs updates. Returns details about existing questions so the UI can display\nappropriate options (create new, update existing, or both).","operationId":"check_existing_questions_api_internal_questions_check_existing_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckExistingQuestionsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckExistingQuestionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/questions/check-images":{"post":{"tags":["internal-questions"],"summary":"Check Images Exist","description":"Check which images already exist in GCS.\n\nThis endpoint checks if images with the given filenames exist in the GCS bucket.\nUse this before uploading images to avoid re-uploading existing images.\n\nThe check uses content-based deduplication, so images are matched by their\nfilename pattern (clean_stem + content_hash + extension).\n\nNote: This endpoint checks for images in the 'question-images' folder by\nlisting blobs with matching filenames. Since we use content-hash-based\nfilenames, exact matches require the same content.","operationId":"check_images_exist_api_internal_questions_check_images_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckImagesRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckImagesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/assessments":{"get":{"tags":["internal-assessments"],"summary":"List Assessments","description":"List all assessments","operationId":"list_assessments_api_internal_assessments_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Page Size"}},{"name":"assessment_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assessment Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__internal__assessments__AssessmentListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["internal-assessments"],"summary":"Create Assessment","description":"Create a new assessment from selected questions, optionally with sections","operationId":"create_assessment_api_internal_assessments_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAssessmentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/assessments/{assessment_id}/proctoring":{"patch":{"tags":["internal-assessments"],"summary":"Set Assessment Proctoring","operationId":"set_assessment_proctoring_api_internal_assessments__assessment_id__proctoring_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"assessment_id","in":"path","required":true,"schema":{"type":"integer","title":"Assessment Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ProctoringConfig"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/assessments/integrity/attempts":{"get":{"tags":["internal-assessments"],"summary":"List Integrity Attempts","description":"List proctored attempts with an integrity summary (#1057g).\n\nFilter by flag + email; sort by risk or attempt time (asc/desc).","operationId":"list_integrity_attempts_api_internal_assessments_integrity_attempts_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"flag","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by flag: green | amber | red","title":"Flag"},"description":"Filter by flag: green | amber | red"},{"name":"email","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by student email (substring)","title":"Email"},"description":"Filter by student email (substring)"},{"name":"sort","in":"query","required":false,"schema":{"type":"string","pattern":"^(risk|time)$","description":"Sort by risk or attempt time","default":"risk","title":"Sort"},"description":"Sort by risk or attempt time"},{"name":"order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","description":"Sort direction","default":"desc","title":"Order"},"description":"Sort direction"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrityAttemptsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/assessments/integrity/attempts/{attempt_id}":{"get":{"tags":["internal-assessments"],"summary":"Get Integrity Attempt","description":"A single attempt's integrity summary + event timeline (#1057g, #1063g).","operationId":"get_integrity_attempt_api_internal_assessments_integrity_attempts__attempt_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Attempt Id"}},{"name":"source","in":"query","required":false,"schema":{"type":"string","pattern":"^(legacy|engine)$","description":"Attempt stack","default":"legacy","title":"Source"},"description":"Attempt stack"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/assessments/{assessment_id}":{"get":{"tags":["internal-assessments"],"summary":"Get Assessment","description":"Get assessment details with questions and sections","operationId":"get_assessment_api_internal_assessments__assessment_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"assessment_id","in":"path","required":true,"schema":{"type":"integer","title":"Assessment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["internal-assessments"],"summary":"Delete Assessment","description":"Delete an assessment (only if no attempts exist)","operationId":"delete_assessment_api_internal_assessments__assessment_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"assessment_id","in":"path","required":true,"schema":{"type":"integer","title":"Assessment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["internal-assessments"],"summary":"Update Assessment","description":"Update an assessment's metadata and/or questions.\n\nVersioning rules:\n- If assessment has NO attempts: direct modification allowed\n- If assessment HAS attempts:\n  - Metadata/timing changes: apply directly, increment version\n  - Section/question changes: create new assessment version (preserves historical data)","operationId":"update_assessment_api_internal_assessments__assessment_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"assessment_id","in":"path","required":true,"schema":{"type":"integer","title":"Assessment Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAssessmentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/assessments/{assessment_id}/activate":{"patch":{"tags":["internal-assessments"],"summary":"Activate Assessment","description":"Activate an assessment (make it available to students)","operationId":"activate_assessment_api_internal_assessments__assessment_id__activate_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"assessment_id","in":"path","required":true,"schema":{"type":"integer","title":"Assessment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/assessments/{assessment_id}/deactivate":{"patch":{"tags":["internal-assessments"],"summary":"Deactivate Assessment","description":"Deactivate an assessment (hide from students)","operationId":"deactivate_assessment_api_internal_assessments__assessment_id__deactivate_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"assessment_id","in":"path","required":true,"schema":{"type":"integer","title":"Assessment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/assessments/attempts/{attempt_id}/results":{"get":{"tags":["internal-assessments"],"summary":"Get Attempt Results Internal","description":"Get assessment attempt results for any user.\n\nThis endpoint allows internal users (admins, instructors) to view\nmock test results for any student. Used for feedback session preparation.\n\nIssue #63: Internal users cannot view other users' mock test results","operationId":"get_attempt_results_internal_api_internal_assessments_attempts__attempt_id__results_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Attempt Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/assessments/attempts/{attempt_id}/ai-summary":{"get":{"tags":["internal-assessments"],"summary":"Get Attempt Ai Summary Internal","description":"The post-mock LLM analysis the student saw (focus rationale + per-subject\ninsights), surfaced for the instructor mock review.\n\n``generated=False`` when the student hasn't completed the mock-review\nreflection that triggers the LLM analysis — there is simply nothing to show\nyet (also the case for an unknown attempt id, which has no directive).\nRead-only; never advances the student's study plan.","operationId":"get_attempt_ai_summary_internal_api_internal_assessments_attempts__attempt_id__ai_summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Attempt Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/assessments/attempts/{attempt_id}/mistake-review":{"get":{"tags":["internal-assessments"],"summary":"Get Attempt Mistake Review Internal","description":"The student's post-mock mistake review for one attempt (#1136 stream A).\n\nWhat the student actually did during the review: the mistake category they\nSELECTED per wrong question, the reason they TYPED, or a soft-skip (\"I don't\nknow\"). Empty list when they haven't reviewed yet.\n\nRead-only; never mutates. Covers both the attempt-mode and plan-mode\nreflection anchors (see `list_reflections_for_attempt_staff`).\n\n`reason_text` is student free-text — bleach-cleaned at write and rendered\nescaped by React. Do NOT render it as HTML.","operationId":"get_attempt_mistake_review_internal_api_internal_assessments_attempts__attempt_id__mistake_review_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Attempt Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/knowledge-graph/available-exams":{"get":{"tags":["Knowledge Graph"],"summary":"Get Available Exams","operationId":"get_available_exams_api_internal_knowledge_graph_available_exams_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/knowledge-graph":{"get":{"tags":["Knowledge Graph"],"summary":"List Skill Nodes","operationId":"list_skill_nodes_api_internal_knowledge_graph_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"exam","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by exam (SAT, GRE, etc.)","title":"Exam"},"description":"Filter by exam (SAT, GRE, etc.)"},{"name":"module","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by module (math, reading_writing)","title":"Module"},"description":"Filter by module (math, reading_writing)"},{"name":"level","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter by level (0=exam, 1=section, 2=domain, 3=skill)","title":"Level"},"description":"Filter by level (0=exam, 1=section, 2=domain, 3=skill)"},{"name":"parent_path","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Get children of this path","title":"Parent Path"},"description":"Get children of this path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillNodeListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/knowledge-graph/tree":{"get":{"tags":["Knowledge Graph"],"summary":"Get Skill Tree","operationId":"get_skill_tree_api_internal_knowledge_graph_tree_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"exam","in":"query","required":false,"schema":{"type":"string","description":"Exam to get tree for","default":"SAT","title":"Exam"},"description":"Exam to get tree for"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__internal__knowledge_graph__SkillTreeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/knowledge-graph/descendants/{path}":{"get":{"tags":["Knowledge Graph"],"summary":"Get Descendants","operationId":"get_descendants_api_internal_knowledge_graph_descendants__path__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}},{"name":"include_self","in":"query","required":false,"schema":{"type":"boolean","description":"Include the node itself","default":false,"title":"Include Self"},"description":"Include the node itself"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillNodeListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/knowledge-graph/ancestors/{path}":{"get":{"tags":["Knowledge Graph"],"summary":"Get Ancestors","operationId":"get_ancestors_api_internal_knowledge_graph_ancestors__path__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"path","in":"path","required":true,"schema":{"type":"string","title":"Path"}},{"name":"include_self","in":"query","required":false,"schema":{"type":"boolean","description":"Include the node itself","default":false,"title":"Include Self"},"description":"Include the node itself"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillNodeListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/knowledge-graph/leaf-nodes":{"get":{"tags":["Knowledge Graph"],"summary":"Get Leaf Nodes","operationId":"get_leaf_nodes_api_internal_knowledge_graph_leaf_nodes_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"exam","in":"query","required":false,"schema":{"type":"string","description":"Exam to get leaf nodes for","default":"SAT","title":"Exam"},"description":"Exam to get leaf nodes for"},{"name":"module","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by module","title":"Module"},"description":"Filter by module"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillNodeListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/knowledge-graph/{node_id}":{"get":{"tags":["Knowledge Graph"],"summary":"Get Skill Node","operationId":"get_skill_node_api_internal_knowledge_graph__node_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"integer","title":"Node Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillNodeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Knowledge Graph"],"summary":"Update Skill Node","description":"Update a concept's editable fields.\n\nEditable: title, description, position, contribution_to_parent.\nRead-only (system-managed): path, code, exam, module, parent_id, level, num_children.","operationId":"update_skill_node_api_internal_knowledge_graph__node_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"integer","title":"Node Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillNodeUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillNodeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/knowledge-graph/{node_id}/prerequisites":{"get":{"tags":["Knowledge Graph"],"summary":"List Prerequisites","description":"Direct pre-req edges. Transitive ancestors are implied — the graph\nwalker chases the chain, so callers should add only direct edges.","operationId":"list_prerequisites_api_internal_knowledge_graph__node_id__prerequisites_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"integer","title":"Node Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PrerequisiteResponse"},"title":"Response List Prerequisites Api Internal Knowledge Graph  Node Id  Prerequisites Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Knowledge Graph"],"summary":"Add Prerequisite","description":"Add a direct pre-req edge.\n\nA node can have multiple pre-reqs. Don't add transitive ancestors —\nthe graph walker chases the chain. The DB-level cycle trigger blocks\nloops; the service layer wraps the trigger error into a domain\nexception with concept names that we surface as a 400.","operationId":"add_prerequisite_api_internal_knowledge_graph__node_id__prerequisites_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"integer","title":"Node Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrerequisiteCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PrerequisiteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/knowledge-graph/{node_id}/prerequisites/{prereq_concept_id}":{"delete":{"tags":["Knowledge Graph"],"summary":"Delete Prerequisite","operationId":"delete_prerequisite_api_internal_knowledge_graph__node_id__prerequisites__prereq_concept_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"node_id","in":"path","required":true,"schema":{"type":"integer","title":"Node Id"}},{"name":"prereq_concept_id","in":"path","required":true,"schema":{"type":"integer","title":"Prereq Concept Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/lessons":{"get":{"tags":["Lessons"],"summary":"List Lessons","description":"List lessons with optional filtering. Lessons are scoped to the\ngiven exam via skill_node.exam (lessons inherit their exam from the\nskill node they attach to). Defaults to 'sat' for backward compat.","operationId":"list_lessons_api_internal_lessons_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"module","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by module (math, reading_writing)","title":"Module"},"description":"Filter by module (math, reading_writing)"},{"name":"topic","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by topic","title":"Topic"},"description":"Filter by topic"},{"name":"skill_node_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter by skill node ID","title":"Skill Node Id"},"description":"Filter by skill node ID"},{"name":"content_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by content type","title":"Content Type"},"description":"Filter by content type"},{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by active status (#594)","title":"Is Active"},"description":"Filter by active status (#594)"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search in title or description","title":"Search"},"description":"Search in title or description"},{"name":"exam","in":"query","required":false,"schema":{"type":"string","description":"Exam slug (sat/toefl/ielts/gre/pte/det)","default":"sat","title":"Exam"},"description":"Exam slug (sat/toefl/ielts/gre/pte/det)"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Lessons"],"summary":"Create Lesson","description":"Create a new lesson.","operationId":"create_lesson_api_internal_lessons_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonCreateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/lessons/subjects":{"get":{"tags":["Lessons"],"summary":"Get Lesson Subjects","description":"Get available subjects (level 1 skill nodes) for the given exam.\n\nDefaults to 'sat' to preserve byte-identical SAT admin behavior when\nthe param is omitted.","operationId":"get_lesson_subjects_api_internal_lessons_subjects_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"exam","in":"query","required":false,"schema":{"type":"string","description":"Exam slug (sat/toefl/ielts/gre/pte/det)","default":"sat","title":"Exam"},"description":"Exam slug (sat/toefl/ielts/gre/pte/det)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/lessons/topics":{"get":{"tags":["Lessons"],"summary":"Get Lesson Topics","description":"Get available topics (level 2 skill nodes) for a given subject + exam.","operationId":"get_lesson_topics_api_internal_lessons_topics_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"subject","in":"query","required":true,"schema":{"type":"string","description":"Subject (math/reading_writing)","title":"Subject"},"description":"Subject (math/reading_writing)"},{"name":"exam","in":"query","required":false,"schema":{"type":"string","description":"Exam slug (sat/toefl/ielts/gre/pte/det)","default":"sat","title":"Exam"},"description":"Exam slug (sat/toefl/ielts/gre/pte/det)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/lessons/subtopics":{"get":{"tags":["Lessons"],"summary":"Get Lesson Subtopics","description":"Get available subtopics (level 3 skill nodes) for a given subject + topic + exam.","operationId":"get_lesson_subtopics_api_internal_lessons_subtopics_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"subject","in":"query","required":true,"schema":{"type":"string","description":"Subject (math/reading_writing)","title":"Subject"},"description":"Subject (math/reading_writing)"},{"name":"topic","in":"query","required":true,"schema":{"type":"string","description":"Topic name","title":"Topic"},"description":"Topic name"},{"name":"exam","in":"query","required":false,"schema":{"type":"string","description":"Exam slug (sat/toefl/ielts/gre/pte/det)","default":"sat","title":"Exam"},"description":"Exam slug (sat/toefl/ielts/gre/pte/det)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/lessons/skill-nodes":{"get":{"tags":["Lessons"],"summary":"Get Lesson Skill Nodes","description":"#641: list L3 SkillNodes for a subject as id-keyed dropdown options.\n\nPowers the lesson edit form's Skill dropdown. Returned `value` is the\nSkillNode id (the FK target), distinguishing this from the legacy\n`/subtopics` endpoint which returns titles for free-text matching.\nIncludes the parent L2 title as `domain` so the form can render a\nread-only \"Domain: ...\" context label.","operationId":"get_lesson_skill_nodes_api_internal_lessons_skill_nodes_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"subject","in":"query","required":true,"schema":{"type":"string","description":"Subject (math/reading_writing)","title":"Subject"},"description":"Subject (math/reading_writing)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/lessons/upload":{"post":{"tags":["Lessons"],"summary":"Upload Lesson File","description":"Upload a file for lesson content (video or interactive).\nReturns the file URL to use in lesson creation.","operationId":"upload_lesson_file_api_internal_lessons_upload_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"content_type","in":"query","required":true,"schema":{"type":"string","description":"Content type: video or interactive","title":"Content Type"},"description":"Content type: video or interactive"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_lesson_file_api_internal_lessons_upload_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/lessons/import":{"post":{"tags":["Lessons"],"summary":"Import Lessons","description":"Import lessons from JSON data.\nSimilar to question import functionality.","operationId":"import_lessons_api_internal_lessons_import_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonImportRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonImportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/lessons/import-file":{"post":{"tags":["Lessons"],"summary":"Import Lessons From File","description":"Import lessons from a JSON file upload.","operationId":"import_lessons_from_file_api_internal_lessons_import_file_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"preview_only","in":"query","required":false,"schema":{"type":"boolean","description":"Preview only without importing","default":false,"title":"Preview Only"},"description":"Preview only without importing"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_import_lessons_from_file_api_internal_lessons_import_file_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonImportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/lessons/{lesson_id}":{"get":{"tags":["Lessons"],"summary":"Get Lesson","description":"Get a single lesson by ID.","operationId":"get_lesson_api_internal_lessons__lesson_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lesson_id","in":"path","required":true,"schema":{"type":"integer","title":"Lesson Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Lessons"],"summary":"Update Lesson","description":"Update an existing lesson.","operationId":"update_lesson_api_internal_lessons__lesson_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lesson_id","in":"path","required":true,"schema":{"type":"integer","title":"Lesson Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Lessons"],"summary":"Delete Lesson","description":"Delete a lesson.","operationId":"delete_lesson_api_internal_lessons__lesson_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"lesson_id","in":"path","required":true,"schema":{"type":"integer","title":"Lesson Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/lead-magnet-config":{"get":{"tags":["internal-lead-magnet-config"],"summary":"List Lead Magnet Configs","operationId":"list_lead_magnet_configs_api_internal_lead_magnet_config_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"exam","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exam"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LeadMagnetConfigItem"},"title":"Response List Lead Magnet Configs Api Internal Lead Magnet Config Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["internal-lead-magnet-config"],"summary":"Create Lead Magnet Config","operationId":"create_lead_magnet_config_api_internal_lead_magnet_config_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadMagnetConfigCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadMagnetConfigItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/lead-magnet-config/assessments":{"get":{"tags":["internal-lead-magnet-config"],"summary":"List Exam Assessments","description":"Active engine assessments for an exam — populates the form's assessment picker.","operationId":"list_exam_assessments_api_internal_lead_magnet_config_assessments_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"exam","in":"query","required":true,"schema":{"type":"string","description":"EngineExamType slug, e.g. TOEFL","title":"Exam"},"description":"EngineExamType slug, e.g. TOEFL"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AssessmentOption"},"title":"Response List Exam Assessments Api Internal Lead Magnet Config Assessments Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/lead-magnet-config/{config_id}":{"patch":{"tags":["internal-lead-magnet-config"],"summary":"Update Lead Magnet Config","operationId":"update_lead_magnet_config_api_internal_lead_magnet_config__config_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"config_id","in":"path","required":true,"schema":{"type":"integer","title":"Config Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadMagnetConfigUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadMagnetConfigItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["internal-lead-magnet-config"],"summary":"Delete Lead Magnet Config","operationId":"delete_lead_magnet_config_api_internal_lead_magnet_config__config_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"config_id","in":"path","required":true,"schema":{"type":"integer","title":"Config Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/dashboard/stats":{"get":{"tags":["internal-dashboard"],"summary":"Get Dashboard Stats","description":"Get dashboard statistics for internal users.\n\nReturns counts for:\n- Total assessments\n- Total lessons\n- Total study plan tasks\n- Total internal users\n- Total external users (non-guest users)\n\nRequires internal user authentication.","operationId":"get_dashboard_stats_api_internal_dashboard_stats_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardStatsResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/dashboard/home-summary":{"get":{"tags":["internal-dashboard"],"summary":"Get Home Summary","description":"Aggregate counts for the role-aware internal Home (#1020d).\n\nThin controller — the counts are computed in internal_dashboard_service.\nRequires internal user authentication.","operationId":"get_home_summary_api_internal_dashboard_home_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HomeSummaryResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/engine-bank/summary":{"get":{"tags":["internal-engine-bank"],"summary":"Engine Bank Summary","description":"Totals for the exam tabs + source-system chips.","operationId":"engine_bank_summary_api_internal_engine_bank_summary_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"latest_only","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Latest Only"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EngineBankSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/engine-bank":{"get":{"tags":["internal-engine-bank"],"summary":"List Engine Bank","operationId":"list_engine_bank_api_internal_engine_bank_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"exam","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"SAT / TOEFL / PTE","title":"Exam"},"description":"SAT / TOEFL / PTE"},{"name":"question_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Question Type"}},{"name":"source_system","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source System"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"match question_text or source_id_ext","title":"Search"},"description":"match question_text or source_id_ext"},{"name":"latest_only","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Latest Only"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EngineBankListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/engine-bank/group/{group_id}":{"get":{"tags":["internal-engine-bank"],"summary":"Get Engine Bank Group","description":"A passage/stimulus group + all its questions (the Studio-style single entry).","operationId":"get_engine_bank_group_api_internal_engine_bank_group__group_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"integer","title":"Group Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EngineBankGroupDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/engine-bank/{question_id}":{"get":{"tags":["internal-engine-bank"],"summary":"Get Engine Bank Question","operationId":"get_engine_bank_question_api_internal_engine_bank__question_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"question_id","in":"path","required":true,"schema":{"type":"integer","title":"Question Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EngineBankDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/content/info":{"get":{"tags":["internal-content"],"summary":"Get Content Info","description":"Get content upload configuration info.\n\nReturns allowed file types, size limits, and upload paths.","operationId":"get_content_info_api_internal_content_info_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentInfo"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/content/upload-image":{"post":{"tags":["internal-content"],"summary":"Upload Image","description":"Upload a single image to GCS.\n\nThe image is validated for type and size, then uploaded with a unique\ncontent-hash based filename for deduplication.\n\nArgs:\n    file: Image file to upload\n    folder: Target folder in GCS bucket (default: sat/images)\n\nReturns:\n    ImageUploadResponse with filename and public URL\n\nRaises:\n    400: Invalid file type or size\n    500: Upload failed","operationId":"upload_image_api_internal_content_upload_image_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_image_api_internal_content_upload_image_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageUploadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/content/upload-images":{"post":{"tags":["internal-content"],"summary":"Upload Images Batch","description":"Upload multiple images to GCS in batch.\n\nEach image is validated and uploaded independently. Failed uploads\ndon't affect other images in the batch.\n\nArgs:\n    files: List of image files to upload\n    folder: Target folder in GCS bucket (default: sat/images)\n\nReturns:\n    BatchImageUploadResponse with results for each file","operationId":"upload_images_batch_api_internal_content_upload_images_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_images_batch_api_internal_content_upload_images_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchImageUploadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/content/image/{folder}/{filename}":{"delete":{"tags":["internal-content"],"summary":"Delete Image","description":"Delete an image from GCS.\n\nAdmin only - use with caution as this may break existing content.\n\nArgs:\n    folder: Folder path (e.g., \"sat/images\")\n    filename: Image filename\n\nReturns:\n    Success message","operationId":"delete_image_api_internal_content_image__folder___filename__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"folder","in":"path","required":true,"schema":{"type":"string","title":"Folder"}},{"name":"filename","in":"path","required":true,"schema":{"type":"string","title":"Filename"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/exclusive/inquiries":{"get":{"tags":["internal-exclusive"],"summary":"List Inquiries Endpoint","description":"Paginated list of inquiries, newest first. Optional status filter.","operationId":"list_inquiries_endpoint_api_internal_exclusive_inquiries_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ExclusiveInquiryStatus"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExclusiveInquiryAdminItem"},"title":"Response List Inquiries Endpoint Api Internal Exclusive Inquiries Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/exclusive/inquiries/{inquiry_id}":{"get":{"tags":["internal-exclusive"],"summary":"Get Inquiry Endpoint","operationId":"get_inquiry_endpoint_api_internal_exclusive_inquiries__inquiry_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"inquiry_id","in":"path","required":true,"schema":{"type":"integer","title":"Inquiry Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExclusiveInquiryAdminItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["internal-exclusive"],"summary":"Update Inquiry Endpoint","description":"Status / admin-notes update. Admin or sales role only.","operationId":"update_inquiry_endpoint_api_internal_exclusive_inquiries__inquiry_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"inquiry_id","in":"path","required":true,"schema":{"type":"integer","title":"Inquiry Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExclusiveInquiryAdminUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExclusiveInquiryAdminItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/marketing/event-mappings":{"get":{"tags":["internal-event-mappings"],"summary":"List Event Mappings","operationId":"list_event_mappings_api_internal_marketing_event_mappings_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"producer","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Producer"}},{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},{"name":"crm_child_module","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Crm Child Module"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EventMappingItem"},"title":"Response List Event Mappings Api Internal Marketing Event Mappings Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["internal-event-mappings"],"summary":"Create Event Mapping","operationId":"create_event_mapping_api_internal_marketing_event_mappings_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventMappingCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventMappingItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/marketing/event-mappings/registry":{"get":{"tags":["internal-event-mappings"],"summary":"Get Crm Field Registry","description":"Prod-sourced CRM field registry for the UI's dropdown-based field\nmapper (#692d): per-module writable api_names + multiselect set +\npicklist values, plus the known source-path suggestions per producer.\n\n#1212 S1 (2026-07-29) regenerated ``crm_canonical_fields.json`` from the\nlive prod org (``org: prod``, 355 Contacts fields), replacing the\n2026-06-11 **sandbox** snapshot this docstring used to advertise. That\nsnapshot misrepresented prod in both directions — it hid real missing\nfields and invented one that was never absent — so \"sandbox-verified\" was\nnot just stale wording, it named the wrong source of truth.\n\nMUST stay registered before the /{mapping_id} route (path precedence).","operationId":"get_crm_field_registry_api_internal_marketing_event_mappings_registry_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Crm Field Registry Api Internal Marketing Event Mappings Registry Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/marketing/event-mappings/emission-stats":{"get":{"tags":["internal-event-mappings"],"summary":"List Emission Stats","description":"Per-mapping \"what actually emitted recently\" (#1219 slice 2) for\nevery mapping in one shot — the list page's orphan badges. Aggregated in\ntwo queries total regardless of mapping count (see\nevent_mapping_service._collect_emission_rows), not N+1 per row.\nMUST stay registered before the /{mapping_id} route (path precedence).","operationId":"list_emission_stats_api_internal_marketing_event_mappings_emission_stats_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"window_days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Window Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EmissionStatsResponse"},"title":"Response List Emission Stats Api Internal Marketing Event Mappings Emission Stats Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/marketing/event-mappings/{mapping_id}":{"get":{"tags":["internal-event-mappings"],"summary":"Get Event Mapping","operationId":"get_event_mapping_api_internal_marketing_event_mappings__mapping_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mapping_id","in":"path","required":true,"schema":{"type":"integer","title":"Mapping Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventMappingItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["internal-event-mappings"],"summary":"Update Event Mapping","operationId":"update_event_mapping_api_internal_marketing_event_mappings__mapping_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mapping_id","in":"path","required":true,"schema":{"type":"integer","title":"Mapping Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventMappingUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventMappingItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/marketing/event-mappings/{mapping_id}/history":{"get":{"tags":["internal-event-mappings"],"summary":"Event Mapping History","operationId":"event_mapping_history_api_internal_marketing_event_mappings__mapping_id__history_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mapping_id","in":"path","required":true,"schema":{"type":"integer","title":"Mapping Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EventMappingAuditItem"},"title":"Response Event Mapping History Api Internal Marketing Event Mappings  Mapping Id  History Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/marketing/event-mappings/{mapping_id}/emission-stats":{"get":{"tags":["internal-event-mappings"],"summary":"Get Mapping Emission Stats","description":"Single-mapping emission stats (#1219 slice 2) — the detail page's\ndeclared-vs-emitted panel + orphan badge.","operationId":"get_mapping_emission_stats_api_internal_marketing_event_mappings__mapping_id__emission_stats_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mapping_id","in":"path","required":true,"schema":{"type":"integer","title":"Mapping Id"}},{"name":"window_days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Window Days"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmissionStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/marketing/event-mappings/{mapping_id}/rollback":{"post":{"tags":["internal-event-mappings"],"summary":"Rollback Event Mapping","operationId":"rollback_event_mapping_api_internal_marketing_event_mappings__mapping_id__rollback_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"mapping_id","in":"path","required":true,"schema":{"type":"integer","title":"Mapping Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RollbackRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventMappingItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/marketing/event-mappings/queue-rows/failed":{"get":{"tags":["internal-event-mappings"],"summary":"List Failed Queue Rows","description":"Failed outbound queue rows — the operator's mapping_not_found triage\nlist (#692c). Newest first; error_message says why each row failed.","operationId":"list_failed_queue_rows_api_internal_marketing_event_mappings_queue_rows_failed_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response List Failed Queue Rows Api Internal Marketing Event Mappings Queue Rows Failed Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/marketing/event-mappings/queue-rows/skipped":{"get":{"tags":["internal-event-mappings"],"summary":"List Skipped Queue Rows","description":"Skipped outbound queue rows (#1211 slice 5) — sibling to the FAILED\nlisting above, same shape, so the console can drive one triage table off\na status toggle instead of a separate page. Without this, #1211's fix\n(routing a dropped child-module write to STATUS_SKIPPED instead of a\nfalse STATUS_SYNCED) would improve visibility in the DB only — there was\nno way for an operator to even find these rows, let alone replay them.\n\n``error_message`` carries the skip reason — e.g.\n``\"no_crm_contact_email: child_module=Form_Submissions\"`` for a #1211\nchild-drop, or ``\"mapping_inactive: <event_key>\"`` for an\noperator-deactivated mapping. Not every skipped row here is a bug (a\ndeactivated mapping is working as intended); the listing doesn't try to\ndistinguish — that's what ``error_message`` and ``dispatch_payload`` are\nfor. ``zoho_crm_write_disabled`` skips are marked SYNCED, not SKIPPED\n(see zoho_crm.py), so they never appear here — that's the deliberate\nscope boundary from #1211's fix, not an oversight.","operationId":"list_skipped_queue_rows_api_internal_marketing_event_mappings_queue_rows_skipped_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true},"title":"Response List Skipped Queue Rows Api Internal Marketing Event Mappings Queue Rows Skipped Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/marketing/event-mappings/queue-rows/{queue_id}/replay":{"post":{"tags":["internal-event-mappings"],"summary":"Replay Queue Row","description":"Reset a FAILED or SKIPPED queue row to pending for re-dispatch (#692c;\nwidened to SKIPPED by #1211 slice 5) — the second half of the\ndetect-the-drop → fix-the-cause → replay loop. Resets attempts so the row\ngets a full retry budget.\n\nSKIPPED is deliberately NOT restricted to rows carrying #1211's\n``child_skipped`` marker. Every write this dispatches is idempotent\n(Contact upsert by Email dedup, child upsert by ``nova_event_key``), so a\nreplay that changes nothing downstream is harmless — the same risk the\nFAILED path has always accepted (replaying a ``mapping_not_found`` row\nbefore the mapping exists just fails again). Gating on one sink's\ndispatch_payload key would also couple this shared admin action to\nzoho_crm's payload shape specifically. The response never claims the\nunderlying cause is fixed — it reports the row's PRIOR status alongside\nthe fact that it's back in the queue (``status: \"pending\"``); whether the\nreplay actually lands synced is only known once the worker dispatches it\nagain. A row replayed before its cause resolved (mapping still inactive,\ncontact still emailless) will legitimately skip again — that's correct\nbehavior, not a bug, and this endpoint doesn't pretend otherwise.","operationId":"replay_queue_row_api_internal_marketing_event_mappings_queue_rows__queue_id__replay_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"queue_id","in":"path","required":true,"schema":{"type":"integer","title":"Queue Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Replay Queue Row Api Internal Marketing Event Mappings Queue Rows  Queue Id  Replay Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/marketing/event-mappings/validate":{"post":{"tags":["internal-event-mappings"],"summary":"Validate Event Mapping","description":"Pure validation — used by the UI on blur/save without persisting.","operationId":"validate_event_mapping_api_internal_marketing_event_mappings_validate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventMappingCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/marketing/event-mappings/dry-run":{"post":{"tags":["internal-event-mappings"],"summary":"Dry Run Event Mapping","description":"Render the would-be CRM upsert + child record + GA4 event for a sample\npayload WITHOUT enqueueing anything (operator pre-flight).","operationId":"dry_run_event_mapping_api_internal_marketing_event_mappings_dry_run_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__event_mapping__DryRunRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__event_mapping__DryRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/marketing/google-sheets-targets":{"get":{"tags":["internal-google-sheets-targets"],"summary":"List Targets","operationId":"list_targets_api_internal_marketing_google_sheets_targets_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"env","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Env"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GoogleSheetsTargetItem"},"title":"Response List Targets Api Internal Marketing Google Sheets Targets Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["internal-google-sheets-targets"],"summary":"Create Target","operationId":"create_target_api_internal_marketing_google_sheets_targets_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleSheetsTargetCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleSheetsTargetItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/marketing/google-sheets-targets/{target_id}":{"patch":{"tags":["internal-google-sheets-targets"],"summary":"Update Target","operationId":"update_target_api_internal_marketing_google_sheets_targets__target_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"target_id","in":"path","required":true,"schema":{"type":"integer","title":"Target Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleSheetsTargetUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GoogleSheetsTargetItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/olympiads":{"get":{"tags":["internal-olympiads"],"summary":"List Events","operationId":"list_events_api_internal_olympiads_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/OlympiadEventItem"},"type":"array","title":"Response List Events Api Internal Olympiads Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/olympiads/{event_id}/pricing-tiers":{"get":{"tags":["internal-olympiads"],"summary":"List Pricing Tiers","operationId":"list_pricing_tiers_api_internal_olympiads__event_id__pricing_tiers_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"integer","title":"Event Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OlympiadPricingTierItem"},"title":"Response List Pricing Tiers Api Internal Olympiads  Event Id  Pricing Tiers Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["internal-olympiads"],"summary":"Create Pricing Tier","operationId":"create_pricing_tier_api_internal_olympiads__event_id__pricing_tiers_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"integer","title":"Event Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OlympiadPricingTierCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OlympiadPricingTierItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/olympiads/pricing-tiers/{tier_id}":{"patch":{"tags":["internal-olympiads"],"summary":"Update Pricing Tier","operationId":"update_pricing_tier_api_internal_olympiads_pricing_tiers__tier_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"tier_id","in":"path","required":true,"schema":{"type":"integer","title":"Tier Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OlympiadPricingTierUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OlympiadPricingTierItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/marketing/csv-imports":{"get":{"tags":["internal-csv-imports"],"summary":"List Imports","operationId":"list_imports_api_internal_marketing_csv_imports_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CsvImportItem"},"title":"Response List Imports Api Internal Marketing Csv Imports Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["internal-csv-imports"],"summary":"Upload Import","operationId":"upload_import_api_internal_marketing_csv_imports_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_import_api_internal_marketing_csv_imports_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CsvImportItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/marketing/csv-imports/{import_id}":{"get":{"tags":["internal-csv-imports"],"summary":"Get Import","operationId":"get_import_api_internal_marketing_csv_imports__import_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"import_id","in":"path","required":true,"schema":{"type":"integer","title":"Import Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CsvImportItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["internal-csv-imports"],"summary":"Delete Import","operationId":"delete_import_api_internal_marketing_csv_imports__import_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"import_id","in":"path","required":true,"schema":{"type":"integer","title":"Import Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/marketing/csv-imports/{import_id}/rows":{"get":{"tags":["internal-csv-imports"],"summary":"List Import Rows","operationId":"list_import_rows_api_internal_marketing_csv_imports__import_id__rows_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"import_id","in":"path","required":true,"schema":{"type":"integer","title":"Import Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CsvImportRowsPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/marketing/csv-imports/{import_id}/dry-run":{"post":{"tags":["internal-csv-imports"],"summary":"Dry Run Import","operationId":"dry_run_import_api_internal_marketing_csv_imports__import_id__dry_run_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"import_id","in":"path","required":true,"schema":{"type":"integer","title":"Import Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__internal__marketing_csv_imports__DryRunRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__internal__marketing_csv_imports__DryRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/marketing/csv-imports/{import_id}/commit":{"post":{"tags":["internal-csv-imports"],"summary":"Commit Import","operationId":"commit_import_api_internal_marketing_csv_imports__import_id__commit_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"import_id","in":"path","required":true,"schema":{"type":"integer","title":"Import Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CsvImportItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/marketing/csv-imports/{import_id}/progress":{"get":{"tags":["internal-csv-imports"],"summary":"Import Progress","operationId":"import_progress_api_internal_marketing_csv_imports__import_id__progress_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"import_id","in":"path","required":true,"schema":{"type":"integer","title":"Import Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProgressResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/marketing/csv-imports/{import_id}/rollback":{"post":{"tags":["internal-csv-imports"],"summary":"Rollback Import","operationId":"rollback_import_api_internal_marketing_csv_imports__import_id__rollback_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"import_id","in":"path","required":true,"schema":{"type":"integer","title":"Import Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RollbackResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/commerce/email-templates":{"get":{"tags":["internal-email-templates"],"summary":"List Email Templates","operationId":"list_email_templates_api_internal_commerce_email_templates_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Template Type"}},{"name":"is_active","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EmailTemplateItem"},"title":"Response List Email Templates Api Internal Commerce Email Templates Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["internal-email-templates"],"summary":"Create Email Template","operationId":"create_email_template_api_internal_commerce_email_templates_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/commerce/email-templates/merge-fields":{"get":{"tags":["internal-email-templates"],"summary":"Get Merge Field Registry","description":"Merge-field registry the template editor's picker consumes.\n\nPer template type: the locked field sets + save-time hints + built-in\nfallback, and — for event_triggered only — the semantic merge-field catalog\n(#1219). See ``_registry_entry`` for the two shapes.\n\nMUST stay registered before /{template_id} (path precedence).","operationId":"get_merge_field_registry_api_internal_commerce_email_templates_merge_fields_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Get Merge Field Registry Api Internal Commerce Email Templates Merge Fields Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/commerce/email-templates/validate":{"post":{"tags":["internal-email-templates"],"summary":"Validate Email Template","description":"Pure validation — used by the UI on blur/save without persisting.","operationId":"validate_email_template_api_internal_commerce_email_templates_validate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/commerce/email-templates/preview":{"post":{"tags":["internal-email-templates"],"summary":"Preview Email Template","description":"Render the would-be email with sample order data WITHOUT sending —\nthe editor's live preview.","operationId":"preview_email_template_api_internal_commerce_email_templates_preview_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/commerce/email-templates/{template_id}":{"get":{"tags":["internal-email-templates"],"summary":"Get Email Template","operationId":"get_email_template_api_internal_commerce_email_templates__template_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"integer","title":"Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["internal-email-templates"],"summary":"Update Email Template","operationId":"update_email_template_api_internal_commerce_email_templates__template_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"integer","title":"Template Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/commerce/email-templates/{template_id}/history":{"get":{"tags":["internal-email-templates"],"summary":"Email Template History","operationId":"email_template_history_api_internal_commerce_email_templates__template_id__history_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"integer","title":"Template Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EmailTemplateAuditItem"},"title":"Response Email Template History Api Internal Commerce Email Templates  Template Id  History Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/commerce/email-templates/{template_id}/rollback":{"post":{"tags":["internal-email-templates"],"summary":"Rollback Email Template","operationId":"rollback_email_template_api_internal_commerce_email_templates__template_id__rollback_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"integer","title":"Template Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RollbackRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/commerce/email-templates/{template_id}/send-test":{"post":{"tags":["internal-email-templates"],"summary":"Send Test Email Template","description":"Send the current draft version to the operator (\"Send test to me\").\nA successful send records test_sent_version — the gate system emails\nmust pass before go-live.","operationId":"send_test_email_template_api_internal_commerce_email_templates__template_id__send_test_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"integer","title":"Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendTestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/commerce/email-templates/{template_id}/go-live":{"post":{"tags":["internal-email-templates"],"summary":"Go Live Email Template","description":"Promote the current version to serve sends. System types require a\nsend-test on this exact version (409-free: gate failures are 400s with\nthe operator-actionable message).","operationId":"go_live_email_template_api_internal_commerce_email_templates__template_id__go_live_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"integer","title":"Template Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/commerce/event-email-rules":{"get":{"tags":["internal-event-email-rules"],"summary":"List Event Email Rules","description":"Rules in EVALUATION order, so the list an operator reads is the order the\ndispatcher will apply rather than something they have to reconstruct.","operationId":"list_event_email_rules_api_internal_commerce_event_email_rules_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_key","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Limit to one event.","title":"Event Key"},"description":"Limit to one event."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EventEmailRuleItem"},"title":"Response List Event Email Rules Api Internal Commerce Event Email Rules Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["internal-event-email-rules"],"summary":"Create Event Email Rule","operationId":"create_event_email_rule_api_internal_commerce_event_email_rules_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventEmailRuleCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventEmailRuleItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/commerce/event-email-rules/{rule_id}":{"patch":{"tags":["internal-event-email-rules"],"summary":"Update Event Email Rule","operationId":"update_event_email_rule_api_internal_commerce_event_email_rules__rule_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"integer","title":"Rule Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventEmailRuleUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventEmailRuleItem"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["internal-event-email-rules"],"summary":"Delete Event Email Rule","operationId":"delete_event_email_rule_api_internal_commerce_event_email_rules__rule_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"rule_id","in":"path","required":true,"schema":{"type":"integer","title":"Rule Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/commerce/event-email-rules/reorder":{"post":{"tags":["internal-event-email-rules"],"summary":"Reorder Event Email Rules","description":"Rewrite every priority for one event from the order given.","operationId":"reorder_event_email_rules_api_internal_commerce_event_email_rules_reorder_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"event_key","in":"query","required":true,"schema":{"type":"string","description":"The event whose rules are being reordered.","title":"Event Key"},"description":"The event whose rules are being reordered."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EventEmailRuleReorder"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EventEmailRuleItem"},"title":"Response Reorder Event Email Rules Api Internal Commerce Event Email Rules Reorder Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/funnel":{"get":{"tags":["internal-funnel"],"summary":"Get Funnel Report","operationId":"get_funnel_report_api_internal_funnel_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"entry_point","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Entry Point"}},{"name":"exam_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Exam Id"}},{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Only count stage events that occurred on/after this instant","title":"Since"},"description":"Only count stage events that occurred on/after this instant"},{"name":"registered_since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Registration cohort: restrict the funnel to users who registered on/after this instant","title":"Registered Since"},"description":"Registration cohort: restrict the funnel to users who registered on/after this instant"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FunnelReportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/funnel/results-offer":{"get":{"tags":["internal-funnel"],"summary":"Get Results Offer Readout","description":"#1443 slice j: the SAT results-screen offer by test type and A/B arm.","operationId":"get_results_offer_readout_api_internal_funnel_results_offer_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Readout window start: count events and purchases on/after this instant","title":"Since"},"description":"Readout window start: count events and purchases on/after this instant"},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Readout window end (exclusive): switch-on + 28 days for the four-week readout","title":"Until"},"description":"Readout window end (exclusive): switch-on + 28 days for the four-week readout"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResultsOfferReadoutResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/funnel/profile-ask-skips":{"get":{"tags":["internal-funnel"],"summary":"Get Profile Ask Skip Readout","description":"How many test-takers skip the profile ask, by week and by entry point.\n\nRam, 23 Sep: \"roughly how many test-takers now skip it?\" — unanswerable until the\nskip was recorded server-side, because it only ever reached sessionStorage. The\nmeasure starts the day this shipped; there is no history before it.","operationId":"get_profile_ask_skip_readout_api_internal_funnel_profile_ask_skips_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Count events on/after this instant","title":"Since"},"description":"Count events on/after this instant"},{"name":"until","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Window end, exclusive","title":"Until"},"description":"Window end, exclusive"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Profile Ask Skip Readout Api Internal Funnel Profile Ask Skips Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/funnel/exams":{"get":{"tags":["internal-funnel"],"summary":"List Funnel Exams","description":"Exam options for this report's ``exam_id`` filter, as ``{id, slug, name}``.\n\nWhy this lives on the funnel router rather than reusing\n``GET /api/internal/exams``: that route (``app/api/internal/cohorts.py``) is\ngated on ``require_classroom_admin`` (admin | course_manager), while this\nreport is a Growth surface gated on admin | marketing | sales. The two role\nsets overlap only on ``admin``, so **marketing and sales got a 403 on the\nexam list while the report itself loaded fine** — the exam dimension was\nunreachable for 2 of the 3 roles the report is scoped to, and the dashboard\nfell back to hiding a filter those operators are entitled to use.\n\nServing the list from the same router as the report keeps one gate\n(``require_funnel_reader``) authoritative for the whole surface: widen the\nreport's roles and the filter follows automatically. The cohort route keeps\nits tighter classroom gate — it feeds a different, mutating admin form.\n\nThe ids MUST come from the server: ``exams.id`` is not contiguous\n(sat=1, toefl=3, ielts=4, gre=5 — there is no id 2), so any list bundled in\nthe browser is a stale second copy of the table.","operationId":"list_funnel_exams_api_internal_funnel_exams_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response List Funnel Exams Api Internal Funnel Exams Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/fulfillment/orders/pending":{"get":{"tags":["internal-fulfillment"],"summary":"List Pending Orders","description":"Orders a student paid for but doesn't have access to yet, oldest first.","operationId":"list_pending_orders_api_internal_fulfillment_orders_pending_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Page Size"}},{"name":"include_failed","in":"query","required":false,"schema":{"type":"boolean","description":"Include fulfillment_failed rows","default":true,"title":"Include Failed"},"description":"Include fulfillment_failed rows"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PendingFulfillmentPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/fulfillment/orders/stuck-count":{"get":{"tags":["internal-fulfillment"],"summary":"Get Stuck Orders Count","description":"Pager-threshold query: orders needing human attention right now.","operationId":"get_stuck_orders_count_api_internal_fulfillment_orders_stuck_count_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StuckOrdersCount"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/fulfillment/orders/{nova_order_id}/requeue":{"post":{"tags":["internal-fulfillment"],"summary":"Requeue Order","description":"Requeue a fulfillment_failed order for immediate redelivery.","operationId":"requeue_order_api_internal_fulfillment_orders__nova_order_id__requeue_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"nova_order_id","in":"path","required":true,"schema":{"type":"integer","title":"Nova Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FulfillmentLedgerEntryView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/refunds/orders/{order_id}":{"post":{"tags":["internal-refunds"],"summary":"Refund Order","description":"Full refund of a paid order: gateway refund -> revoke access -> mark\nrefunded. Idempotent — re-running a held refund retries revocation only.","operationId":"refund_order_api_internal_refunds_orders__order_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"integer","title":"Order Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitiateRefundRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundOrderView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/refunds/needs-attention":{"get":{"tags":["internal-refunds"],"summary":"List Refunds Needing Attention","description":"Inconsistent refunds: gateway returned the money but revocation /\nfinalization didn't complete. Each row is retryable via POST above;\nthe manual runbook lives in refund_service's module docstring.","operationId":"list_refunds_needing_attention_api_internal_refunds_needs_attention_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundAttentionPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/checkout-links/mintable-plans":{"get":{"tags":["internal-checkout-links"],"summary":"List Mintable Plans","description":"Sellable catalog for the link-minting picker (#902a).\n\nis_active AND sellable_in_nova AND non-zero-priced only — exactly the\nplans a mint would accept. listed_publicly is deliberately NOT a\nfilter (#902): counselor links are the sales channel for unlisted\npackages. Prices are live-catalog snapshots for display; a minted\nlink never locks them. Capped, not paginated: the catalog is a dozen\nrows, not a feed.\n\nEach plan carries ``bridge_live``: False for dmango_bridge-fulfilled\nplans while the bridge (#855h) is unconfigured — the mint endpoint\nrejects those, so the picker renders them disabled with the reason.","operationId":"list_mintable_plans_api_internal_checkout_links_mintable_plans_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MintablePlansResponse"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/checkout-links":{"post":{"tags":["internal-checkout-links"],"summary":"Mint Checkout Link","description":"Mint a signed checkout link for a catalog SKU (``{exam}:{tier}``).\n\nThe SKU must resolve to an active, Nova-sellable package RIGHT NOW —\na counselor never gets a dead link minted. The link carries no price;\nredemption re-resolves the catalog.\n\ndmango_bridge-fulfilled plans are rejected with an honest 409 while\nthe bridge (#855h) is unconfigured: a link that takes money the\nsystem cannot deliver violates the honest-promises floor (#902).","operationId":"mint_checkout_link_api_internal_checkout_links_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutLinkMintRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckoutLinkMintResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/users/external":{"get":{"tags":["internal-users"],"summary":"List External Users","description":"List all external users (admin only) with pagination and filtering.","operationId":"list_external_users_api_internal_users_external_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by email or name","title":"Search"},"description":"Search by email or name"},{"name":"tier","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by tier","title":"Tier"},"description":"Filter by tier"},{"name":"account_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by account type (student/parent)","title":"Account Type"},"description":"Filter by account type (student/parent)"},{"name":"subscription_status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by subscription: active, expired, none","title":"Subscription Status"},"description":"Filter by subscription: active, expired, none"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalUserListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/users/external/{user_id}":{"get":{"tags":["internal-users"],"summary":"Get External User","description":"Get external user details with usage stats, entitlements, and orders (admin only).","operationId":"get_external_user_api_internal_users_external__user_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalUserDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/users/external/{user_id}/activity/tests":{"get":{"tags":["internal-users"],"summary":"Get External User Tests","description":"Per-attempt assessment history (mocks / diagnostics / section tests).","operationId":"get_external_user_tests_api_internal_users_external__user_id__activity_tests_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","default":25,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/users/external/{user_id}/activity/practice":{"get":{"tags":["internal-users"],"summary":"Get External User Practice","description":"Practice-question attempts + SQL-computed accuracy summary.\n\n`subject` filters to one section (#1142); the summary honours the same\nfilter so the accuracy always describes the listed rows.","operationId":"get_external_user_practice_api_internal_users_external__user_id__activity_practice_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","default":25,"title":"Page Size"}},{"name":"subject","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by section: math | reading_writing","title":"Subject"},"description":"Filter by section: math | reading_writing"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/users/external/{user_id}/activity/practice/{attempt_id}":{"get":{"tags":["internal-users"],"summary":"Get External User Practice Attempt","description":"One practice attempt's question + the student's response (#1142).\n\nShaped for the shared QuestionReviewModal so staff review a practice\nresponse in the same component as mock review.","operationId":"get_external_user_practice_attempt_api_internal_users_external__user_id__activity_practice__attempt_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Attempt Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/users/external/{user_id}/activity/drills":{"get":{"tags":["internal-users"],"summary":"Get External User Drills","description":"Practice drills the student took — self-serve and classroom (#1142).","operationId":"get_external_user_drills_api_internal_users_external__user_id__activity_drills_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","default":25,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/users/external/{user_id}/activity/drills/{attempt_id}":{"get":{"tags":["internal-users"],"summary":"Get External User Drill Results","description":"A drill's question-by-question results, for staff (#1142).\n\nThe student-facing drill results endpoint scopes to the caller, so staff\ncan't use it to view someone else's drill. This is the same\n`drill_service` read, scoped to the student whose row was clicked — a\ndrill is an attempt with `assessment_id IS NULL`, which the generic\nattempt-results endpoint can't render (it dereferences the assessment).","operationId":"get_external_user_drill_results_api_internal_users_external__user_id__activity_drills__attempt_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Attempt Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/users/external/{user_id}/activity/lessons":{"get":{"tags":["internal-users"],"summary":"Get External User Lessons","description":"Lessons the student started / completed, with slide-vs-video type.","operationId":"get_external_user_lessons_api_internal_users_external__user_id__activity_lessons_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","default":25,"title":"Page Size"}},{"name":"subject","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by section: math | reading_writing","title":"Subject"},"description":"Filter by section: math | reading_writing"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/users":{"get":{"tags":["internal-users"],"summary":"List Internal Users","description":"List all internal users (admin only).","operationId":"list_internal_users_api_internal_users_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/app__api__internal__users__InternalUserResponse"},"type":"array","title":"Response List Internal Users Api Internal Users Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["internal-users"],"summary":"Create Internal User","description":"Create a new internal user (admin only).","operationId":"create_internal_user_api_internal_users_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateUserRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__internal__users__InternalUserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/users/{user_id}":{"get":{"tags":["internal-users"],"summary":"Get Internal User","description":"Get a specific internal user (admin only).","operationId":"get_internal_user_api_internal_users__user_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__internal__users__InternalUserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["internal-users"],"summary":"Update Internal User","description":"Update user details (admin only).","operationId":"update_internal_user_api_internal_users__user_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateUserRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__internal__users__InternalUserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["internal-users"],"summary":"Delete Internal User","description":"Delete an internal user (admin only). Actually deactivates rather than hard delete.","operationId":"delete_internal_user_api_internal_users__user_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/users/{user_id}/roles":{"put":{"tags":["internal-users"],"summary":"Update User Roles","description":"Update user roles (admin only).","operationId":"update_user_roles_api_internal_users__user_id__roles_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateRolesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__internal__users__InternalUserResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/settings/contact":{"get":{"tags":["internal-settings"],"summary":"Get Contact Settings","description":"Get contact settings (WhatsApp number, message, CTA enabled).","operationId":"get_contact_settings_api_internal_settings_contact_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactSettingsResponse"}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["internal-settings"],"summary":"Update Contact Settings","description":"Update contact settings.","operationId":"update_contact_settings_api_internal_settings_contact_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactSettingsUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/settings/testimonials":{"get":{"tags":["internal-settings"],"summary":"List Testimonials","description":"List all testimonials (including inactive for admin view).","operationId":"list_testimonials_api_internal_settings_testimonials_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"include_inactive","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Inactive"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TestimonialResponse"},"title":"Response List Testimonials Api Internal Settings Testimonials Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["internal-settings"],"summary":"Create Testimonial","description":"Create a new testimonial.","operationId":"create_testimonial_api_internal_settings_testimonials_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestimonialCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestimonialResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/settings/testimonials/import":{"post":{"tags":["internal-settings"],"summary":"Import Testimonials","description":"Bulk import testimonials from JSON.\n\nExample JSON:\n{\n    \"testimonials\": [\n        {\n            \"student_name\": \"John D.\",\n            \"score_improvement\": \"1250 -> 1480\",\n            \"quote\": \"The personalized practice helped me focus...\",\n            \"university\": \"MIT\",\n            \"year\": \"2025\",\n            \"featured\": true,\n            \"display_order\": 1\n        }\n    ]\n}","operationId":"import_testimonials_api_internal_settings_testimonials_import_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestimonialImportRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestimonialImportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/settings/testimonials/{testimonial_id}":{"put":{"tags":["internal-settings"],"summary":"Update Testimonial","description":"Update a testimonial.","operationId":"update_testimonial_api_internal_settings_testimonials__testimonial_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"testimonial_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testimonial Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestimonialUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestimonialResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["internal-settings"],"summary":"Delete Testimonial","description":"Delete a testimonial.\n\nBy default, soft deletes (sets is_active=False).\nUse permanent=True for hard delete.","operationId":"delete_testimonial_api_internal_settings_testimonials__testimonial_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"testimonial_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Testimonial Id"}},{"name":"permanent","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Permanent"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/settings/v25-reflection-gate":{"get":{"tags":["internal-settings"],"summary":"Get V25 Reflection Gate","description":"Read the current v2.5 reflection-gate flag value (#355 slice 355g).\n\nUsed by the staging UAT cohort + the prod-deploy cutover ops play\nto confirm the flag state before flipping it.","operationId":"get_v25_reflection_gate_api_internal_settings_v25_reflection_gate_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V25FlagResponse"}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["internal-settings"],"summary":"Update V25 Reflection Gate","description":"Flip the v2.5 reflection-gate flag at runtime (#355 slice 355g).\n\nWrites (or updates) the `app_settings` row so the change survives\na redeploy. New plans generated AFTER this flip honor the new\nstate per the migration policy (\"new plans only\"); existing plans\nare unaffected. Audited via the standard `updated_by` field.","operationId":"update_v25_reflection_gate_api_internal_settings_v25_reflection_gate_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/V25FlagUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/V25FlagResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/settings/sat-results":{"get":{"tags":["internal-settings"],"summary":"Get Sat Results Settings","description":"Read the SAT results-screen switches, per test kind (#1443).\n\n`offer_enabled` turns the sequence + paid-pack offer on for that kind's\nresults (off = today's page, byte for byte). `insights_source` picks\nwhat stage 3 renders. Both are read per request, so a flip here is\nlive on the next results load. A per-kind row wins over the global\nrow; `*_origin` says which one is in effect.","operationId":"get_sat_results_settings_api_internal_settings_sat_results_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SatResultsSettingsResponse"}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["internal-settings"],"summary":"Update Sat Results Settings","description":"Flip either switch for one test kind at runtime (#1443). Writes the\nper-kind app_settings row; audited via `updated_by`; partial updates\nallowed (send only the field you change).","operationId":"update_sat_results_settings_api_internal_settings_sat_results_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SatResultsSettingsUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SatResultsSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/settings/llm-provider-mode":{"get":{"tags":["internal-settings"],"summary":"Get Llm Provider Mode","description":"Read the runtime-switchable LLM provider mode (#559).\n\nThe post-mock analysis flow reads this on every call, so a flip\nhere takes effect on the next student request — no redeploy.","operationId":"get_llm_provider_mode_api_internal_settings_llm_provider_mode_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMProviderModeResponse"}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["internal-settings"],"summary":"Update Llm Provider Mode","description":"Flip the LLM provider mode at runtime (#559).\n\nUse during a cliproxy outage to force-route to OpenRouter, or vice\nversa. Auditing happens through the `updated_by` column on the\napp_settings row.","operationId":"update_llm_provider_mode_api_internal_settings_llm_provider_mode_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMProviderModeUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMProviderModeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/settings/sat-olympiad":{"get":{"tags":["internal-settings"],"summary":"Get Sat Olympiad Config","description":"Read the SAT Olympiad sitting window + toggle.","operationId":"get_sat_olympiad_config_api_internal_settings_sat_olympiad_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SatOlympiadConfigResponse"}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["internal-settings"],"summary":"Update Sat Olympiad Config","description":"Set the sitting window / flip the toggle.\n\nAdmin-only: this is what opens a live competition to students.","operationId":"update_sat_olympiad_config_api_internal_settings_sat_olympiad_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SatOlympiadConfigUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SatOlympiadConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/settings/payment-gateways":{"get":{"tags":["internal-settings"],"summary":"Get Payment Gateway Switches","description":"Every switch with its state, whether each gateway has credentials, and the latest changes.","operationId":"get_payment_gateway_switches_api_internal_settings_payment_gateways_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentGatewaySwitchesResponse"}}}}},"security":[{"HTTPBearer":[]}]},"put":{"tags":["internal-settings"],"summary":"Update Payment Gateway Switch","description":"Set one switch to off, staff only or on. Live on the next checkout; no deploy.","operationId":"update_payment_gateway_switch_api_internal_settings_payment_gateways_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentGatewaySwitchUpdate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentGatewaySwitchesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/study-plan/config":{"get":{"tags":["study-plan-admin"],"summary":"Get Planner Config","description":"Return current planner configuration for the Rules Reference tab.","operationId":"get_planner_config_api_internal_study_plan_config_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/study-plan/simulate":{"post":{"tags":["study-plan-admin"],"summary":"Simulate Plan","description":"Run the real v2 planner for a user and return the task breakdown.\n\nThis calls plan_segment_content() directly — the same function used\nin production plan generation. The output shows exactly what a student\nwould get.","operationId":"simulate_plan_api_internal_study_plan_simulate_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SimulateRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/packages":{"get":{"tags":["internal-packages"],"summary":"List Packages","description":"List all packages with pricing, catalog flags, and entitlements.\n\nRead widened to marketing + sales for the #855 catalog tab (read-only\nrendering); every write below remains admin-only.\n\nEach row carries its #855d launch-readiness matrix, batch-computed so\nthe catalog can show honest per-row chips and gate the sellable toggle.","operationId":"list_packages_api_internal_packages_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/PackageResponse"},"type":"array","title":"Response List Packages Api Internal Packages Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/packages/id/{package_id}":{"patch":{"tags":["internal-packages"],"summary":"Update Package Catalog","description":"Update design-scope catalog fields on a package, keyed by id.\n\nPartial update: only fields explicitly provided change. Unlike the\nlegacy tier-slug PATCH, this reaches inactive rows too (admin surface).","operationId":"update_package_catalog_api_internal_packages_id__package_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"package_id","in":"path","required":true,"schema":{"type":"integer","title":"Package Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageCatalogUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/packages/id/{package_id}/sellable":{"patch":{"tags":["internal-packages"],"summary":"Set Package Sellable","description":"Flip the sellable_in_nova launch gate (#855b/#855d). Admin-only.\n\nDedicated endpoint (not part of the general PATCH) so putting an\n(exam, tier) on sale to real buyers is always a deliberate, audited,\nsingle-flag act — and so the general editor can never flip it as a\nside effect. fulfillment_handler has NO write endpoint by design.","operationId":"set_package_sellable_api_internal_packages_id__package_id__sellable_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"package_id","in":"path","required":true,"schema":{"type":"integer","title":"Package Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SellableFlagUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/packages/id/{package_id}/launch-cleared":{"patch":{"tags":["internal-packages"],"summary":"Set Package Launch Cleared","description":"Set the launch_cleared human go/no-go gate (#855d). Admin-only.\n\nDedicated, audited endpoint (mirrors /sellable) so the explicit launch\nsign-off is always an attributable single act. This is the readiness\nPRECONDITION, not the money toggle — clearing launch makes a package\neligible to be put on sale, it does not put it on sale.","operationId":"set_package_launch_cleared_api_internal_packages_id__package_id__launch_cleared_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"package_id","in":"path","required":true,"schema":{"type":"integer","title":"Package Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LaunchClearedUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/packages/discounts":{"get":{"tags":["internal-packages"],"summary":"List Discount Codes","description":"List all discount codes.","operationId":"list_discount_codes_api_internal_packages_discounts_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/DiscountCodeResponse"},"type":"array","title":"Response List Discount Codes Api Internal Packages Discounts Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["internal-packages"],"summary":"Create Discount Code","description":"Create a new discount code.","operationId":"create_discount_code_api_internal_packages_discounts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscountCodeCreate"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscountCodeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/packages/discounts/{code_id}":{"delete":{"tags":["internal-packages"],"summary":"Deactivate Discount Code","description":"Deactivate a discount code (soft delete).","operationId":"deactivate_discount_code_api_internal_packages_discounts__code_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"code_id","in":"path","required":true,"schema":{"type":"integer","title":"Code Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/orders/{order_id}":{"get":{"tags":["internal-orders"],"summary":"Get Order","description":"Fetch a single order by id. Admin only — accesses any user's orders.","operationId":"get_order_api_internal_orders__order_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"integer","title":"Order Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOrderView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/orders/{order_id}/refund":{"post":{"tags":["internal-orders"],"summary":"Refund Order","description":"Refund an order. Revokes the fulfilled entitlement + calls the gateway\nrefund API. Idempotent on already-refunded orders (returns 409).","operationId":"refund_order_api_internal_orders__order_id__refund_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"integer","title":"Order Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefundRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminOrderView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/offline-payments/preview":{"get":{"tags":["internal-offline-payments"],"summary":"Preview Offline Grant","description":"Show the effect (fresh / upgrade / blocked) of granting before committing.","operationId":"preview_offline_grant_api_internal_offline_payments_preview_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"user_email","in":"query","required":true,"schema":{"type":"string","minLength":3,"title":"User Email"}},{"name":"item_type","in":"query","required":true,"schema":{"type":"string","title":"Item Type"}},{"name":"item_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Item Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfflineGrantPreview"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/offline-payments/contacts":{"get":{"tags":["internal-offline-payments"],"summary":"Search Crm Contacts","description":"Typeahead over CRM contacts (email / phone) for the offline-grant student picker.","operationId":"search_crm_contacts_api_internal_offline_payments_contacts_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":120,"title":"Q"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CrmContactOption"},"title":"Response Search Crm Contacts Api Internal Offline Payments Contacts Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/offline-payments":{"post":{"tags":["internal-offline-payments"],"summary":"Record Offline Payment","description":"Record an offline payment / comp and grant access (single item).","operationId":"record_offline_payment_api_internal_offline_payments_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfflineGrantRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfflinePaymentView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["internal-offline-payments"],"summary":"List Offline Payments","description":"Ledger of every offline grant/comp for reconciliation (newest first).","operationId":"list_offline_payments_api_internal_offline_payments_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfflineLedgerPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/offline-payments/{order_id}/reverse":{"post":{"tags":["internal-offline-payments"],"summary":"Reverse Offline Payment","description":"Reverse an offline grant (admin only): revoke access, restore prior, mark reversed.","operationId":"reverse_offline_payment_api_internal_offline_payments__order_id__reverse_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"integer","title":"Order Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfflineReversalRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OfflinePaymentView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/addons":{"get":{"tags":["internal-addons"],"summary":"List Addons","description":"All add-ons with overrides applied (including retired ones).","operationId":"list_addons_api_internal_addons_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AddonView"},"type":"array","title":"Response List Addons Api Internal Addons Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/addons/{addon_id}":{"put":{"tags":["internal-addons"],"summary":"Update Addon Override","description":"Upsert an add-on's commercial override (admin only).","operationId":"update_addon_override_api_internal_addons__addon_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"addon_id","in":"path","required":true,"schema":{"type":"string","title":"Addon Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddonOverrideUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddonView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/addon-offerings":{"get":{"tags":["internal-addon-offerings"],"summary":"List Offerings","description":"All add-on offerings, including retired ones (admin tab).","operationId":"list_offerings_api_internal_addon_offerings_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/AddonOfferingView"},"type":"array","title":"Response List Offerings Api Internal Addon Offerings Get"}}}}},"security":[{"HTTPBearer":[]}]},"post":{"tags":["internal-addon-offerings"],"summary":"Create Offering","description":"Create an add-on offering (admin only).","operationId":"create_offering_api_internal_addon_offerings_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddonOfferingCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddonOfferingView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/addon-offerings/{offering_id}":{"put":{"tags":["internal-addon-offerings"],"summary":"Update Offering","description":"Update an add-on offering (admin only). feature_key + slug are immutable.","operationId":"update_offering_api_internal_addon_offerings__offering_id__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"offering_id","in":"path","required":true,"schema":{"type":"integer","title":"Offering Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddonOfferingUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddonOfferingView"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/imports":{"get":{"tags":["internal-imports"],"summary":"List Import Batches","description":"List import batches, newest first.","operationId":"list_import_batches_api_internal_imports_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"source_system","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source System"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportLedgerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/imports/{batch_id}":{"get":{"tags":["internal-imports"],"summary":"Get Batch Detail","description":"List rows in a single import batch, with validation_status.\n\nDrives the per-batch \"Review\" drawer on the admin Import page.\n\nPagination is applied at the DB layer via a UNION ALL across the\nthree provenance tables — avoids fetching every row into Python\nwhen the batch is large.","operationId":"get_batch_detail_api_internal_imports__batch_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchDetailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/imports/{batch_id}/review":{"post":{"tags":["internal-imports"],"summary":"Review Batch","description":"Bulk-update validation_status on rows in a batch (Epic 9d).\n\nIdempotent: re-submitting the same items writes the same value;\nonly newly-changed rows count toward `updated`. Items whose row_id\ndoesn't match the batch, or whose `kind` is unknown, are skipped\nand surfaced in `errors`.\n\nThe transaction boundary + row-level locking live in\n`app.services.import_review_service.review_batch`.","operationId":"review_batch_api_internal_imports__batch_id__review_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/imports/run":{"post":{"tags":["internal-imports"],"summary":"Run Import","description":"Trigger an Epic 8 import script inline (Epic 9d).\n\nAccepts a JSON body, validates the source_system + exam, and\ndelegates to the matching Epic 8 importer. The import scripts\nrequire a Path on disk so we materialize the payload to a temp\nfile before dispatching.","operationId":"run_import_api_internal_imports_run_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportRunRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/institutions/upload-logo":{"post":{"tags":["internal-institutions"],"summary":"Upload Institution Logo","description":"Proxy upload to GCS. Returns {url} on success.\n\n#347g — replaces the URL-only logo_url input with a real file\npicker. Reuses the existing `storage_service.upload_image`\nmachinery (content-type + size validation + dedup via content\nhash). Files land under `institutions/logos/<hash>.<ext>`.","operationId":"upload_institution_logo_api_internal_institutions_upload_logo_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_institution_logo_api_internal_institutions_upload_logo_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/institutions":{"get":{"tags":["internal-institutions"],"summary":"List Institutions","operationId":"list_institutions_api_internal_institutions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InstitutionResponse"},"title":"Response List Institutions Api Internal Institutions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["internal-institutions"],"summary":"Create Institution","operationId":"create_institution_api_internal_institutions_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstitutionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstitutionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/institutions/{institution_id}":{"get":{"tags":["internal-institutions"],"summary":"Get Institution","operationId":"get_institution_api_internal_institutions__institution_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"institution_id","in":"path","required":true,"schema":{"type":"integer","title":"Institution Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstitutionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["internal-institutions"],"summary":"Update Institution","operationId":"update_institution_api_internal_institutions__institution_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"institution_id","in":"path","required":true,"schema":{"type":"integer","title":"Institution Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstitutionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstitutionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/institutions/{institution_id}/coordinators":{"get":{"tags":["internal-institutions"],"summary":"List Coordinators Endpoint","description":"List coordinators for an institution. Any authenticated internal\nuser can read; mutations remain admin-only.","operationId":"list_coordinators_endpoint_api_internal_institutions__institution_id__coordinators_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"institution_id","in":"path","required":true,"schema":{"type":"integer","title":"Institution Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InstitutionCoordinatorResponse"},"title":"Response List Coordinators Endpoint Api Internal Institutions  Institution Id  Coordinators Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["internal-institutions"],"summary":"Add Coordinator","operationId":"add_coordinator_api_internal_institutions__institution_id__coordinators_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"institution_id","in":"path","required":true,"schema":{"type":"integer","title":"Institution Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstitutionCoordinatorCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstitutionCoordinatorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/institutions/{institution_id}/coordinators/{coordinator_id}":{"delete":{"tags":["internal-institutions"],"summary":"Remove Coordinator","operationId":"remove_coordinator_api_internal_institutions__institution_id__coordinators__coordinator_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"institution_id","in":"path","required":true,"schema":{"type":"integer","title":"Institution Id"}},{"name":"coordinator_id","in":"path","required":true,"schema":{"type":"integer","title":"Coordinator Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/exams":{"get":{"tags":["internal-cohorts"],"summary":"List Exams For Cohort Admin","description":"Lightweight {id, slug, name} list for the cohort create/edit\nexam dropdown. Public catalog endpoint requires a `degree` filter\nwhich is irrelevant for admins; this skips it.","operationId":"list_exams_for_cohort_admin_api_internal_exams_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/cohorts":{"get":{"tags":["internal-cohorts"],"summary":"List Cohorts","operationId":"list_cohorts_api_internal_cohorts_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"institution_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Institution Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"exam_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Exam Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CohortResponse"},"title":"Response List Cohorts Api Internal Cohorts Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["internal-cohorts"],"summary":"Create Cohort","operationId":"create_cohort_api_internal_cohorts_post","security":[{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CohortCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CohortResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/cohorts/mine":{"get":{"tags":["internal-cohorts"],"summary":"List My Cohorts","description":"Cohorts the current internal user is assigned to (instructor or\ncourse-manager, any subject). Used by the Tier 4 MyCohortsPage so\nnon-admin internal users see a scoped landing list instead of the\nfull /cohorts admin list.\n\nAdmin users see the same scope-by-assignment list here; for the\nfull all-cohorts admin view they hit /cohorts directly.","operationId":"list_my_cohorts_api_internal_cohorts_mine_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CohortResponse"},"type":"array","title":"Response List My Cohorts Api Internal Cohorts Mine Get"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/cohorts/{cohort_id}":{"get":{"tags":["internal-cohorts"],"summary":"Get Cohort","operationId":"get_cohort_api_internal_cohorts__cohort_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"integer","title":"Cohort Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CohortResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["internal-cohorts"],"summary":"Update Cohort","operationId":"update_cohort_api_internal_cohorts__cohort_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"integer","title":"Cohort Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CohortUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CohortResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/cohorts/{cohort_id}/transition":{"post":{"tags":["internal-cohorts"],"summary":"Transition Cohort Status","operationId":"transition_cohort_status_api_internal_cohorts__cohort_id__transition_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"integer","title":"Cohort Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CohortStatusTransitionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CohortResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/cohorts/{cohort_id}/roster":{"post":{"tags":["internal-cohorts"],"summary":"Bulk Enroll Roster","description":"Bulk-enroll students. Per-row independent transactions —\npartial failures NEVER 5xx; the response is the result-per-row\narray regardless of mixed outcomes (#347b T2.E).","operationId":"bulk_enroll_roster_api_internal_cohorts__cohort_id__roster_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"integer","title":"Cohort Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/RosterRow"},"title":"Roster"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EnrollmentResult"},"title":"Response Bulk Enroll Roster Api Internal Cohorts  Cohort Id  Roster Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["internal-cohorts"],"summary":"List Roster","operationId":"list_roster_api_internal_cohorts__cohort_id__roster_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"integer","title":"Cohort Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CohortMembershipResponse"},"title":"Response List Roster Api Internal Cohorts  Cohort Id  Roster Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/cohorts/{cohort_id}/roster/single":{"post":{"tags":["internal-cohorts"],"summary":"Add Single Student","description":"Single-student manual enrollment (#347g). Schema enforces\nparent_name + parent_email — see schemas.cohort.StudentCreate.\nWraps bulk_enroll under the hood for consistency.","operationId":"add_single_student_api_internal_cohorts__cohort_id__roster_single_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"integer","title":"Cohort Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudentCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrollmentResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/cohorts/{cohort_id}/roster/{user_id}":{"delete":{"tags":["internal-cohorts"],"summary":"Remove Roster Member","operationId":"remove_roster_member_api_internal_cohorts__cohort_id__roster__user_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"integer","title":"Cohort Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/cohorts/{cohort_id}/assignments":{"get":{"tags":["internal-cohorts"],"summary":"List Assignments","operationId":"list_assignments_api_internal_cohorts__cohort_id__assignments_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"integer","title":"Cohort Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CohortAssignmentResponse"},"title":"Response List Assignments Api Internal Cohorts  Cohort Id  Assignments Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["internal-cohorts"],"summary":"Create Assignment","operationId":"create_assignment_api_internal_cohorts__cohort_id__assignments_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"integer","title":"Cohort Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CohortAssignmentCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CohortAssignmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/cohorts/{cohort_id}/assignments/{assignment_id}":{"delete":{"tags":["internal-cohorts"],"summary":"Delete Assignment","operationId":"delete_assignment_api_internal_cohorts__cohort_id__assignments__assignment_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"integer","title":"Cohort Id"}},{"name":"assignment_id","in":"path","required":true,"schema":{"type":"integer","title":"Assignment Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/cohorts/{cohort_id}/assignments/{assignment_id}/set-primary":{"post":{"tags":["internal-cohorts"],"summary":"Set Primary Instructor","description":"Mark an instructor assignment as the primary for its (cohort,\nsubject) — #347j Tier 3 (D8). Stream 2b booking routes to whoever\nis primary.","operationId":"set_primary_instructor_api_internal_cohorts__cohort_id__assignments__assignment_id__set_primary_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"integer","title":"Cohort Id"}},{"name":"assignment_id","in":"path","required":true,"schema":{"type":"integer","title":"Assignment Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CohortAssignmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/cohorts/{cohort_id}/sessions":{"get":{"tags":["internal-cohorts"],"summary":"List Sessions","operationId":"list_sessions_api_internal_cohorts__cohort_id__sessions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"integer","title":"Cohort Id"}},{"name":"week_start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Week Start"}},{"name":"week_end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Week End"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SessionResponse"},"title":"Response List Sessions Api Internal Cohorts  Cohort Id  Sessions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["internal-cohorts"],"summary":"Create Session Endpoint","operationId":"create_session_endpoint_api_internal_cohorts__cohort_id__sessions_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"integer","title":"Cohort Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/sessions/{session_id}":{"get":{"tags":["internal-cohorts"],"summary":"Get Session Endpoint","operationId":"get_session_endpoint_api_internal_sessions__session_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["internal-cohorts"],"summary":"Update Session Endpoint","operationId":"update_session_endpoint_api_internal_sessions__session_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/sessions/{session_id}/transition":{"post":{"tags":["internal-cohorts"],"summary":"Transition Session Status","operationId":"transition_session_status_api_internal_sessions__session_id__transition_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionStatusTransitionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/sessions/{session_id}/recording":{"post":{"tags":["internal-cohorts"],"summary":"Upload Session Recording","description":"Admin uploads a session recording. Replaces any existing one.\n\nAuthz mirrors the rest of the session-edit surface\n(admin / course-manager / subject instructor). File size + MIME\nare validated in the storage service; oversize requests fail at\nthe FastAPI multipart layer first if the underlying server\nenforces a hard cap, otherwise here.","operationId":"upload_session_recording_api_internal_sessions__session_id__recording_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_session_recording_api_internal_sessions__session_id__recording_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["internal-cohorts"],"summary":"Delete Session Recording","description":"Admin clears the recording — wipes the GCS object and the URL+stamp.","operationId":"delete_session_recording_api_internal_sessions__session_id__recording_delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/sessions/{session_id}/recording/upload-url":{"post":{"tags":["internal-cohorts"],"summary":"Create Recording Upload Url","description":"Mint a one-time URL to upload a recording straight to storage (#915).\n\nCloud Run caps request bodies at ~32 MiB, so large recordings can't be\nPOSTed through the API. The client PUTs the file to the returned\n``upload_url`` then calls ``/recording/finalize``. Authz mirrors the\nrest of the session-edit surface.","operationId":"create_recording_upload_url_api_internal_sessions__session_id__recording_upload_url_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__session__RecordingUploadUrlRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__session__RecordingUploadUrlResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/sessions/{session_id}/recording/finalize":{"post":{"tags":["internal-cohorts"],"summary":"Finalize Session Recording","description":"Record a direct-uploaded object as the session's recording (#915).\n\nVerifies the object landed under THIS session's prefix, then applies the\nsame replace-semantics as the direct upload (delete the previous blob).","operationId":"finalize_session_recording_api_internal_sessions__session_id__recording_finalize_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordingFinalizeRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/sessions/{session_id}/tasks":{"post":{"tags":["internal-cohorts"],"summary":"Create Session Task","operationId":"create_session_task_api_internal_sessions__session_id__tasks_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionTaskCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionTaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/sessions/{session_id}/tasks/{task_id}":{"patch":{"tags":["internal-cohorts"],"summary":"Update Session Task","operationId":"update_session_task_api_internal_sessions__session_id__tasks__task_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}},{"name":"task_id","in":"path","required":true,"schema":{"type":"integer","title":"Task Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionTaskUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionTaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["internal-cohorts"],"summary":"Delete Session Task","description":"Hard-delete. Admin-only; refused (422) when any completion row\nreferences this task — use archive instead.","operationId":"delete_session_task_api_internal_sessions__session_id__tasks__task_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}},{"name":"task_id","in":"path","required":true,"schema":{"type":"integer","title":"Task Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/sessions/{session_id}/tasks/{task_id}/archive":{"post":{"tags":["internal-cohorts"],"summary":"Archive Session Task","description":"Soft-archive — keeps completion FKs intact. Idempotent.","operationId":"archive_session_task_api_internal_sessions__session_id__tasks__task_id__archive_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}},{"name":"task_id","in":"path","required":true,"schema":{"type":"integer","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionTaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/sessions/{session_id}/tasks/{task_id}/unarchive":{"post":{"tags":["internal-cohorts"],"summary":"Unarchive Session Task","operationId":"unarchive_session_task_api_internal_sessions__session_id__tasks__task_id__unarchive_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}},{"name":"task_id","in":"path","required":true,"schema":{"type":"integer","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionTaskResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/sessions/{session_id}/attendance":{"post":{"tags":["internal-cohorts"],"summary":"Mark Attendance","operationId":"mark_attendance_api_internal_sessions__session_id__attendance_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionAttendanceMark"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionAttendanceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["internal-cohorts"],"summary":"List Attendance","operationId":"list_attendance_api_internal_sessions__session_id__attendance_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/SessionAttendanceResponse"},"title":"Response List Attendance Api Internal Sessions  Session Id  Attendance Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/cohorts/{cohort_id}/dashboard":{"get":{"tags":["internal-cohorts"],"summary":"Get Batch Dashboard","description":"Batch Dashboard: role-aware pending actions + students requiring\nattention for the cohort. Admin / course manager / assigned instructor.","operationId":"get_batch_dashboard_api_internal_cohorts__cohort_id__dashboard_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"integer","title":"Cohort Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchDashboardResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/cohorts/{cohort_id}/students/{user_id}/profile":{"get":{"tags":["internal-cohorts"],"summary":"Get Student View","description":"Student View: a complete per-student profile within the cohort\n(#856h). Admin / course manager / assigned instructor.","operationId":"get_student_view_api_internal_cohorts__cohort_id__students__user_id__profile_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"integer","title":"Cohort Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudentViewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/cohorts/{cohort_id}/students/{user_id}/mock-report/{attempt_id}":{"get":{"tags":["internal-cohorts"],"summary":"Get Student Mock Report","description":"Staff preview of a cohort student's Mock Test Performance Report\n(#856-P2b / #856h §B). Admin / course manager / assigned instructor.","operationId":"get_student_mock_report_api_internal_cohorts__cohort_id__students__user_id__mock_report__attempt_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"integer","title":"Cohort Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Attempt Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MockReportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/cohorts/{cohort_id}/students/{user_id}/weekly-report":{"get":{"tags":["internal-cohorts"],"summary":"Get Student Weekly Report","description":"Staff preview of a cohort student's Weekly Progress Report (#856-P2b).\nAdmin / course manager / assigned instructor.","operationId":"get_student_weekly_report_api_internal_cohorts__cohort_id__students__user_id__weekly_report_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"integer","title":"Cohort Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"week_start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Week Start"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeeklyReportResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/cohorts/{cohort_id}/students/{user_id}/drill/{task_id}":{"get":{"tags":["internal-cohorts"],"summary":"Get Student Drill Review","description":"Question-wise review of a student's practice-drill assignment (#856-P2c).\n\nEvery student draws random questions from the drill's topic, so instructors\nneed each student's own questions + answers to clear doubts. Admin / course\nmanager / assigned instructor.","operationId":"get_student_drill_review_api_internal_cohorts__cohort_id__students__user_id__drill__task_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"integer","title":"Cohort Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"task_id","in":"path","required":true,"schema":{"type":"integer","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudentDrillReviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/cohorts/{cohort_id}/drill-tasks/{task_id}/results":{"get":{"tags":["internal-cohorts"],"summary":"Get Drill Task Results","description":"Batch (per-assignment) drill results across the cohort (#856-P2d).\n\n'How did the whole batch do on this drill' for the Sessions tab — a roster\nof every active student's status/score, each completed one linking to its\nown question-wise review. Admin / course manager / assigned instructor.","operationId":"get_drill_task_results_api_internal_cohorts__cohort_id__drill_tasks__task_id__results_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"integer","title":"Cohort Id"}},{"name":"task_id","in":"path","required":true,"schema":{"type":"integer","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DrillTaskResultsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/cohorts/{cohort_id}/mock-tasks/{task_id}/results":{"get":{"tags":["internal-cohorts"],"summary":"Get Mock Task Results","description":"Batch (per-assignment) mock-test results across the cohort.\n\nMirrors the drill-results roster for the mock_test task KIND: every active\nstudent's status/score on the assigned mock, each completed one linking to\nits own question-by-question review. Mocks aren't strong-linked to the\nsession_task, so the roster soft-links via the task's assessment_id.\nAdmin / course manager / assigned instructor.","operationId":"get_mock_task_results_api_internal_cohorts__cohort_id__mock_tasks__task_id__results_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"integer","title":"Cohort Id"}},{"name":"task_id","in":"path","required":true,"schema":{"type":"integer","title":"Task Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MockTaskResultsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/cohorts/{cohort_id}/topics/completion":{"get":{"tags":["internal-cohorts"],"summary":"Get Topic Completion","description":"Topic View: per-topic pre-work / homework completion across the cohort's\nactive students (#856i). Admin / course manager / assigned instructor.","operationId":"get_topic_completion_api_internal_cohorts__cohort_id__topics_completion_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"integer","title":"Cohort Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TopicCompletionRow"},"title":"Response Get Topic Completion Api Internal Cohorts  Cohort Id  Topics Completion Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/cohorts/{cohort_id}/reports/recipients":{"get":{"tags":["internal-classroom-reports"],"summary":"List Recipients","description":"List coordinator recipients for a cohort's weekly report fanout.","operationId":"list_recipients_api_internal_cohorts__cohort_id__reports_recipients_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"integer","title":"Cohort Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CohortReportRecipientResponse"},"title":"Response List Recipients Api Internal Cohorts  Cohort Id  Reports Recipients Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["internal-classroom-reports"],"summary":"Add Recipient","description":"Subscribe a coordinator to the cohort's weekly report fanout.","operationId":"add_recipient_api_internal_cohorts__cohort_id__reports_recipients_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"integer","title":"Cohort Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CohortReportRecipientCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CohortReportRecipientResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/cohorts/{cohort_id}/reports/recipients/{recipient_id}":{"delete":{"tags":["internal-classroom-reports"],"summary":"Remove Recipient","description":"Remove a coordinator from the report fanout.\n\nRefused (422) when removal would leave 0 coordinators while\nskip_admin_copy=TRUE — caller must flip skip_admin_copy first.","operationId":"remove_recipient_api_internal_cohorts__cohort_id__reports_recipients__recipient_id__delete","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"integer","title":"Cohort Id"}},{"name":"recipient_id","in":"path","required":true,"schema":{"type":"integer","title":"Recipient Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/cohorts/{cohort_id}/reports/skip-admin-copy":{"patch":{"tags":["internal-classroom-reports"],"summary":"Set Skip Admin Copy","description":"Flip the cohort's skip_admin_copy flag.\n\nTRUE refused (422) when 0 coordinators are subscribed.","operationId":"set_skip_admin_copy_api_internal_cohorts__cohort_id__reports_skip_admin_copy_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"integer","title":"Cohort Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SetSkipAdminCopyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CohortResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/cohorts/{cohort_id}/reports/runs":{"get":{"tags":["internal-classroom-reports"],"summary":"List Report Runs","description":"Ledger of report deliveries for a cohort.\n\nMost recent first. Tier 4 admin UI uses this to render the\n'Reports' tab of the cohort detail page.","operationId":"list_report_runs_api_internal_cohorts__cohort_id__reports_runs_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"integer","title":"Cohort Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReportRunListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/reports/runs/{run_id}/resend":{"post":{"tags":["internal-classroom-reports"],"summary":"Resend Report Run","description":"Resend a single report.\n\nRe-renders + re-dispatches without changing the recipient. The\nledger row is updated in-place (attempts++, status flipped). Use\nfor ops recovery when a send failed transiently.","operationId":"resend_report_run_api_internal_reports_runs__run_id__resend_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"integer","title":"Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendReportRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/test/trigger-classroom-reports-cron":{"post":{"tags":["internal-classroom-reports"],"summary":"Trigger Classroom Reports Cron","description":"Admin-only escape hatch: manually invoke a reports cron pass.\n\nUsed by Tier 5 E2E specs + ops smoke. Honors the same cron-enabled\nflag the Cloud Run Jobs check, so this endpoint won't spam emails\nin an env where the cron is intentionally off — caller can override\nby flipping the flag for the test session.","operationId":"trigger_classroom_reports_cron_api_internal_test_trigger_classroom_reports_cron_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerCronRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerCronResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/cohorts/{cohort_id}/reports/weekly/review":{"get":{"tags":["internal-classroom-reports"],"summary":"Weekly Review","description":"Per-student review status for a cohort's weekly report (a given week).","operationId":"weekly_review_api_internal_cohorts__cohort_id__reports_weekly_review_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"integer","title":"Cohort Id"}},{"name":"week_start","in":"query","required":true,"schema":{"type":"string","format":"date","title":"Week Start"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeeklyReviewListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/cohorts/{cohort_id}/reports/weekly/preview/{user_id}":{"get":{"tags":["internal-classroom-reports"],"summary":"Weekly Preview","description":"Live-rendered weekly report for one student (override applied) — preview.","operationId":"weekly_preview_api_internal_cohorts__cohort_id__reports_weekly_preview__user_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"integer","title":"Cohort Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}},{"name":"week_start","in":"query","required":true,"schema":{"type":"string","format":"date","title":"Week Start"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Weekly Preview Api Internal Cohorts  Cohort Id  Reports Weekly Preview  User Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/cohorts/{cohort_id}/reports/weekly/preview-email/{user_id}":{"post":{"tags":["internal-classroom-reports"],"summary":"Weekly Preview Email","description":"Rendered Weekly Progress email (HTML body + inbox metadata) as it would\nland in the inbox. Reflects unsaved narrative edits; persists nothing.","operationId":"weekly_preview_email_api_internal_cohorts__cohort_id__reports_weekly_preview_email__user_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"integer","title":"Cohort Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeeklyEmailPreviewRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailPreviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/cohorts/{cohort_id}/reports/weekly/review/{user_id}/narrative":{"put":{"tags":["internal-classroom-reports"],"summary":"Weekly Edit Narrative","description":"Save an edited narrative for a student's weekly report (audit-logged).","operationId":"weekly_edit_narrative_api_internal_cohorts__cohort_id__reports_weekly_review__user_id__narrative_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"integer","title":"Cohort Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"integer","title":"User Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeeklyNarrativeEditRequest"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/cohorts/{cohort_id}/reports/weekly/send":{"post":{"tags":["internal-classroom-reports"],"summary":"Weekly Send","description":"Approve & send the weekly report to the selected students (+ guardian + admin copy).","operationId":"weekly_send_api_internal_cohorts__cohort_id__reports_weekly_send_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"integer","title":"Cohort Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WeeklySendRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/cohorts/{cohort_id}/reports/per-mock/queue":{"get":{"tags":["internal-classroom-reports"],"summary":"Per Mock Queue","description":"Completed + scored mock attempts (cohort students) awaiting review/send.","operationId":"per_mock_queue_api_internal_cohorts__cohort_id__reports_per_mock_queue_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"integer","title":"Cohort Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerMockQueueResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/cohorts/{cohort_id}/reports/per-mock/preview/{mock_attempt_id}":{"get":{"tags":["internal-classroom-reports"],"summary":"Per Mock Preview","description":"Live-rendered per-mock report (override applied) — preview.","operationId":"per_mock_preview_api_internal_cohorts__cohort_id__reports_per_mock_preview__mock_attempt_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"integer","title":"Cohort Id"}},{"name":"mock_attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Mock Attempt Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Per Mock Preview Api Internal Cohorts  Cohort Id  Reports Per Mock Preview  Mock Attempt Id  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/cohorts/{cohort_id}/reports/per-mock/preview-email/{mock_attempt_id}":{"post":{"tags":["internal-classroom-reports"],"summary":"Per Mock Preview Email","description":"Rendered per-mock report email (HTML body + inbox metadata) — review\npreview. Reflects unsaved narrative edits; persists nothing.","operationId":"per_mock_preview_email_api_internal_cohorts__cohort_id__reports_per_mock_preview_email__mock_attempt_id__post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"integer","title":"Cohort Id"}},{"name":"mock_attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Mock Attempt Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerMockEmailPreviewRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailPreviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/cohorts/{cohort_id}/reports/per-mock/review/{mock_attempt_id}/narrative":{"put":{"tags":["internal-classroom-reports"],"summary":"Per Mock Edit Narrative","description":"Save an edited narrative for a per-mock report (audit-logged).","operationId":"per_mock_edit_narrative_api_internal_cohorts__cohort_id__reports_per_mock_review__mock_attempt_id__narrative_put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"integer","title":"Cohort Id"}},{"name":"mock_attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Mock Attempt Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerMockNarrativeEditRequest"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/cohorts/{cohort_id}/reports/per-mock/send":{"post":{"tags":["internal-classroom-reports"],"summary":"Per Mock Send","description":"Approve & send the selected per-mock reports (student + guardian + admin copy).","operationId":"per_mock_send_api_internal_cohorts__cohort_id__reports_per_mock_send_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"integer","title":"Cohort Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PerMockSendRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/cohorts/{cohort_id}/feedback":{"get":{"tags":["internal-classroom-feedback"],"summary":"Get Cohort Feedback","description":"Aggregated biweekly program feedback for a cohort (per cycle).","operationId":"get_cohort_feedback_api_internal_cohorts__cohort_id__feedback_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"cohort_id","in":"path","required":true,"schema":{"type":"integer","title":"Cohort Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Cohort Feedback Api Internal Cohorts  Cohort Id  Feedback Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/feedback-sessions":{"get":{"tags":["internal-feedback-sessions"],"summary":"List Feedback Packages","description":"Structured Prep feedback packages, newest first, with their sessions.","operationId":"list_feedback_packages_api_internal_feedback_sessions_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffFeedbackPackageList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/feedback-sessions/{session_id}":{"patch":{"tags":["internal-feedback-sessions"],"summary":"Update Feedback Session","description":"Set a session's status, its notes, or both. Only the fields sent are changed.","operationId":"update_feedback_session_api_internal_feedback_sessions__session_id__patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffUpdateSessionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffFeedbackSession"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/feedback-sessions/instructors":{"get":{"tags":["internal-feedback-sessions"],"summary":"Get Feedback Instructors","description":"Who takes Structured Prep feedback sessions for each subject.","operationId":"get_feedback_instructors_api_internal_feedback_sessions_instructors_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffInstructorOverview"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/feedback-sessions/instructors/{subject}":{"put":{"tags":["internal-feedback-sessions"],"summary":"Set Feedback Instructor","description":"Assign, change or remove the instructor for one subject (admin or course manager).","operationId":"set_feedback_instructor_api_internal_feedback_sessions_instructors__subject__put","security":[{"HTTPBearer":[]}],"parameters":[{"name":"subject","in":"path","required":true,"schema":{"type":"string","title":"Subject"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffSetInstructorRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StaffInstructorOverview"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/institutions/{slug}":{"get":{"tags":["institutions"],"summary":"Get Institution Landing","description":"Public landing payload for the branded URL `/institutions/{slug}`.\n\nReturns 404 for unknown slugs. PII fields are omitted by schema\ncontract (`InstitutionPublicResponse`).","operationId":"get_institution_landing_api_v1_institutions__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstitutionPublicResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/classroom/home":{"get":{"tags":["me-classroom"],"summary":"Get Classroom Home","description":"Current-week sessions + outstanding tasks + overdue tasks.\n\nWeeks are **cohort-relative** (#TBD bug fix): \"this week\" means\ndays N..N+6 of the cohort program (anchored on `cohort.start_date`),\nNOT the calendar Mon-Sun week containing today. So a student in\na cohort that started on Saturday sees their Week 1 as Sat-Fri,\nnot Mon-Sun of the calendar week that happens to contain Saturday.\nBefore cohort start, the \"current\" week is week 0.","operationId":"get_classroom_home_api_v1_me_classroom_home_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassroomHomeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/classroom/segments":{"get":{"tags":["me-classroom"],"summary":"Get Classroom Segments","description":"One **fixed 3-week block** of the cohort schedule, with navigation.\n\nWeeks are **cohort-relative**: week 0 = days 0..6 of the cohort, week 1\n= days 7..13, etc. (the displayed \"Week N\" labels come from\n`week_index + 1`). Blocks are fixed and anchored to the cohort start —\nblock 0 = weeks 0..2, block 1 = weeks 3..5, and so on — NOT a rolling\nwindow. `segment_index` selects the block; when omitted it defaults to\nthe block that contains today (`current_segment_index`). The response\ncarries `total_segments` (derived from the cohort's start→end span) and\n`current_segment_index` so the UI can render Back/Next within\n`[0, total_segments-1]` and offer a jump-to-now. The trailing block may\nhold fewer than 3 weeks when the cohort length isn't a multiple of 3;\nweeks past the cohort end are not emitted.\n\nEach week includes its sessions chronologically + tasks tied to those\nsessions. Tier 5's SegmentsPage renders this directly.","operationId":"get_classroom_segments_api_v1_me_classroom_segments_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"segment_index","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"title":"Segment Index"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassroomSegmentsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/classroom/assigned-content":{"get":{"tags":["me-classroom"],"summary":"Get Assigned Content","description":"Return the lesson / assessment / skill ids currently assigned\nto the student via session tasks. Used by the Resources tab to\nlock everything that's NOT in these sets.","operationId":"get_assigned_content_api_v1_me_classroom_assigned_content_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignedContentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/classroom/sessions/{session_id}":{"get":{"tags":["me-classroom"],"summary":"Get Classroom Session","description":"Single-session detail. 403 if the session is not in one of the\nuser's active-membership cohorts (prevents direct-URL leak).","operationId":"get_classroom_session_api_v1_me_classroom_sessions__session_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/classroom/tasks":{"get":{"tags":["me-classroom"],"summary":"List Classroom Tasks","description":"Flat task list across the user's cohort sessions. Optional\nfilters narrow to pre/post work or a time window.","operationId":"list_classroom_tasks_api_v1_me_classroom_tasks_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/SessionTaskKind"},{"type":"null"}],"title":"Kind"}},{"name":"week_start","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Week Start"}},{"name":"week_end","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Week End"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ClassroomTaskResponse"},"title":"Response List Classroom Tasks Api V1 Me Classroom Tasks Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/classroom/tasks/{task_id}/complete":{"post":{"tags":["me-classroom"],"summary":"Complete Classroom Task","description":"Mark a SessionTask as completed. Idempotent — a second call\nreturns the same response.\n\nStream 1 doesn't ship a SessionTaskProgress table (Stream 2 may);\nuntil then this is a no-op acknowledgement to keep the frontend\nUX consistent. Tier 5's TasksCard issues the click; the actual\ncompletion state lives on the routed primitive (Lesson progress,\nAssessment attempt, etc.).","operationId":"complete_classroom_task_api_v1_me_classroom_tasks__task_id__complete_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"task_id","in":"path","required":true,"schema":{"type":"integer","title":"Task Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__me_classroom__TaskCompleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/classroom/feedback":{"post":{"tags":["me-classroom"],"summary":"Submit Classroom Feedback","description":"Submit the biweekly program-feedback form for the current cycle.","operationId":"submit_classroom_feedback_api_v1_me_classroom_feedback_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackSubmitRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackOutcomeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/feedback/packages":{"get":{"tags":["me-feedback"],"summary":"List My Packages","description":"List the student's post-mock feedback packages (newest first).","operationId":"list_my_packages_api_v1_me_feedback_packages_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FeedbackPackageResponse"},"title":"Response List My Packages Api V1 Me Feedback Packages Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/feedback/packages/{package_id}/booking-options":{"get":{"tags":["me-feedback"],"summary":"Get Booking Options","description":"Per-subject booking options (auto-routed primary instructor, or a picker).","operationId":"get_booking_options_api_v1_me_feedback_packages__package_id__booking_options_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"package_id","in":"path","required":true,"schema":{"type":"integer","title":"Package Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PackageBookingOptions"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/feedback/sessions":{"get":{"tags":["me-feedback"],"summary":"List My Sessions","description":"The student's booked 1-on-1 sessions, split into upcoming and past.","operationId":"list_my_sessions_api_v1_me_feedback_sessions_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MySessionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/feedback/sessions/{session_id}/cancel":{"post":{"tags":["me-feedback"],"summary":"Cancel My Session","description":"Cancel one of the student's own sessions (Cal.com cancellations also sync via webhook).","operationId":"cancel_my_session_api_v1_me_feedback_sessions__session_id__cancel_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"integer","title":"Session Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeedbackSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/olympiad/offers/{offer_id}/interest":{"post":{"tags":["olympiad"],"summary":"Submit Olympiad Interest","operationId":"submit_olympiad_interest_api_v1_olympiad_offers__offer_id__interest_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"offer_id","in":"path","required":true,"schema":{"type":"integer","title":"Offer Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OlympiadInterestRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OlympiadInterestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/olympiad/sponsor-interest":{"post":{"tags":["olympiad"],"summary":"Submit Sponsor Interest","operationId":"submit_sponsor_interest_api_v1_olympiad_sponsor_interest_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SponsorInterestCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SponsorInterestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["olympiad"],"summary":"My Sponsor Interests","operationId":"my_sponsor_interests_api_v1_olympiad_sponsor_interest_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MySponsorInterests"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sat-olympiad/status":{"get":{"tags":["SAT Olympiad"],"summary":"Get Olympiad Status","description":"Drives the dashboard Start button and the submitted/thank-you state.","operationId":"get_olympiad_status_api_v1_sat_olympiad_status_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__sat_olympiad__OlympiadStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sat-olympiad/start":{"post":{"tags":["SAT Olympiad"],"summary":"Start Olympiad Test","description":"Resolve which paper this student sits. Creates no attempt.\n\nThe attempt is created by the assessment player, so the timer starts when\nthe student actually begins — not when they click through to instructions.","operationId":"start_olympiad_test_api_v1_sat_olympiad_start_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OlympiadStartResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sat-olympiad/results":{"get":{"tags":["SAT Olympiad"],"summary":"Get Olympiad Result","description":"This student's own Olympiad result, once results are published.\n\nScore, section split, pacing, topic and difficulty breakdowns, and a\nquestion-by-question review of their own attempt. The generic insights\nsurfaces stay closed for Olympiad attempts either way: this endpoint is the\nsingle place a competitor sees any of it, and only after an operator\npublishes.\n\nEverything here is measured against this student's own paper. There is no\ncohort comparison — the per-question learner stats Nova shows on mocks\n(`success_rate`, `median_time_seconds`) are unpopulated for these questions,\nso any \"vs other students\" figure would be fabricated.","operationId":"get_olympiad_result_api_v1_sat_olympiad_results_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OlympiadResultResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sat-olympiad/certificate":{"get":{"tags":["SAT Olympiad"],"summary":"Get Olympiad Certificate","description":"#1508: a short-lived link to this student's own certificate PDF.\n\nTakes no attempt id: the certificate is always the one for the caller's own newest Olympiad attempt.\n403 until results and certificates are both published, or without a scored attempt; 404 when no\nfile was uploaded for the attempt.","operationId":"get_olympiad_certificate_api_v1_sat_olympiad_certificate_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OlympiadCertificateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sat-olympiad/awards":{"get":{"tags":["SAT Olympiad"],"summary":"Get Olympiad Awards","description":"What this student unlocked, computed now from the published rules\n(score bands, rank among all submitted attempts), with their claims.","operationId":"get_olympiad_awards_api_v1_sat_olympiad_awards_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OlympiadAwardsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sat-olympiad/claims":{"get":{"tags":["SAT Olympiad"],"summary":"List Olympiad Claims","operationId":"list_olympiad_claims_api_v1_sat_olympiad_claims_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OlympiadClaimResponse"},"title":"Response List Olympiad Claims Api V1 Sat Olympiad Claims Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["SAT Olympiad"],"summary":"Create Olympiad Claim","description":"Claim an unlocked scholarship. Idempotent per (student, partner, award).","operationId":"create_olympiad_claim_api_v1_sat_olympiad_claims_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OlympiadClaimCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OlympiadClaimCreated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/sat-olympiad/kareers-booking":{"get":{"tags":["SAT Olympiad"],"summary":"Get Kareers Booking","description":"The state of this student's kareers.ai session, as Zoho Bookings last reported it.","operationId":"get_kareers_booking_api_v1_sat_olympiad_kareers_booking_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/KareersBookingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessment-engine/public/diagnostic/{exam}":{"get":{"tags":["assessment-engine"],"summary":"Get Public Diagnostic Availability","description":"PUBLIC (no auth) — does `exam` have a launchable diagnostic? (1017b B5)\n\nDrives the per-exam free-test landing page (ExamLeadMagnetPage): if a single\nactive DIAGNOSTIC exists, return its id + display info so the page can render a\nreal \"Start free test\" CTA into the engine player; otherwise `available=false`\nso the page falls back to coming-soon / Dmango. Reads assessment metadata only\n(no user data) — safe to expose pre-auth, mirroring the SAT lead-magnet config route.","operationId":"get_public_diagnostic_availability_api_v1_assessment_engine_public_diagnostic__exam__get","parameters":[{"name":"exam","in":"path","required":true,"schema":{"type":"string","title":"Exam"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessment-engine/public/lead-magnets/{exam}":{"get":{"tags":["assessment-engine"],"summary":"Get Public Lead Magnet Catalog","description":"PUBLIC (no auth) — the exam's full lead-magnet catalog (#1017h).\n\nGeneralizes `public/diagnostic/{exam}` to ALL funnel magnet types (diagnostic,\nfull mock, section tests). Returns one entry per magnet: `available` ones carry\nthe engine `assessment_id` (so the hub can build a register→launch CTA), and\ncontent-less/ambiguous ones carry `available=false` + a reason so the page\nrenders coming-soon / Dmango instead of dead-ending. Metadata only — safe pre-auth.","operationId":"get_public_lead_magnet_catalog_api_v1_assessment_engine_public_lead_magnets__exam__get","parameters":[{"name":"exam","in":"path","required":true,"schema":{"type":"string","title":"Exam"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessment-engine/assigned/":{"get":{"tags":["assessment-engine"],"summary":"Get Assigned Assessment","operationId":"get_assigned_assessment_api_v1_assessment_engine_assigned__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"exam_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exam Type"}},{"name":"assessment_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assessment Type"}},{"name":"assessment_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Assessment Id"}},{"name":"attempt_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Attempt Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssignedAssessmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessment-engine/{assessment_id}/start/":{"post":{"tags":["assessment-engine"],"summary":"Start Assessment Route","operationId":"start_assessment_route_api_v1_assessment_engine__assessment_id__start__post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"assessment_id","in":"path","required":true,"schema":{"type":"integer","title":"Assessment Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__assessment_engine__schemas__attempt__StartAssessmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessment-engine/{assessment_id}/section/{section_order}/start/":{"post":{"tags":["assessment-engine"],"summary":"Start Section Route","operationId":"start_section_route_api_v1_assessment_engine__assessment_id__section__section_order__start__post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"assessment_id","in":"path","required":true,"schema":{"type":"integer","title":"Assessment Id"}},{"name":"section_order","in":"path","required":true,"schema":{"type":"integer","title":"Section Order"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SectionStartResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessment-engine/{assessment_id}/section/{section_order}/save-time/":{"post":{"tags":["assessment-engine"],"summary":"Save Section Time Route","operationId":"save_section_time_route_api_v1_assessment_engine__assessment_id__section__section_order__save_time__post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"assessment_id","in":"path","required":true,"schema":{"type":"integer","title":"Assessment Id"}},{"name":"section_order","in":"path","required":true,"schema":{"type":"integer","title":"Section Order"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveSectionTimeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessment-engine/{assessment_id}/section/{section_order}/complete/":{"post":{"tags":["assessment-engine"],"summary":"Complete Section Route","operationId":"complete_section_route_api_v1_assessment_engine__assessment_id__section__section_order__complete__post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"assessment_id","in":"path","required":true,"schema":{"type":"integer","title":"Assessment Id"}},{"name":"section_order","in":"path","required":true,"schema":{"type":"integer","title":"Section Order"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompleteSectionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessment-engine/{assessment_id}/section-status/":{"get":{"tags":["assessment-engine"],"summary":"Section Status Route","operationId":"section_status_route_api_v1_assessment_engine__assessment_id__section_status__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"assessment_id","in":"path","required":true,"schema":{"type":"integer","title":"Assessment Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SectionStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessment-engine/{assessment_id}/save-response/":{"post":{"tags":["assessment-engine"],"summary":"Save Response Route","operationId":"save_response_route_api_v1_assessment_engine__assessment_id__save_response__post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"assessment_id","in":"path","required":true,"schema":{"type":"integer","title":"Assessment Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveResponseRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveResponseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessment-engine/{assessment_id}/save-responses/":{"post":{"tags":["assessment-engine"],"summary":"Save Responses Route","description":"Bulk autosave: persist a batch of buffered answers in one transaction.\nThe client's section-end / submit flush uses this so N answers cost one\nround-trip instead of N (the one-page IELTS listening view buffers every\nanswer to submit).","operationId":"save_responses_route_api_v1_assessment_engine__assessment_id__save_responses__post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"assessment_id","in":"path","required":true,"schema":{"type":"integer","title":"Assessment Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveResponsesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SaveResponsesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessment-engine/{assessment_id}/mark-for-review/":{"post":{"tags":["assessment-engine"],"summary":"Mark For Review Route","description":"Toggle the marked-for-review flag for one question in an attempt.\n\nPersists into `EngineResponse.question_evaluation.marked_for_review`.\nCreates the response row on first toggle so users can flag before\nanswering (Bucket A behaviour preserved).","operationId":"mark_for_review_route_api_v1_assessment_engine__assessment_id__mark_for_review__post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"assessment_id","in":"path","required":true,"schema":{"type":"integer","title":"Assessment Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkForReviewRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkForReviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessment-engine/{assessment_id}/marked-for-review/":{"get":{"tags":["assessment-engine"],"summary":"Marked For Review List Route","description":"List question ids the user has flagged for review in this attempt.\n\nUsed by the client on player mount to hydrate the local marked-set.","operationId":"marked_for_review_list_route_api_v1_assessment_engine__assessment_id__marked_for_review__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"assessment_id","in":"path","required":true,"schema":{"type":"integer","title":"Assessment Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MarkedForReviewListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessment-engine/{assessment_id}/telemetry/":{"post":{"tags":["assessment-engine"],"summary":"Telemetry Route","description":"Accept a fire-and-forget client telemetry event.\n\nAllow-listed events only (see attempt_service._TELEMETRY_EVENTS).\nAlways returns 200; the response just signals whether the event\nwas on the allow-list. No DB writes — events flow to structured\nlogs for downstream analytics.","operationId":"telemetry_route_api_v1_assessment_engine__assessment_id__telemetry__post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"assessment_id","in":"path","required":true,"schema":{"type":"integer","title":"Assessment Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelemetryEventRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TelemetryEventResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessment-engine/{assessment_id}/integrity-events/":{"post":{"tags":["assessment-engine"],"summary":"Engine Integrity Events Route","description":"Store a batch of on-device proctoring + browser events (#1063c).","operationId":"engine_integrity_events_route_api_v1_assessment_engine__assessment_id__integrity_events__post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"assessment_id","in":"path","required":true,"schema":{"type":"integer","title":"Assessment Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrityEventsBatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Engine Integrity Events Route Api V1 Assessment Engine  Assessment Id  Integrity Events  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessment-engine/{assessment_id}/proctoring-consent/":{"post":{"tags":["assessment-engine"],"summary":"Engine Proctoring Consent Route","description":"Record proctoring consent for the caller's attempt (#1057h audit trail).","operationId":"engine_proctoring_consent_route_api_v1_assessment_engine__assessment_id__proctoring_consent__post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"assessment_id","in":"path","required":true,"schema":{"type":"integer","title":"Assessment Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Engine Proctoring Consent Route Api V1 Assessment Engine  Assessment Id  Proctoring Consent  Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessment-engine/{assessment_id}/recording-upload-url/":{"post":{"tags":["assessment-engine"],"summary":"Request Recording Upload Url Route","description":"Step 1 of the audio upload flow — issue an upload destination.\n\nProduction: a v4-signed PUT URL pointed at the private GCS\nattempt-artifacts bucket. The frontend PUTs the audio directly to\nGCS; no bytes flow through this backend.\n\nLocal-dev fallback (no GCS creds): a URL pointed at our own\n`recording-local-blob` endpoint. Identical one-PUT contract on the\nclient.","operationId":"request_recording_upload_url_route_api_v1_assessment_engine__assessment_id__recording_upload_url__post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"assessment_id","in":"path","required":true,"schema":{"type":"integer","title":"Assessment Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__assessment_engine__schemas__response__RecordingUploadUrlRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__assessment_engine__schemas__response__RecordingUploadUrlResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessment-engine/{assessment_id}/recording-confirm/":{"post":{"tags":["assessment-engine"],"summary":"Confirm Recording Route","description":"Step 3 — after the PUT succeeds, the frontend confirms the\nobject_name + duration so we stamp the response row. The result\nenvelope later resolves the object_name back to a playable URL.","operationId":"confirm_recording_route_api_v1_assessment_engine__assessment_id__recording_confirm__post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"assessment_id","in":"path","required":true,"schema":{"type":"integer","title":"Assessment Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordingConfirmRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordingConfirmResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessment-engine/{assessment_id}/submit/":{"post":{"tags":["assessment-engine"],"summary":"Submit Assessment Route","operationId":"submit_assessment_route_api_v1_assessment_engine__assessment_id__submit__post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"assessment_id","in":"path","required":true,"schema":{"type":"integer","title":"Assessment Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SubmitAssessmentRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__assessment_engine__schemas__attempt__SubmitAssessmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessment-engine/result/":{"get":{"tags":["assessment-engine"],"summary":"Result Route","operationId":"result_route_api_v1_assessment_engine_result__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"exam_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exam Type"}},{"name":"assessment_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assessment Type"}},{"name":"assessment_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Assessment Id"}},{"name":"attempt_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Attempt Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssessmentResultResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessment-engine/attempts/{attempt_id}/request-grading/":{"post":{"tags":["assessment-engine"],"summary":"Request Grading Route","description":"#1100: have AI grading run on an attempt that was submitted without it —\nthe user upgraded afterwards. Idempotent while a run is in progress.","operationId":"request_grading_route_api_v1_assessment_engine_attempts__attempt_id__request_grading__post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"attempt_id","in":"path","required":true,"schema":{"type":"integer","title":"Attempt Id"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RequestGradingResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessment-engine/status/":{"get":{"tags":["assessment-engine"],"summary":"Status Route","operationId":"status_route_api_v1_assessment_engine_status__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"exam_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exam Type"}},{"name":"assessment_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assessment Type"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssessmentStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessment-engine/olympiad-status/":{"get":{"tags":["assessment-engine"],"summary":"Olympiad Status Route","operationId":"olympiad_status_route_api_v1_assessment_engine_olympiad_status__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__assessment_engine__schemas__attempt__OlympiadStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/assessment-engine/profile-gate/":{"post":{"tags":["assessment-engine"],"summary":"Profile Gate Route","description":"Collect phone + graduation year.\n\nL2 NOTE: dmango's profile gate wrote to UserProfileInfo / AdmissionInfo /\nPhone. Nova's user-profile shape differs; this endpoint is a thin success\nresponse so the client flow doesn't break. Wire up to\n`app.services.user_profile_service` when its shape is finalized.","operationId":"profile_gate_route_api_v1_assessment_engine_profile_gate__post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileGateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProfileGateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/assessment-engine/admin/grading/":{"get":{"tags":["assessment-engine-internal"],"summary":"List Grading Queue Route","operationId":"list_grading_queue_route_api_internal_assessment_engine_admin_grading__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"exam_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exam Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GradingQueueListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/assessment-engine/admin/grade-response/":{"post":{"tags":["assessment-engine-internal"],"summary":"Admin Grade Response Route","operationId":"admin_grade_response_route_api_internal_assessment_engine_admin_grade_response__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminGradeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminGradeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/assessment-engine/admin/assessments/":{"get":{"tags":["assessment-engine-internal"],"summary":"Admin List Assessments Route","operationId":"admin_list_assessments_route_api_internal_assessment_engine_admin_assessments__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"exam_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exam Type"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminEngineAssessmentListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/assessment-engine/admin/assessments/{assessment_id}/proctoring":{"patch":{"tags":["assessment-engine-internal"],"summary":"Admin Set Proctoring Route","operationId":"admin_set_proctoring_route_api_internal_assessment_engine_admin_assessments__assessment_id__proctoring_patch","security":[{"HTTPBearer":[]}],"parameters":[{"name":"assessment_id","in":"path","required":true,"schema":{"type":"integer","title":"Assessment Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ProctoringConfig"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Admin Set Proctoring Route Api Internal Assessment Engine Admin Assessments  Assessment Id  Proctoring Patch"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/assessment-engine/admin/publish-results/":{"post":{"tags":["assessment-engine-internal"],"summary":"Admin Publish Route","operationId":"admin_publish_route_api_internal_assessment_engine_admin_publish_results__post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPublishResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/assessment-engine/admin/unpublish-results/":{"post":{"tags":["assessment-engine-internal"],"summary":"Admin Unpublish Route","operationId":"admin_unpublish_route_api_internal_assessment_engine_admin_unpublish_results__post","requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminPublishResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/internal/assessment-engine/admin/results/":{"get":{"tags":["assessment-engine-internal"],"summary":"Admin Results Route","operationId":"admin_results_route_api_internal_assessment_engine_admin_results__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"exam_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exam Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AdminResultsListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/internal/assessment-engine/internal/update-grades/":{"post":{"tags":["assessment-engine-internal"],"summary":"Bulk Update Grades Route","description":"AI grading worker payload — applies the per-response scores in bulk.\n\nL2 uses admin-auth here to stay compatible with the existing internal\ntier. The Epic 4 worker integration replaces this with a shared\nsecret + IP allowlist matching `app/api/internal/grading.py`.","operationId":"bulk_update_grades_route_api_internal_assessment_engine_internal_update_grades__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkGradeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BulkGradeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/v1/webhooks/calcom":{"post":{"tags":["webhooks"],"summary":"Handle Calcom Webhook","description":"Receive and process Cal.com booking webhooks (signature-verified).","operationId":"handle_calcom_webhook_api_v1_webhooks_calcom_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/webhooks/zoho-bookings":{"post":{"tags":["webhooks"],"summary":"Handle Zoho Bookings Webhook","operationId":"handle_zoho_bookings_webhook_api_v1_webhooks_zoho_bookings_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/external/users":{"post":{"tags":["external"],"summary":"External User Create","description":"Provision a Galvanize account from a partner webhook payload.\n\nIdempotent — if `email` is already in our DB, returns the existing\nuser with HTTP 200 + `status=\"exists\"`. Net-new emails return HTTP\n201 + `status=\"created\"`. Both branches fire an Entrayn sync.\n\nNo verification email is sent; the user is created with\n`is_email_verified=True` and a random password. Partners point\ntheir attendees at the existing forgot-password flow when login\nbecomes relevant (event day).","operationId":"external_user_create_api_v1_external_users_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalUserCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExternalUserCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/service/v1/ping":{"get":{"tags":["service-v1"],"summary":"Service Ping","description":"Service-auth smoke endpoint: 200 only with a valid X-API-Key (B1).","operationId":"service_ping_service_v1_ping_get","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"title":"Response Service Ping Service V1 Ping Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/service/v1/questions:publish":{"post":{"tags":["service-v1"],"summary":"Questions Publish","description":"Publish a batch of author-approved questions into the engine bank (N2-B3).\n\nPartial-commit, idempotent on `source_version_hash`, drift-guarded via the\npublish ledger. Honors the body `dry_run` flag (also exposed as :dry-run).","operationId":"questions_publish_service_v1_questions_publish_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionsPublishRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionsPublishResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/service/v1/questions:dry-run":{"post":{"tags":["service-v1"],"summary":"Questions Publish Dry Run","description":"Validate + report what a publish WOULD do, writing nothing (forces dry_run).","operationId":"questions_publish_dry_run_service_v1_questions_dry_run_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionsPublishRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionsPublishResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/service/v1/questions:unpublish":{"post":{"tags":["service-v1"],"summary":"Questions Unpublish","description":"Make published questions unservable without destroying history (N2-B3-2).","operationId":"questions_unpublish_service_v1_questions_unpublish_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionsUnpublishRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionsUnpublishResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/service/v1/questions/{source_id}/impact":{"get":{"tags":["service-v1"],"summary":"Question Impact","description":"Read-only preview of what changing/unpublishing this question affects (N2-B3-2).","operationId":"question_impact_service_v1_questions__source_id__impact_get","parameters":[{"name":"source_id","in":"path","required":true,"schema":{"type":"string","title":"Source Id"}},{"name":"source_system","in":"query","required":true,"schema":{"type":"string","title":"Source System"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuestionImpact"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/service/v1/questions/published":{"get":{"tags":["service-v1"],"summary":"Questions Published","description":"List the source_ids this publisher currently has in the engine bank, so it\ncan reconcile its local \"published to Nova\" state (Studio Sync-from-Nova).","operationId":"questions_published_service_v1_questions_published_get","parameters":[{"name":"source_system","in":"query","required":true,"schema":{"type":"string","title":"Source System"}},{"name":"exam","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exam"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishedSourceIds"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/service/v1/assessments:publish":{"post":{"tags":["service-v1"],"summary":"Assessment Publish","description":"Publish a full assessment ATOMICALLY (N2-B4): all sections/groups/questions/\noptions + shells in one transaction. Non-destructive for attempted content\n(G1); validates the asset manifest before commit (G7). Honors body dry_run.","operationId":"assessment_publish_service_v1_assessments_publish_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssessmentPublishRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssessmentPublishResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/service/v1/assessments:dry-run":{"post":{"tags":["service-v1"],"summary":"Assessment Publish Dry Run","description":"Validate + report what an assessment publish WOULD do, writing nothing.","operationId":"assessment_publish_dry_run_service_v1_assessments_dry_run_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssessmentPublishRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssessmentPublishResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/service/v1/lessons:publish":{"post":{"tags":["service-v1"],"summary":"Lessons Publish","description":"Publish a batch of lessons (N2-B5). Idempotent upsert keyed on source_id;\npartial-commit. Honors body dry_run.","operationId":"lessons_publish_service_v1_lessons_publish_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonsPublishRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonsPublishResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/service/v1/lessons:dry-run":{"post":{"tags":["service-v1"],"summary":"Lessons Publish Dry Run","description":"Validate + report what a lessons publish WOULD do, writing nothing.","operationId":"lessons_publish_dry_run_service_v1_lessons_dry_run_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonsPublishRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonsPublishResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/service/v1/lessons:unpublish":{"post":{"tags":["service-v1"],"summary":"Lessons Unpublish","description":"Hide published lessons (is_active=False) without deleting them (N2-B5).","operationId":"lessons_unpublish_service_v1_lessons_unpublish_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonsUnpublishRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LessonsUnpublishResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/service/v1/skills:publish":{"post":{"tags":["service-v1"],"summary":"Skills Publish","description":"Safe-tier skill-graph sync (N2-B6): create/edit/reorder/soft-deactivate.\nIdempotent upsert by external_id; parents before children; honors dry_run.","operationId":"skills_publish_service_v1_skills_publish_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillsPublishRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillsPublishResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/service/v1/skills:dry-run":{"post":{"tags":["service-v1"],"summary":"Skills Publish Dry Run","description":"Validate + report what a skills publish WOULD do, writing nothing.","operationId":"skills_publish_dry_run_service_v1_skills_dry_run_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillsPublishRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillsPublishResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/service/v1/skills/{external_id}/impact":{"get":{"tags":["service-v1"],"summary":"Skill Impact","description":"Preview what a skill node touches (children/questions/lessons/mastery) +\na safe_to_delete flag — gates the dangerous tier (B6-2).","operationId":"skill_impact_service_v1_skills__external_id__impact_get","parameters":[{"name":"external_id","in":"path","required":true,"schema":{"type":"string","title":"External Id"}},{"name":"source_system","in":"query","required":true,"schema":{"type":"string","title":"Source System"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SkillImpact"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/external/form-submissions":{"post":{"tags":["external"],"summary":"Form Submission Create","description":"Ingest a Bricks form submission.\n\nIdempotent on ``(form_id, submission_uuid)``:\n- Net-new submission → HTTP 201, status=\"created\", submission_id of\n  the new row. 2 outbound_event_queue rows enqueued (zoho_crm + ga4)\n  in the same DB transaction.\n- Duplicate → HTTP 200, status=\"exists\", original submission_id. No\n  additional queue rows.\n\nReturns 401 on missing / wrong X-API-Key, or when the server-side\nsecret is empty (endpoint disabled).\n\nThe endpoint is async because the service stores the wire-shape\nJSON body verbatim in ``raw_payload``. Reading it via\n``await request.json()`` requires the async path. Pydantic still\nvalidates the typed shape for OpenAPI / 422 / typed column\nextraction; ``raw_body`` is the storage source of truth so any\nfields Bricks sends ahead of Nova's schema survive into JSONB for\nreplay.\n\nAll blocking DB work (create + commit + scalar extraction +\nclose) runs inside ``run_in_threadpool``. The endpoint receives\na plain dict back; no ORM objects cross the threadpool boundary.","operationId":"form_submission_create_api_v1_external_form_submissions_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormSubmissionCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormSubmissionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/external/form-submissions/verify-otp":{"post":{"tags":["external"],"summary":"Form Submission Verify Otp","description":"Verify an emailed OTP for a pending form submission (#691 W4).\n\nOn success the submission promotes from ``pending_otp`` to ``active``\nand its 2 deferred outbound events (zoho_crm + ga4) enqueue. Status →\nHTTP mapping: verified→200, invalid_code→400, expired→410, locked→429.","operationId":"form_submission_verify_otp_api_v1_external_form_submissions_verify_otp_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormOtpVerifyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormOtpVerifyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/external/form-submissions/resend-otp":{"post":{"tags":["external"],"summary":"Form Submission Resend Otp","description":"Re-issue a fresh OTP on an existing challenge (#691 W4).\n\nEach resend is an emailed code, so it counts against the same\nper-form-10min + per-email-hour SEND windows as initial sends, plus a\nper-challenge resend cap. not_found→404, rate-limited or capped→429,\nsend-failure→503, sent→200.","operationId":"form_submission_resend_otp_api_v1_external_form_submissions_resend_otp_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormOtpResendRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormOtpResendResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/external/cart-intents":{"post":{"tags":["external"],"summary":"Create Cart Intent","operationId":"create_cart_intent_api_v1_external_cart_intents_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CartIntentCreateRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CartIntentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/external/olympiad-registrations":{"post":{"tags":["external"],"summary":"Create Olympiad Registration","operationId":"create_olympiad_registration_api_v1_external_olympiad_registrations_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OlympiadRegistrationRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OlympiadRegistrationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/external/olympiad-registrations/{public_uuid}/resume":{"get":{"tags":["external"],"summary":"Resume Olympiad Registration","description":"epic #1098d — the branded resume page calls this to re-open inline Checkout\nfor an unpaid registration (keyed by the unguessable public_uuid). Idempotent:\nreuses the existing Razorpay Order, so no second charge surface.","operationId":"resume_olympiad_registration_api_v1_external_olympiad_registrations__public_uuid__resume_get","parameters":[{"name":"public_uuid","in":"path","required":true,"schema":{"type":"string","title":"Public Uuid"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OlympiadResumeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/external/zma-elevation":{"post":{"tags":["external"],"summary":"Zma Elevation","operationId":"zma_elevation_api_v1_external_zma_elevation_post","parameters":[{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZmaElevationRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZmaElevationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/trials/eligibility":{"get":{"tags":["trials"],"summary":"Check Eligibility","description":"Check if current user can activate the SAT Guided Trial.\n\nReturns eligibility status and reason if not eligible.","operationId":"check_eligibility_api_v1_trials_eligibility_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrialEligibilityResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/trials/status":{"get":{"tags":["trials"],"summary":"Get Status","description":"Get current trial status for the authenticated user.\n\nReturns:\n- has_used_trial: Whether user has ever activated a trial\n- is_trial_active: Whether trial is currently active\n- trial_started_at: When trial was activated (if applicable)\n- trial_expires_at: When trial expires (if applicable)\n- days_remaining: Days left in trial (if active)\n- current_tier: User's current tier","operationId":"get_status_api_v1_trials_status_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrialStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/trials/dismiss-expiry":{"post":{"tags":["trials"],"summary":"Dismiss Expiry","description":"Dismiss trial expiry notification. Optionally downgrade to free tier.\n\nIdempotent: calling twice is safe (already dismissed = no-op on flag).","operationId":"dismiss_expiry_api_v1_trials_dismiss_expiry_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DismissExpiryRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DismissExpiryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/trials/activate":{"post":{"tags":["trials"],"summary":"Activate User Trial","description":"Closed. No new SAT Guided Trials are issued (Ram, 2026-09-24).\n\nThe 14-day trial came off `/pricing` on 18 Sep and out of the product on\n24 Sep. Students already inside a trial keep it until it expires — nothing\nhere touches an existing subscription — but the door is shut on new ones,\nserver-side, so no surface can open one by accident. The study plan now\nbelongs to Structured Prep.\n\nReturns 410 Gone. `GET /trials/status` still answers for the students who\nare mid-trial, and `POST /trials/dismiss-expiry` still works for those whose\ntrial has run out.","operationId":"activate_user_trial_api_v1_trials_activate_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TrialActivateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/entitlements":{"get":{"tags":["entitlements"],"summary":"Get My Entitlements","description":"Get the current user's full entitlement state.\n\nReturns plan info, per-feature limits with usage counts, and\navailable upgrade options with display-ready pricing in the user's\ncountry/currency (detected from the request IP).","operationId":"get_my_entitlements_api_v1_me_entitlements_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EntitlementsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/subscriptions":{"get":{"tags":["entitlements","entitlements"],"summary":"List My Active Subscriptions","description":"List ALL currently-active Subscriptions for the user.\n\nDrives the Epic 5f extension purchase UX: when the response has\nmore than one item, the frontend prompts the user to pick which\nsubscription to extend rather than silently picking via the\nitem_id=0 sentinel.\n\nSubscriptions are returned ordered by `activated_at DESC` (most\nrecently activated first). Each item carries enough metadata for\nthe FE to render a meaningful row.","operationId":"list_my_active_subscriptions_api_v1_me_subscriptions_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActiveSubscriptionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/me/exams/{exam_slug}/claim-free":{"post":{"tags":["entitlements","entitlements"],"summary":"Claim Free Exam Subscription","description":"Lazy-create a Free Subscription for ``exam_slug`` if the user has\nnone, else return their existing active subscription on that exam.\n\nReturns:\n    200 with subscription metadata + ``was_newly_created`` flag.\n\nRaises:\n    400 ``unknown_exam`` — slug not in the ExamCode enum.\n    403 ``exam_not_available`` — exam exists but has no Free Package\n        configured (e.g. IELTS today: shells in place but no Free\n        tier seeded). The frontend marks the session and stops\n        retrying for this exam.","operationId":"claim_free_exam_subscription_api_v1_me_exams__exam_slug__claim_free_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"exam_slug","in":"path","required":true,"schema":{"type":"string","title":"Exam Slug"}},{"name":"access_token","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClaimFreeResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/_debug/sentry_test":{"get":{"tags":["debug"],"summary":"Sentry Test","description":"Raise a RuntimeError to verify Sentry ingestion is working.\n\nIf `SENTRY_DSN` is configured in this environment, Sentry captures the\nexception + stack trace and the event appears in the dashboard with\n`environment: {staging|development}` tag within ~30s.\n\nReturns 500 to the caller by design — the exception bubbles to FastAPI's\ndefault handler.\n\nNEVER available in production — the router isn't registered there. See\nmain.py conditional include.","operationId":"sentry_test_api_v1__debug_sentry_test_get","responses":{"500":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/dev/recordings/upload/{rel_path}":{"put":{"tags":["dev"],"summary":"Upload Recording Dev","description":"Local-dev stand-in for a GCS signed PUT (#915). The client PUTs raw\nbytes here and we write them under uploads/recordings/ so the\ndirect-upload flow is exercisable without GCS. Prod/staging mint real\nsigned URLs instead and never hit this route.\n\nPUBLIC: no auth, matching the unauthenticated-but-signed GCS URL it\nreplaces. Guarded to the development env, path-traversal-safe, and size\ncapped so it can't be abused as an open file drop.","operationId":"upload_recording_dev_api_v1_dev_recordings_upload__rel_path__put","parameters":[{"name":"rel_path","in":"path","required":true,"schema":{"type":"string","title":"Rel Path"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dev/recordings/{rel_path}":{"get":{"tags":["dev"],"summary":"Stream Recording","operationId":"stream_recording_api_v1_dev_recordings__rel_path__get","parameters":[{"name":"rel_path","in":"path","required":true,"schema":{"type":"string","title":"Rel Path"}},{"name":"Range","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Range"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"summary":"Root","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AcademicInfo":{"properties":{"grade":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grade"},"school_board":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"School Board"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"target_exam_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Target Exam Date"}},"type":"object","title":"AcademicInfo","description":"Academic information (grade, school board, country, target exam date)."},"AccountDeletionRequestCreate":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"reason":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Reason"},"confirmed":{"type":"boolean","title":"Confirmed"}},"type":"object","required":["email","confirmed"],"title":"AccountDeletionRequestCreate","description":"Public form payload for /delete-account."},"AccountDeletionRequestResponse":{"properties":{"id":{"type":"integer","title":"Id"},"email":{"type":"string","format":"email","title":"Email"},"requested_at":{"type":"string","format":"date-time","title":"Requested At"},"message":{"type":"string","title":"Message"}},"type":"object","required":["id","email","requested_at","message"],"title":"AccountDeletionRequestResponse","description":"Confirmation response after a successful submission."},"AccountType":{"type":"string","enum":["student","parent"],"title":"AccountType"},"AccountTypeResponse":{"properties":{"account_type":{"anyOf":[{"$ref":"#/components/schemas/AccountType"},{"type":"null"}]},"message":{"type":"string","title":"Message"}},"type":"object","required":["account_type","message"],"title":"AccountTypeResponse","description":"Response with account type status."},"AccountTypeUpdate":{"properties":{"account_type":{"$ref":"#/components/schemas/AccountType"}},"type":"object","required":["account_type"],"title":"AccountTypeUpdate","description":"Request to set or update account type."},"ActiveSubscriptionItem":{"properties":{"subscription_id":{"type":"integer","title":"Subscription Id"},"exam_slug":{"type":"string","title":"Exam Slug"},"tier":{"type":"string","title":"Tier"},"package_display_name":{"type":"string","title":"Package Display Name"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["subscription_id","exam_slug","tier","package_display_name","expires_at"],"title":"ActiveSubscriptionItem","description":"One active Subscription, surfaced for the FE extension picker.\n\nFrontend uses this to render a \"which subscription do you want to\nextend?\" selector when the user has more than one active row."},"ActiveSubscriptionsResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ActiveSubscriptionItem"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"ActiveSubscriptionsResponse"},"ActivityItem":{"properties":{"id":{"type":"string","title":"Id","description":"Composite '<kind>:<id>' key for client lists"},"kind":{"type":"string","enum":["mock","section_test","diagnostic","drill","lesson","engine_mock","engine_diagnostic"],"title":"Kind"},"exam_slug":{"type":"string","title":"Exam Slug"},"title":{"type":"string","title":"Title"},"completed_at":{"type":"string","format":"date-time","title":"Completed At"},"score":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Score","description":"Pre-formatted display string e.g. '1300' or '85%' or 'Done'"},"score_kind":{"anyOf":[{"type":"string","enum":["raw","percentage","done"]},{"type":"null"}],"title":"Score Kind"},"deeplink_url":{"type":"string","title":"Deeplink Url"}},"type":"object","required":["id","kind","exam_slug","title","completed_at","deeplink_url"],"title":"ActivityItem","description":"One row in the mixed-source recent-activity timeline."},"AddonOfferingCreate":{"properties":{"feature_key":{"type":"string","title":"Feature Key"},"label":{"type":"string","maxLength":120,"title":"Label"},"quantity":{"type":"integer","exclusiveMinimum":0.0,"title":"Quantity"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"applicable_exam_slugs":{"items":{"type":"string"},"type":"array","title":"Applicable Exam Slugs"},"applicable_package_ids":{"items":{"type":"integer"},"type":"array","title":"Applicable Package Ids"},"india_listed_price":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d{0,2}0*$"},{"type":"null"}],"title":"India Listed Price"},"india_net_price":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d{0,2}0*$"},{"type":"null"}],"title":"India Net Price"},"india_tax_applicable":{"type":"boolean","title":"India Tax Applicable","default":false},"india_tax_pct":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d{0,2}0*$"},{"type":"null"}],"title":"India Tax Pct"},"intl_listed_price":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d{0,2}0*$"},{"type":"null"}],"title":"Intl Listed Price"},"intl_net_price":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d{0,2}0*$"},{"type":"null"}],"title":"Intl Net Price"},"intl_tax_applicable":{"type":"boolean","title":"Intl Tax Applicable","default":false},"intl_tax_pct":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d{0,2}0*$"},{"type":"null"}],"title":"Intl Tax Pct"},"is_active":{"type":"boolean","title":"Is Active","default":true}},"type":"object","required":["feature_key","label","quantity"],"title":"AddonOfferingCreate","description":"Create an offering. feature_key must be in the code allowlist; service\nvalidates quantity bounds, commercials (listed>=net, net>0), and scope overlap."},"AddonOfferingUpdate":{"properties":{"label":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Label"},"quantity":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Quantity"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"applicable_exam_slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Applicable Exam Slugs"},"applicable_package_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Applicable Package Ids"},"india_listed_price":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d{0,2}0*$"},{"type":"null"}],"title":"India Listed Price"},"india_net_price":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d{0,2}0*$"},{"type":"null"}],"title":"India Net Price"},"india_tax_applicable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"India Tax Applicable"},"india_tax_pct":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d{0,2}0*$"},{"type":"null"}],"title":"India Tax Pct"},"intl_listed_price":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d{0,2}0*$"},{"type":"null"}],"title":"Intl Listed Price"},"intl_net_price":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d{0,2}0*$"},{"type":"null"}],"title":"Intl Net Price"},"intl_tax_applicable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Intl Tax Applicable"},"intl_tax_pct":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d{0,2}0*$"},{"type":"null"}],"title":"Intl Tax Pct"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"AddonOfferingUpdate","description":"Editable fields. Omitted fields are unchanged; feature_key + slug immutable."},"AddonOfferingView":{"properties":{"id":{"type":"integer","title":"Id"},"slug":{"type":"string","title":"Slug"},"feature_key":{"type":"string","title":"Feature Key"},"quantity":{"type":"integer","title":"Quantity"},"label":{"type":"string","title":"Label"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"applicable_exam_slugs":{"items":{"type":"string"},"type":"array","title":"Applicable Exam Slugs"},"applicable_package_ids":{"items":{"type":"integer"},"type":"array","title":"Applicable Package Ids"},"india_listed_price":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"India Listed Price"},"india_net_price":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"India Net Price"},"india_tax_applicable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"India Tax Applicable"},"india_tax_pct":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"India Tax Pct"},"intl_listed_price":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Intl Listed Price"},"intl_net_price":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Intl Net Price"},"intl_tax_applicable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Intl Tax Applicable"},"intl_tax_pct":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Intl Tax Pct"},"is_active":{"type":"boolean","title":"Is Active"}},"type":"object","required":["id","slug","feature_key","quantity","label","description","applicable_exam_slugs","applicable_package_ids","india_listed_price","india_net_price","india_tax_applicable","india_tax_pct","intl_listed_price","intl_net_price","intl_tax_applicable","intl_tax_pct","is_active"],"title":"AddonOfferingView","description":"An add-on offering for the admin tab + buyer display."},"AddonOverrideUpdate":{"properties":{"label":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Label"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"price_inr":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d{0,2}0*$"},{"type":"null"}],"title":"Price Inr"},"price_usd":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d{0,2}0*$"},{"type":"null"}],"title":"Price Usd"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"applicable_exam_slugs":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Applicable Exam Slugs"}},"type":"object","title":"AddonOverrideUpdate","description":"Editable commercials. Omitted fields are left unchanged; feature_key /\ncredits_added are code-bound and not accepted."},"AddonPackageResponse":{"properties":{"id":{"type":"string","title":"Id"},"feature_key":{"type":"string","title":"Feature Key"},"credits_added":{"type":"integer","title":"Credits Added"},"label":{"type":"string","title":"Label"},"description":{"type":"string","title":"Description"},"price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Price"},"currency":{"type":"string","title":"Currency"},"currency_symbol":{"type":"string","title":"Currency Symbol"},"country_code":{"type":"string","title":"Country Code"},"listed_price":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Listed Price"},"tax_amount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Tax Amount"},"round_off":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Round Off"},"quantity":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Quantity"}},"type":"object","required":["id","feature_key","credits_added","label","description","price","currency","currency_symbol","country_code"],"title":"AddonPackageResponse","description":"One purchasable SubscriptionAddOn SKU with display-ready pricing."},"AddonPackagesListResponse":{"properties":{"available":{"type":"boolean","title":"Available"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"packages":{"items":{"$ref":"#/components/schemas/AddonPackageResponse"},"type":"array","title":"Packages","default":[]}},"type":"object","required":["available"],"title":"AddonPackagesListResponse","description":"Wraps the add-on catalog so the FE can branch on `available`."},"AddonView":{"properties":{"id":{"type":"string","title":"Id"},"feature_key":{"type":"string","title":"Feature Key"},"credits_added":{"type":"integer","title":"Credits Added"},"label":{"type":"string","title":"Label"},"description":{"type":"string","title":"Description"},"applicable_exam_slugs":{"items":{"type":"string"},"type":"array","title":"Applicable Exam Slugs"},"is_active":{"type":"boolean","title":"Is Active"},"price_inr":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Price Inr"},"price_usd":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Price Usd"},"has_override":{"type":"boolean","title":"Has Override"}},"type":"object","required":["id","feature_key","credits_added","label","description","applicable_exam_slugs","is_active","price_inr","price_usd","has_override"],"title":"AddonView","description":"An effective add-on (code config + override applied) for the admin tab."},"AdminEngineAssessmentItem":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"name_external":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name External"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"exam_type":{"type":"string","title":"Exam Type"},"assessment_type":{"type":"string","title":"Assessment Type"},"is_active":{"type":"boolean","title":"Is Active"},"total_time_mins":{"type":"integer","title":"Total Time Mins"},"proctoring_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Proctoring Config"}},"type":"object","required":["id","name","exam_type","assessment_type","is_active","total_time_mins"],"title":"AdminEngineAssessmentItem","description":"One row in the internal console's engine-assessments list (#1063h)."},"AdminEngineAssessmentListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AdminEngineAssessmentItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"AdminEngineAssessmentListResponse"},"AdminGradeRequest":{"properties":{"response_id":{"type":"integer","title":"Response Id"},"points_earned":{"type":"integer","minimum":0.0,"title":"Points Earned"},"grader_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grader Notes","default":""}},"type":"object","required":["response_id","points_earned"],"title":"AdminGradeRequest","description":"Manual grade submission — matches dmango `GradeResponseSerializer`."},"AdminGradeResponse":{"properties":{"message":{"type":"string","title":"Message"},"points_earned":{"type":"integer","title":"Points Earned"},"all_graded":{"type":"boolean","title":"All Graded"}},"type":"object","required":["message","points_earned","all_graded"],"title":"AdminGradeResponse"},"AdminOrderView":{"properties":{"id":{"type":"integer","title":"Id"},"user_id":{"type":"integer","title":"User Id"},"price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Price"},"currency":{"type":"string","title":"Currency"},"gateway":{"type":"string","title":"Gateway"},"gateway_order_id":{"type":"string","title":"Gateway Order Id"},"gateway_payment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gateway Payment Id"},"status":{"type":"string","title":"Status"},"item_type":{"type":"string","title":"Item Type"},"item_id":{"type":"integer","title":"Item Id"},"fulfillment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fulfillment Id"},"failure_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Reason"}},"type":"object","required":["id","user_id","price","currency","gateway","gateway_order_id","gateway_payment_id","status","item_type","item_id","fulfillment_id","failure_reason"],"title":"AdminOrderView","description":"Order detail as shown to an admin. Mirrors PaymentOrder fields that\nmake sense externally; omits internal webhook timestamps."},"AdminPublishResponse":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"AdminPublishResponse"},"AdminResultsItem":{"properties":{"attempt_id":{"type":"integer","title":"Attempt Id"},"user_id":{"type":"integer","title":"User Id"},"user_email":{"type":"string","title":"User Email"},"user_name":{"type":"string","title":"User Name"},"assessment_name":{"type":"string","title":"Assessment Name"},"exam_type":{"type":"string","title":"Exam Type"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"auto_score":{"type":"integer","title":"Auto Score"},"manual_score":{"type":"integer","title":"Manual Score"},"total_score":{"type":"integer","title":"Total Score"},"max_score":{"type":"integer","title":"Max Score"},"percentage":{"type":"number","title":"Percentage"},"is_result_published":{"type":"boolean","title":"Is Result Published"},"is_grading_complete":{"type":"boolean","title":"Is Grading Complete"}},"type":"object","required":["attempt_id","user_id","user_email","user_name","assessment_name","exam_type","auto_score","manual_score","total_score","max_score","percentage","is_result_published","is_grading_complete"],"title":"AdminResultsItem"},"AdminResultsListResponse":{"properties":{"count":{"type":"integer","title":"Count"},"results":{"items":{"$ref":"#/components/schemas/AdminResultsItem"},"type":"array","title":"Results","default":[]}},"type":"object","required":["count"],"title":"AdminResultsListResponse"},"AdvisorRequestRequest":{"properties":{"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},"type":"object","title":"AdvisorRequestRequest","description":"Request to record an advisor contact request."},"AdvisorRequestResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"triggered_dq":{"type":"boolean","title":"Triggered Dq"},"qualification_status":{"type":"string","title":"Qualification Status"},"redirect_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect Url"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","triggered_dq","qualification_status","message"],"title":"AdvisorRequestResponse","description":"Response after recording an advisor contact request."},"AnswerBulkSubmit":{"properties":{"answers":{"items":{"$ref":"#/components/schemas/app__schemas__assessment__AnswerSubmit"},"type":"array","title":"Answers"}},"type":"object","required":["answers"],"title":"AnswerBulkSubmit","description":"Schema for submitting multiple answers at once (e.g., on submit)."},"AssessmentHistoryResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AttemptHistoryItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["items","total","page","page_size"],"title":"AssessmentHistoryResponse","description":"Paginated assessment history."},"AssessmentListItem":{"properties":{"id":{"type":"integer","title":"Id"},"title":{"type":"string","title":"Title"},"display_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Title"},"assessment_type":{"type":"string","title":"Assessment Type"},"question_count":{"type":"integer","title":"Question Count"},"section_count":{"type":"integer","title":"Section Count","default":0},"time_limit_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Time Limit Minutes"},"is_active":{"type":"boolean","title":"Is Active"},"version":{"type":"integer","title":"Version","default":1},"total_attempts":{"type":"integer","title":"Total Attempts","default":0},"proctoring_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Proctoring Config"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","title","assessment_type","question_count","time_limit_minutes","is_active","created_at"],"title":"AssessmentListItem"},"AssessmentOption":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"assessment_type":{"type":"string","title":"Assessment Type"}},"type":"object","required":["id","name","assessment_type"],"title":"AssessmentOption","description":"A pick-list entry for the admin form's assessment dropdown."},"AssessmentPublishRequest":{"properties":{"source_system":{"type":"string","title":"Source System"},"dry_run":{"type":"boolean","title":"Dry Run","default":false},"external_id":{"type":"string","title":"External Id"},"name":{"type":"string","title":"Name"},"name_external":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name External"},"exam_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exam Type"},"assessment_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assessment Type"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"},"is_active":{"type":"boolean","title":"Is Active","default":true},"sections":{"items":{"$ref":"#/components/schemas/PublishSection"},"type":"array","maxItems":50,"minItems":1,"title":"Sections"}},"additionalProperties":false,"type":"object","required":["source_system","external_id","name","sections"],"title":"AssessmentPublishRequest"},"AssessmentPublishResponse":{"properties":{"dry_run":{"type":"boolean","title":"Dry Run"},"assessment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Assessment Id"},"created":{"type":"boolean","title":"Created","default":false},"sections":{"type":"integer","title":"Sections","default":0},"groups":{"type":"integer","title":"Groups","default":0},"questions":{"type":"integer","title":"Questions","default":0},"options":{"type":"integer","title":"Options","default":0},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"}},"type":"object","required":["dry_run"],"title":"AssessmentPublishResponse"},"AssessmentQualificationResult":{"properties":{"effort_score":{"type":"number","title":"Effort Score"},"is_serious":{"type":"boolean","title":"Is Serious"},"triggered_dq":{"type":"boolean","title":"Triggered Dq"},"trigger_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trigger Type"}},"type":"object","required":["effort_score","is_serious","triggered_dq"],"title":"AssessmentQualificationResult","description":"Qualification check result for an assessment attempt (#69)."},"AssessmentResponse":{"properties":{"id":{"type":"integer","title":"Id"},"assessment_type":{"type":"string","title":"Assessment Type"},"title":{"type":"string","title":"Title"},"display_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"question_count":{"type":"integer","title":"Question Count"},"time_limit_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Time Limit Minutes"},"section_time_limits":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Section Time Limits"},"sections":{"items":{"$ref":"#/components/schemas/SectionInfo"},"type":"array","title":"Sections","default":[]},"is_timed":{"type":"boolean","title":"Is Timed"},"subject_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Subject Id"},"subject_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject Code"},"topic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topic"},"subtopic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtopic"},"is_official":{"type":"boolean","title":"Is Official","default":false},"proctoring_config":{"anyOf":[{"$ref":"#/components/schemas/ProctoringConfig"},{"type":"null"}]},"is_completed":{"type":"boolean","title":"Is Completed","default":false},"completed_attempt_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Completed Attempt Id"},"has_in_progress_attempt":{"type":"boolean","title":"Has In Progress Attempt","default":false},"in_progress_attempt_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"In Progress Attempt Id"}},"type":"object","required":["id","assessment_type","title","description","question_count","time_limit_minutes","is_timed","topic","subtopic"],"title":"AssessmentResponse","description":"Full assessment details response."},"AssessmentResultResponse":{"properties":{"is_result_published":{"type":"boolean","title":"Is Result Published"},"result":{"anyOf":[{"$ref":"#/components/schemas/DetailedResultResponse"},{"type":"null"}]},"profile_gate_required":{"type":"boolean","title":"Profile Gate Required","default":false},"attempt_id":{"type":"integer","title":"Attempt Id"},"payment_required":{"type":"boolean","title":"Payment Required","default":false},"grading_in_progress":{"type":"boolean","title":"Grading In Progress","default":false},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"},"is_submitted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Submitted"},"grading_unlock":{"anyOf":[{"$ref":"#/components/schemas/GradingUnlockStateResponse"},{"type":"null"}]}},"type":"object","required":["is_result_published","attempt_id"],"title":"AssessmentResultResponse","description":"Envelope returned by `/result/`."},"AssessmentStatusResponse":{"properties":{"has_attempt":{"type":"boolean","title":"Has Attempt"},"attempt_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Attempt Id"},"assessment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Assessment Id"},"assessment_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assessment Name"},"exam_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exam Type"},"assessment_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assessment Type"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"is_submitted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Submitted"},"is_result_published":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Result Published"},"is_grading_complete":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Grading Complete"}},"type":"object","required":["has_attempt"],"title":"AssessmentStatusResponse"},"AssignedAssessmentResponse":{"properties":{"assigned":{"type":"boolean","title":"Assigned"},"attempt_id":{"type":"integer","title":"Attempt Id"},"is_submitted":{"type":"boolean","title":"Is Submitted"},"is_result_published":{"type":"boolean","title":"Is Result Published"},"is_grading_complete":{"type":"boolean","title":"Is Grading Complete"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"current_section_order":{"type":"integer","title":"Current Section Order"},"section_time_remaining_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Section Time Remaining Seconds"},"section_started":{"type":"boolean","title":"Section Started","default":false},"assessment":{"$ref":"#/components/schemas/EngineAssessmentDetailResponse"}},"type":"object","required":["assigned","attempt_id","is_submitted","is_result_published","is_grading_complete","current_section_order","assessment"],"title":"AssignedAssessmentResponse","description":"Mirrors the dmango `AssignedAssessmentView` payload."},"AssignedContentResponse":{"properties":{"lesson_ids":{"items":{"type":"integer"},"type":"array","title":"Lesson Ids"},"assessment_ids":{"items":{"type":"integer"},"type":"array","title":"Assessment Ids"},"skill_node_ids":{"items":{"type":"integer"},"type":"array","title":"Skill Node Ids"}},"type":"object","required":["lesson_ids","assessment_ids","skill_node_ids"],"title":"AssignedContentResponse","description":"Set of Nova primitives (lessons + assessments) currently\nassigned to the student via any non-archived SessionTask in\ntheir active cohort.\n\nThe Resources tab uses this to lock everything that's NOT in\nthese sets so classroom students see \"only what your instructor\nassigned\" instead of the full catalog."},"AttemptHistoryItem":{"properties":{"id":{"type":"integer","title":"Id"},"assessment_id":{"type":"integer","title":"Assessment Id"},"assessment_type":{"type":"string","title":"Assessment Type"},"title":{"type":"string","title":"Title"},"display_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Title"},"score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Score"},"section_scores":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Section Scores"},"status":{"type":"string","title":"Status"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"time_taken_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Time Taken Minutes"}},"type":"object","required":["id","assessment_id","assessment_type","title","score","section_scores","status","completed_at","time_taken_minutes"],"title":"AttemptHistoryItem","description":"Single item in assessment history."},"AttemptResponse":{"properties":{"id":{"type":"integer","title":"Id"},"user":{"type":"integer","title":"User"},"assessment":{"type":"integer","title":"Assessment"},"assessment_name":{"type":"string","title":"Assessment Name"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"is_submitted":{"type":"boolean","title":"Is Submitted"},"is_result_published":{"type":"boolean","title":"Is Result Published"},"is_grading_complete":{"type":"boolean","title":"Is Grading Complete"}},"type":"object","required":["id","user","assessment","assessment_name","is_submitted","is_result_published","is_grading_complete"],"title":"AttemptResponse","description":"Mirrors dmango `AttemptSerializer`."},"AttemptStateResponse":{"properties":{"attempt_id":{"type":"integer","title":"Attempt Id"},"assessment_id":{"type":"integer","title":"Assessment Id"},"status":{"type":"string","title":"Status"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"time_elapsed_seconds":{"type":"integer","title":"Time Elapsed Seconds"},"time_remaining_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Time Remaining Seconds"},"answered_count":{"type":"integer","title":"Answered Count"},"flagged_count":{"type":"integer","title":"Flagged Count"},"total_questions":{"type":"integer","title":"Total Questions"},"current_module":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Current Module"},"answers":{"additionalProperties":true,"type":"object","title":"Answers"},"section_start_times":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Section Start Times"},"section_time_remaining":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Section Time Remaining"}},"type":"object","required":["attempt_id","assessment_id","status","started_at","time_elapsed_seconds","time_remaining_seconds","answered_count","flagged_count","total_questions","current_module","answers"],"title":"AttemptStateResponse","description":"Current state of an in-progress attempt (for resume)."},"AttendanceStatus":{"type":"string","enum":["present","late","absent","excused","no_show"],"title":"AttendanceStatus","description":"Per-student status at a Session.\n\n`no_show` distinguishes \"registered but never joined\" from\n`absent` (excused or unexcused but expected to be absent)."},"AttributionPayload":{"properties":{"first_touch_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Touch Source"},"first_touch_medium":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Touch Medium"},"first_touch_campaign":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Touch Campaign"},"first_touch_term":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Touch Term"},"first_touch_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Touch Content"},"first_touch_gclid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Touch Gclid"},"first_touch_landing":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Touch Landing"},"first_touch_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"First Touch Date"},"first_touch_referrer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Touch Referrer"},"last_touch_gclid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Touch Gclid"},"galv_client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Galv Client Id"},"salesiq_visitor_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Salesiq Visitor Id"},"pagesense_visitor_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pagesense Visitor Id"},"session_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Session Count"},"page_permalink":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Page Permalink"},"request_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Url"}},"type":"object","title":"AttributionPayload","description":"Bricks first-touch attribution wire contract.\n\nAll fields nullable — Bricks sends what it has. Most submissions\nwill only carry ``galv_client_id`` + ``page_permalink`` + a couple\nof utm_*. First-touch fields are populated when galvanize-tracker\ncookie resolves them; without the cookie, Bricks sends the current\nsubmission's page as first_touch and Nova writes that as the\nwrite-once first-touch baseline."},"AuthCodeExchangeRequest":{"properties":{"code":{"type":"string","title":"Code"}},"type":"object","required":["code"],"title":"AuthCodeExchangeRequest","description":"Request to exchange authorization code for tokens."},"AuthCodeExchangeResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"refresh_token":{"type":"string","title":"Refresh Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"expires_in":{"type":"integer","title":"Expires In","default":900}},"type":"object","required":["access_token","refresh_token"],"title":"AuthCodeExchangeResponse","description":"Response with tokens after code exchange."},"AuthProvider":{"type":"string","enum":["email","google"],"title":"AuthProvider"},"BacklogTasksResponse":{"properties":{"plan_id":{"type":"integer","title":"Plan Id"},"segment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Segment Id"},"as_of_date":{"type":"string","format":"date","title":"As Of Date"},"tasks":{"items":{"$ref":"#/components/schemas/TaskProgressResponse"},"type":"array","title":"Tasks"},"total_count":{"type":"integer","title":"Total Count"},"backlog_count":{"type":"integer","title":"Backlog Count"},"backlog_threshold_exceeded":{"type":"boolean","title":"Backlog Threshold Exceeded"}},"type":"object","required":["plan_id","segment_id","as_of_date","tasks","total_count","backlog_count","backlog_threshold_exceeded"],"title":"BacklogTasksResponse","description":"Tasks due today or earlier, still pending — the 'today queue'."},"BatchDashboardResponse":{"properties":{"pending_actions":{"items":{"$ref":"#/components/schemas/PendingAction"},"type":"array","title":"Pending Actions"},"students_requiring_attention":{"items":{"$ref":"#/components/schemas/StudentAttention"},"type":"array","title":"Students Requiring Attention"}},"type":"object","required":["pending_actions","students_requiring_attention"],"title":"BatchDashboardResponse"},"BatchDetailResponse":{"properties":{"batch_id":{"type":"string","title":"Batch Id"},"source_system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source System"},"items":{"items":{"$ref":"#/components/schemas/BatchRowSummary"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["batch_id","items","total","limit","offset"],"title":"BatchDetailResponse"},"BatchImageUploadResponse":{"properties":{"total":{"type":"integer","title":"Total"},"successful":{"type":"integer","title":"Successful"},"failed":{"type":"integer","title":"Failed"},"results":{"items":{"$ref":"#/components/schemas/BatchImageUploadResult"},"type":"array","title":"Results"}},"type":"object","required":["total","successful","failed","results"],"title":"BatchImageUploadResponse","description":"Response for batch image upload."},"BatchImageUploadResult":{"properties":{"filename":{"type":"string","title":"Filename"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"success":{"type":"boolean","title":"Success"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["filename","url","success","error"],"title":"BatchImageUploadResult","description":"Result for a single image in batch upload."},"BatchRowSummary":{"properties":{"kind":{"type":"string","title":"Kind"},"row_id":{"type":"integer","title":"Row Id"},"source_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Id"},"validation_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Validation Status"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"validation_reviewed_by_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Validation Reviewed By Id"},"validation_reviewed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Validation Reviewed At"}},"type":"object","required":["kind","row_id"],"title":"BatchRowSummary","description":"A single provenance-tracked row within a batch."},"BatchUploadImagesResult":{"properties":{"total":{"type":"integer","title":"Total"},"uploaded":{"type":"integer","title":"Uploaded"},"failed":{"type":"integer","title":"Failed"},"results":{"items":{"$ref":"#/components/schemas/ImageUploadResult"},"type":"array","title":"Results"}},"type":"object","required":["total","uploaded","failed","results"],"title":"BatchUploadImagesResult","description":"Result of batch image upload."},"BlockingReason":{"properties":{"kind":{"type":"string","enum":["target_degree","target_intake"],"title":"Kind"},"message":{"type":"string","title":"Message","description":"User-facing copy for the gate modal/inline call"},"cta_action":{"type":"string","enum":["open_target_degree_modal","open_target_intake_modal"],"title":"Cta Action"}},"type":"object","required":["kind","message","cta_action"],"title":"BlockingReason","description":"A reason the dashboard is gated. Frontend shows a modal/inline call\nfor each item. Empty list = no gating."},"Body_complete_task_endpoint_api_v1_study_plan_tasks__progress_id__complete_post":{"properties":{"score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Score"},"time_spent_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Time Spent Minutes"}},"type":"object","title":"Body_complete_task_endpoint_api_v1_study_plan_tasks__progress_id__complete_post"},"Body_import_lessons_from_file_api_internal_lessons_import_file_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_import_lessons_from_file_api_internal_lessons_import_file_post"},"Body_import_questions_with_images_api_internal_questions_import_with_images_post":{"properties":{"questions_json":{"type":"string","title":"Questions Json","description":"JSON string containing array of questions"},"images":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Images","description":"Image files referenced in questions","default":[]},"preview_only":{"type":"boolean","title":"Preview Only","description":"Validate without saving","default":false},"import_mode":{"type":"string","title":"Import Mode","description":"Import mode: create_only, update_only, or create_and_update","default":"create_only"}},"type":"object","required":["questions_json"],"title":"Body_import_questions_with_images_api_internal_questions_import_with_images_post"},"Body_upload_image_api_internal_content_upload_image_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"folder":{"type":"string","title":"Folder","default":"sat/images"}},"type":"object","required":["file"],"title":"Body_upload_image_api_internal_content_upload_image_post"},"Body_upload_images_batch_api_internal_content_upload_images_post":{"properties":{"files":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Files"},"folder":{"type":"string","title":"Folder","default":"sat/images"}},"type":"object","required":["files"],"title":"Body_upload_images_batch_api_internal_content_upload_images_post"},"Body_upload_images_batch_api_internal_questions_upload_images_post":{"properties":{"images":{"items":{"type":"string","contentMediaType":"application/octet-stream"},"type":"array","title":"Images","description":"Image files to upload (max 10 at a time)"}},"type":"object","required":["images"],"title":"Body_upload_images_batch_api_internal_questions_upload_images_post"},"Body_upload_import_api_internal_marketing_csv_imports_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_import_api_internal_marketing_csv_imports_post"},"Body_upload_institution_logo_api_internal_institutions_upload_logo_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_institution_logo_api_internal_institutions_upload_logo_post"},"Body_upload_lesson_file_api_internal_lessons_upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_lesson_file_api_internal_lessons_upload_post"},"Body_upload_session_recording_api_internal_sessions__session_id__recording_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_session_recording_api_internal_sessions__session_id__recording_post"},"BulkGradeRequest":{"properties":{"attempt_id":{"type":"integer","title":"Attempt Id"},"results":{"items":{"$ref":"#/components/schemas/BulkGradeResultItem"},"type":"array","title":"Results"}},"type":"object","required":["attempt_id"],"title":"BulkGradeRequest","description":"Payload from the AI grading worker (engine path)."},"BulkGradeResponse":{"properties":{"status":{"type":"string","title":"Status"},"graded_count":{"type":"integer","title":"Graded Count"},"skipped_count":{"type":"integer","title":"Skipped Count"},"all_graded":{"type":"boolean","title":"All Graded"},"total_score":{"type":"integer","title":"Total Score"},"max_score":{"type":"integer","title":"Max Score"}},"type":"object","required":["status","graded_count","skipped_count","all_graded","total_score","max_score"],"title":"BulkGradeResponse"},"BulkGradeResultItem":{"properties":{"response_id":{"type":"integer","title":"Response Id"},"points_earned":{"type":"integer","title":"Points Earned"},"grader_notes":{"anyOf":[{},{"type":"null"}],"title":"Grader Notes"}},"type":"object","required":["response_id","points_earned"],"title":"BulkGradeResultItem"},"BulkUpdateContextsRequest":{"properties":{"question_ids":{"items":{"type":"integer"},"type":"array","title":"Question Ids"},"add_contexts":{"items":{"type":"string"},"type":"array","title":"Add Contexts","default":[]},"remove_contexts":{"items":{"type":"string"},"type":"array","title":"Remove Contexts","default":[]}},"type":"object","required":["question_ids"],"title":"BulkUpdateContextsRequest","description":"Request for bulk updating usage contexts"},"BulkUpdateContextsResponse":{"properties":{"updated":{"type":"integer","title":"Updated"},"failed":{"type":"integer","title":"Failed"},"errors":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Errors","default":[]}},"type":"object","required":["updated","failed"],"title":"BulkUpdateContextsResponse","description":"Response for bulk update"},"CartIntentCreateRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"sku":{"type":"string","maxLength":80,"minLength":1,"title":"Sku"},"price":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d{0,2}0*$"}],"title":"Price"},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency","default":"INR"},"marketing_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Marketing Metadata"},"first_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Last Name"},"phone":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Phone"}},"type":"object","required":["email","sku","price"],"title":"CartIntentCreateRequest","description":"Pre-auth cart-intent capture from the checkout funnel. Unknown keys are\nignored so the producer (a server-side GTP/Bricks hook) can send extras.\n\n``price`` is an INFORMATIONAL cart-value signal only — it is NOT used to\ncharge anyone (real payments resolve price server-side in payment_service),\nso a forged value pollutes a marketing number at worst, not money."},"CartIntentResponse":{"properties":{"recorded":{"type":"boolean","title":"Recorded","default":true}},"type":"object","title":"CartIntentResponse","description":"Beacon-style ack. Deliberately exposes NO internal row id or stored\nstatus, so the public endpoint can't be used to enumerate/probe which\n(email, sku) intents exist (codex W6c P2)."},"CatalogAddon":{"properties":{"feature_key":{"type":"string","title":"Feature Key"},"display":{"type":"string","title":"Display"}},"type":"object","required":["feature_key","display"],"title":"CatalogAddon","description":"One feature add-on advertised on the exam card."},"CatalogExam":{"properties":{"exam_slug":{"type":"string","title":"Exam Slug"},"display_name":{"type":"string","title":"Display Name"},"tiers":{"items":{"$ref":"#/components/schemas/CatalogPackage"},"type":"array","title":"Tiers"},"addons":{"items":{"$ref":"#/components/schemas/CatalogAddon"},"type":"array","title":"Addons"}},"type":"object","required":["exam_slug","display_name","tiers","addons"],"title":"CatalogExam","description":"One exam entry in the catalog response."},"CatalogPackage":{"properties":{"id":{"type":"integer","title":"Id"},"tier":{"type":"string","title":"Tier"},"display_name":{"type":"string","title":"Display Name"},"tagline":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tagline"},"price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"validity_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Validity Days"},"feature_limits":{"additionalProperties":true,"type":"object","title":"Feature Limits"}},"type":"object","required":["id","tier","display_name","tagline","price","currency","validity_days","feature_limits"],"title":"CatalogPackage","description":"One pricing tier surfaced in the catalog."},"CatalogResponse":{"properties":{"degree":{"type":"string","title":"Degree"},"exams":{"items":{"$ref":"#/components/schemas/CatalogExam"},"type":"array","title":"Exams"}},"type":"object","required":["degree","exams"],"title":"CatalogResponse","description":"Per-degree catalog response. `exams` is ordered per the\nDEGREE_TO_EXAMS declaration so the FE renders the most relevant\nexam first."},"CategoryPattern":{"properties":{"count":{"type":"integer","title":"Count"},"topics":{"items":{"type":"string"},"type":"array","title":"Topics","default":[]},"questions":{"items":{"type":"integer"},"type":"array","title":"Questions","default":[]}},"type":"object","required":["count"],"title":"CategoryPattern","description":"Aggregated pattern by mistake category (Task 4.14 data-driven)."},"ChangePasswordRequest":{"properties":{"current_password":{"type":"string","title":"Current Password"},"new_password":{"type":"string","title":"New Password"}},"type":"object","required":["current_password","new_password"],"title":"ChangePasswordRequest"},"ChangePasswordResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","message"],"title":"ChangePasswordResponse"},"CheckExistingQuestionsRequest":{"properties":{"source_ids":{"items":{"type":"string"},"type":"array","title":"Source Ids"}},"type":"object","required":["source_ids"],"title":"CheckExistingQuestionsRequest","description":"Request to check which questions already exist in DB."},"CheckExistingQuestionsResponse":{"properties":{"total":{"type":"integer","title":"Total"},"existing_count":{"type":"integer","title":"Existing Count"},"new_count":{"type":"integer","title":"New Count"},"existing":{"items":{"$ref":"#/components/schemas/ExistingQuestionInfo"},"type":"array","title":"Existing"}},"type":"object","required":["total","existing_count","new_count","existing"],"title":"CheckExistingQuestionsResponse","description":"Response for checking existing questions."},"CheckImagesRequest":{"properties":{"filenames":{"items":{"type":"string"},"type":"array","title":"Filenames"}},"type":"object","required":["filenames"],"title":"CheckImagesRequest","description":"Request to check which images already exist in GCS."},"CheckImagesResponse":{"properties":{"total":{"type":"integer","title":"Total"},"existing":{"type":"integer","title":"Existing"},"missing":{"type":"integer","title":"Missing"},"results":{"items":{"$ref":"#/components/schemas/ImageExistsResult"},"type":"array","title":"Results"}},"type":"object","required":["total","existing","missing","results"],"title":"CheckImagesResponse","description":"Response for checking image existence in GCS."},"ChecklistStep":{"properties":{"key":{"type":"string","title":"Key"},"label":{"type":"string","title":"Label"},"done":{"type":"boolean","title":"Done"},"action_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action Url"}},"type":"object","required":["key","label","done"],"title":"ChecklistStep","description":"One row in the first-login onboarding checklist."},"ChecklistSummary":{"properties":{"steps":{"items":{"$ref":"#/components/schemas/ChecklistStep"},"type":"array","title":"Steps"}},"type":"object","required":["steps"],"title":"ChecklistSummary","description":"Onboarding checklist — only populated when `is_first_login=True`."},"CheckoutGatewaysResponse":{"properties":{"country_code":{"type":"string","title":"Country Code"},"gateways":{"items":{"type":"string"},"type":"array","title":"Gateways"}},"type":"object","required":["country_code","gateways"],"title":"CheckoutGatewaysResponse","description":"#1584b — payment methods the buyer may pick at checkout.\n\n`gateways` is ordered, default first. One entry means there is nothing to\npick and the checkout shows no picker. The list is advisory for display:\n/initiate re-checks the pick against the same rules."},"CheckoutLinkCreate":{"properties":{"sku":{"type":"string","maxLength":64,"minLength":1,"title":"Sku"},"app":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"App"}},"type":"object","required":["sku"],"title":"CheckoutLinkCreate","description":"`sku` is the catalog SKU (``{exam}:{tier}``, or a real product SKU).\n\n`app` is a short KEY (``toefl`` | ``gre`` | ``sat``), never a URL or a\nscheme — the server maps it through an allowlist to build the post-payment\nreturn link. Unknown keys resolve to no return link rather than an error:\nthe purchase must never fail because a newer app sent a key this server\ndoesn't know yet."},"CheckoutLinkInfoResponse":{"properties":{"status":{"type":"string","title":"Status","default":"ok"},"sku":{"type":"string","title":"Sku"},"exam":{"type":"string","title":"Exam"},"tier":{"type":"string","title":"Tier"},"package":{"$ref":"#/components/schemas/PurchasePackageInfo"}},"type":"object","required":["sku","exam","tier","package"],"title":"CheckoutLinkInfoResponse","description":"Public redemption preview: what plan does this link select?\n\nReturned by GET /purchase/link-info so the page can render the package\ncard before the OTP dance. No issuer identity is exposed to the\nanonymous visitor."},"CheckoutLinkMintRequest":{"properties":{"sku":{"type":"string","maxLength":128,"minLength":3,"title":"Sku","description":"Catalog SKU, e.g. 'sat:guided'"},"ttl_hours":{"type":"integer","maximum":720.0,"minimum":1.0,"title":"Ttl Hours","description":"Link lifetime in hours (max 30 days).","default":72}},"type":"object","required":["sku"],"title":"CheckoutLinkMintRequest","description":"Mint a signed link for a catalog SKU (``{exam_slug}:{tier}``)."},"CheckoutLinkMintResponse":{"properties":{"url":{"type":"string","title":"Url"},"token":{"type":"string","title":"Token"},"link_id":{"type":"string","title":"Link Id"},"sku":{"type":"string","title":"Sku"},"exam":{"type":"string","title":"Exam"},"tier":{"type":"string","title":"Tier"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"issued_by":{"type":"string","title":"Issued By"}},"type":"object","required":["url","token","link_id","sku","exam","tier","expires_at","issued_by"],"title":"CheckoutLinkMintResponse"},"CheckoutLinkResponse":{"properties":{"url":{"type":"string","title":"Url"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"sku":{"type":"string","title":"Sku"},"exam":{"type":"string","title":"Exam"},"tier":{"type":"string","title":"Tier"}},"type":"object","required":["url","expires_at","sku","exam","tier"],"title":"CheckoutLinkResponse"},"CheckoutSessionResponse":{"properties":{"email":{"type":"string","title":"Email"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"sku":{"type":"string","title":"Sku"},"exam":{"type":"string","title":"Exam"},"tier":{"type":"string","title":"Tier"},"package":{"$ref":"#/components/schemas/PurchasePackageInfo"},"app_return_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App Return Url"}},"type":"object","required":["email","sku","exam","tier","package"],"title":"CheckoutSessionResponse","description":"What `PurchasePage` needs to open straight on the payment step."},"CheckpointRevealResponse":{"properties":{"is_checkpoint":{"type":"boolean","title":"Is Checkpoint"},"attempt_id":{"type":"integer","title":"Attempt Id"},"segment_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Segment Number"},"total_segments":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Segments"},"is_plan_complete":{"type":"boolean","title":"Is Plan Complete"},"mastery_delta":{"items":{"$ref":"#/components/schemas/MasteryDeltaItem"},"type":"array","title":"Mastery Delta"},"next_segment":{"anyOf":[{"$ref":"#/components/schemas/SegmentPreview"},{"type":"null"}]},"cta_url":{"type":"string","title":"Cta Url"},"cta_label":{"type":"string","title":"Cta Label"},"mock_review_progress_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mock Review Progress Id"},"mock_review_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mock Review Status"},"focus_directive":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Focus Directive"},"insights":{"anyOf":[{"additionalProperties":true,"type":"object"},{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Insights"}},"type":"object","required":["is_checkpoint","attempt_id","segment_number","total_segments","is_plan_complete","mastery_delta","next_segment","cta_url","cta_label"],"title":"CheckpointRevealResponse","description":"Response payload for GET /study-plan/reveal/{attempt_id}.\n\nWhen is_checkpoint=False all other fields are null/empty — the\nfrontend should fall through to the existing insights flow."},"ClaimFreeResponse":{"properties":{"subscription_id":{"type":"integer","title":"Subscription Id"},"exam_slug":{"type":"string","title":"Exam Slug"},"tier":{"type":"string","title":"Tier"},"was_newly_created":{"type":"boolean","title":"Was Newly Created"},"package_id":{"type":"integer","title":"Package Id"}},"type":"object","required":["subscription_id","exam_slug","tier","was_newly_created","package_id"],"title":"ClaimFreeResponse","description":"200 response for POST /me/exams/{exam_slug}/claim-free.\n\nThe `was_newly_created` flag lets the frontend decide whether to\nrefetch the dashboard (true) or skip the refetch as a no-op (false).\nMost repeat visits in a session are already short-circuited by the\nsessionStorage marker in the hook, but a fresh session-storage clear\nOR a multi-tab race may still hit this endpoint a second time —\nreturning the flag lets the caller stay quiet either way."},"ClassroomHomeResponse":{"properties":{"cohort":{"$ref":"#/components/schemas/CohortResponse"},"sessions_this_week":{"items":{"$ref":"#/components/schemas/SessionResponse"},"type":"array","title":"Sessions This Week"},"upcoming_tasks":{"items":{"$ref":"#/components/schemas/ClassroomTaskResponse"},"type":"array","title":"Upcoming Tasks"},"overdue_tasks":{"items":{"$ref":"#/components/schemas/ClassroomTaskResponse"},"type":"array","title":"Overdue Tasks"},"pending_task_weeks":{"items":{"$ref":"#/components/schemas/PendingTasksWeek"},"type":"array","title":"Pending Task Weeks","default":[]},"pending_feedback":{"anyOf":[{"$ref":"#/components/schemas/PendingFeedback"},{"type":"null"}]}},"type":"object","required":["cohort","sessions_this_week","upcoming_tasks","overdue_tasks"],"title":"ClassroomHomeResponse","description":"Payload for SATHomeClassroomBody (#347e). Compact — Tier 5\ndecides what to render."},"ClassroomSegmentsResponse":{"properties":{"cohort":{"$ref":"#/components/schemas/CohortResponse"},"segments":{"items":{"$ref":"#/components/schemas/SegmentWeek"},"type":"array","title":"Segments"},"segment_index":{"type":"integer","title":"Segment Index"},"total_segments":{"type":"integer","title":"Total Segments"},"current_segment_index":{"type":"integer","title":"Current Segment Index"}},"type":"object","required":["cohort","segments","segment_index","total_segments","current_segment_index"],"title":"ClassroomSegmentsResponse"},"ClassroomTaskResponse":{"properties":{"id":{"type":"integer","title":"Id"},"session_id":{"type":"integer","title":"Session Id"},"kind":{"$ref":"#/components/schemas/SessionTaskKind"},"task_type":{"$ref":"#/components/schemas/TaskType"},"lesson_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lesson Id"},"assessment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Assessment Id"},"skill_node_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Skill Node Id"},"drill_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Drill Config"},"display_order":{"type":"integer","title":"Display Order"},"due_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Due At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At"},"archived_by_internal_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Archived By Internal User Id"},"lesson_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lesson Title"},"lesson_content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lesson Content Type"},"assessment_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assessment Title"},"skill_node_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Skill Node Title"},"skill_node_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Skill Node Code"},"session_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Title"},"session_type":{"anyOf":[{"$ref":"#/components/schemas/SessionType"},{"type":"null"}]},"session_scheduled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Session Scheduled At"},"session_status":{"anyOf":[{"$ref":"#/components/schemas/SessionStatus"},{"type":"null"}]},"completed":{"type":"boolean","title":"Completed","default":false},"locked":{"type":"boolean","title":"Locked","default":false},"completed_attempt_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Completed Attempt Id"},"mock_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mock Number"}},"type":"object","required":["id","session_id","kind","task_type","lesson_id","assessment_id","skill_node_id","drill_config","display_order","due_at","created_at","updated_at"],"title":"ClassroomTaskResponse","description":"Student-facing task shape (#347 Stream 2a fix-bundle).\n\nExtends SessionTaskResponse with denormalized titles so the\nstudent UI can render meaningful labels (\"Algebra · Linear\nEquations\") and group tasks under their parent session without\na separate lookup per task. Only used by /me/classroom/{home,segments}."},"CohortAssignmentCreate":{"properties":{"internal_user_id":{"type":"integer","title":"Internal User Id"},"role":{"$ref":"#/components/schemas/CohortAssignmentRole"},"subject_skill_node_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Subject Skill Node Id"}},"type":"object","required":["internal_user_id","role"],"title":"CohortAssignmentCreate","description":"POST /api/internal/cohorts/{id}/assignments."},"CohortAssignmentResponse":{"properties":{"id":{"type":"integer","title":"Id"},"cohort_id":{"type":"integer","title":"Cohort Id"},"internal_user_id":{"type":"integer","title":"Internal User Id"},"role":{"$ref":"#/components/schemas/CohortAssignmentRole"},"subject_skill_node_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Subject Skill Node Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"is_primary":{"type":"boolean","title":"Is Primary","default":false}},"type":"object","required":["id","cohort_id","internal_user_id","role","subject_skill_node_id","created_at"],"title":"CohortAssignmentResponse"},"CohortAssignmentRole":{"type":"string","enum":["instructor","course_manager"],"title":"CohortAssignmentRole","description":"Role an InternalUser holds on a Cohort.\n\n- instructor: teaches a specific subject (level-1 SkillNode); one\n  InternalUser can be instructor for multiple subjects via\n  multi-row assignment (one row per subject).\n- course_manager: oversight role (no subject scope); responsible\n  for cohort operations end-to-end. Stream 2 adds a dedicated UI."},"CohortCreate":{"properties":{"institution_id":{"type":"integer","title":"Institution Id"},"exam_id":{"type":"integer","title":"Exam Id"},"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date"},"seat_count":{"type":"integer","minimum":0.0,"title":"Seat Count","default":0},"timezone":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Timezone"}},"type":"object","required":["institution_id","exam_id","name"],"title":"CohortCreate","description":"POST /api/internal/cohorts — timezone defaults from the institution\nwhen omitted (resolved server-side, not in the schema)."},"CohortMembershipResponse":{"properties":{"id":{"type":"integer","title":"Id"},"cohort_id":{"type":"integer","title":"Cohort Id"},"user_id":{"type":"integer","title":"User Id"},"subscription_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Subscription Id"},"enrolled_at":{"type":"string","format":"date-time","title":"Enrolled At"},"status":{"$ref":"#/components/schemas/CohortMembershipStatus"},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email"},"user_first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User First Name"},"user_last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Last Name"},"primary_guardian_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Guardian Email"},"primary_guardian_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Guardian Phone"},"primary_guardian_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Guardian Name"},"captured_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Captured At"},"captured_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Captured Source"},"deactivated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deactivated At"}},"type":"object","required":["id","cohort_id","user_id","subscription_id","enrolled_at","status"],"title":"CohortMembershipResponse"},"CohortMembershipStatus":{"type":"string","enum":["active","inactive"],"title":"CohortMembershipStatus","description":"Per-row status for a student's membership in a Cohort.\n\n- active: student is currently enrolled; classroom subscription is\n  `is_active=True`; appears in roster + session attendance lists.\n- inactive: student removed by admin (e.g. dropped out); paired\n  Subscription is deactivated; row retained for audit trail."},"CohortReportRecipientCreate":{"properties":{"institution_coordinator_id":{"type":"integer","title":"Institution Coordinator Id"},"report_types":{"items":{"type":"string"},"type":"array","title":"Report Types"}},"type":"object","required":["institution_coordinator_id"],"title":"CohortReportRecipientCreate","description":"POST /api/internal/cohorts/{id}/reports/recipients body.\n\nOnly `weekly_cohort` is allowed today (DB-level CHECK enforces).\nThe list shape is forward-compat for adding per-mock variants later."},"CohortReportRecipientResponse":{"properties":{"id":{"type":"integer","title":"Id"},"cohort_id":{"type":"integer","title":"Cohort Id"},"institution_coordinator_id":{"type":"integer","title":"Institution Coordinator Id"},"coordinator_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coordinator Name"},"coordinator_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coordinator Email"},"report_types":{"items":{"type":"string"},"type":"array","title":"Report Types"},"added_by_internal_user_id":{"type":"integer","title":"Added By Internal User Id"},"added_at":{"type":"string","format":"date-time","title":"Added At"}},"type":"object","required":["id","cohort_id","institution_coordinator_id","report_types","added_by_internal_user_id","added_at"],"title":"CohortReportRecipientResponse"},"CohortResponse":{"properties":{"id":{"type":"integer","title":"Id"},"institution_id":{"type":"integer","title":"Institution Id"},"exam_id":{"type":"integer","title":"Exam Id"},"institution_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Institution Name"},"exam_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exam Name"},"name":{"type":"string","title":"Name"},"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date"},"status":{"$ref":"#/components/schemas/CohortStatus"},"seat_count":{"type":"integer","title":"Seat Count"},"timezone":{"type":"string","title":"Timezone"},"created_by_internal_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created By Internal User Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"skip_admin_copy":{"type":"boolean","title":"Skip Admin Copy","default":false},"mastery_strong_threshold":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mastery Strong Threshold"},"mastery_developing_threshold":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mastery Developing Threshold"}},"type":"object","required":["id","institution_id","exam_id","name","start_date","end_date","status","seat_count","timezone","created_by_internal_user_id","created_at","updated_at"],"title":"CohortResponse"},"CohortStatus":{"type":"string","enum":["draft","active","ended","archived"],"title":"CohortStatus","description":"Lifecycle states for a Cohort.\n\n- draft: created in admin UI but not yet active; roster + sessions\n  can be added; students NOT enrolled (no subscriptions yet).\n- active: program is live; students see classroom surfaces; new\n  sessions can still be added.\n- ended: program ran to completion; subscriptions expired; students\n  retain read-only access to past sessions + recordings.\n- archived: hidden from default admin lists; data retained for audit."},"CohortStatusTransitionRequest":{"properties":{"target":{"$ref":"#/components/schemas/CohortStatus"}},"type":"object","required":["target"],"title":"CohortStatusTransitionRequest","description":"POST /api/internal/cohorts/{id}/transition — target status; the\nservice validates the transition's invariants (e.g. draft→active\nrequires both dates)."},"CohortUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Name"},"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date"},"seat_count":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Seat Count"},"timezone":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Timezone"},"mastery_strong_threshold":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":1.0},{"type":"null"}],"title":"Mastery Strong Threshold"},"mastery_developing_threshold":{"anyOf":[{"type":"integer","maximum":100.0,"minimum":1.0},{"type":"null"}],"title":"Mastery Developing Threshold"}},"type":"object","title":"CohortUpdate","description":"PATCH /api/internal/cohorts/{id} — all fields optional."},"CompleteSectionResponse":{"properties":{"message":{"type":"string","title":"Message"},"next_section_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Next Section Order"},"next_section_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Section Name"},"is_last_section":{"type":"boolean","title":"Is Last Section"}},"type":"object","required":["message","is_last_section"],"title":"CompleteSectionResponse"},"ConfidenceLevel":{"type":"string","enum":["insufficient","low","medium","high"],"title":"ConfidenceLevel","description":"Confidence level for predicted score based on data quality.\n\n- insufficient: < 20 questions answered, cannot predict\n- low: 20-49 questions, limited accuracy\n- medium: 50-99 questions with 60-79% topic coverage\n- high: 100+ questions with 80%+ topic coverage"},"ContactInfoResponse":{"properties":{"whatsapp_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Whatsapp Number"},"whatsapp_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Whatsapp Message"},"advisor_cta_enabled":{"type":"boolean","title":"Advisor Cta Enabled","default":true}},"type":"object","title":"ContactInfoResponse"},"ContactSettingsResponse":{"properties":{"whatsapp_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Whatsapp Number"},"whatsapp_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Whatsapp Message"},"advisor_cta_enabled":{"type":"boolean","title":"Advisor Cta Enabled","default":true}},"type":"object","title":"ContactSettingsResponse"},"ContactSettingsUpdate":{"properties":{"whatsapp_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Whatsapp Number","description":"WhatsApp number with country code, e.g., +91 7824052288"},"whatsapp_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Whatsapp Message","description":"Pre-filled message for WhatsApp"},"advisor_cta_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Advisor Cta Enabled","description":"Enable/disable the Talk to Advisor button"}},"type":"object","title":"ContactSettingsUpdate"},"ContentInfo":{"properties":{"allowed_types":{"items":{"type":"string"},"type":"array","title":"Allowed Types"},"max_file_size_mb":{"type":"number","title":"Max File Size Mb"},"upload_folder":{"type":"string","title":"Upload Folder"},"gcs_base_url":{"type":"string","title":"Gcs Base Url"}},"type":"object","required":["allowed_types","max_file_size_mb","upload_folder","gcs_base_url"],"title":"ContentInfo","description":"Info about content upload configuration."},"CreateAssessmentRequest":{"properties":{"title":{"type":"string","title":"Title"},"display_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Title"},"assessment_type":{"type":"string","title":"Assessment Type"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"time_limit_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Time Limit Minutes"},"is_timed":{"type":"boolean","title":"Is Timed","default":true},"subject_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Subject Id"},"topic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topic"},"question_ids":{"items":{"type":"integer"},"type":"array","title":"Question Ids","default":[]},"sections":{"anyOf":[{"items":{"$ref":"#/components/schemas/SectionInput"},"type":"array"},{"type":"null"}],"title":"Sections"},"proctoring_config":{"anyOf":[{"$ref":"#/components/schemas/ProctoringConfig"},{"type":"null"}]}},"type":"object","required":["title","assessment_type"],"title":"CreateAssessmentRequest"},"CreateUserRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"},"name":{"type":"string","title":"Name"},"roles":{"items":{"type":"string"},"type":"array","title":"Roles","default":[]}},"type":"object","required":["email","password","name"],"title":"CreateUserRequest"},"CrmContactOption":{"properties":{"email":{"type":"string","title":"Email"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"}},"type":"object","required":["email"],"title":"CrmContactOption","description":"One CRM contact surfaced in the offline-grant student typeahead."},"CrmStatusResponse":{"properties":{"queue":{"additionalProperties":{"type":"integer"},"type":"object","title":"Queue"},"intent_tier":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Intent Tier"},"total_leads":{"type":"integer","title":"Total Leads"}},"type":"object","required":["queue","intent_tier","total_leads"],"title":"CrmStatusResponse"},"CsvImportItem":{"properties":{"id":{"type":"integer","title":"Id"},"file_name":{"type":"string","title":"File Name"},"file_hash":{"type":"string","title":"File Hash"},"uploaded_by_user_id":{"type":"integer","title":"Uploaded By User Id"},"event_mapping_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Event Mapping Id"},"email_column":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email Column"},"conflict_policy":{"type":"string","title":"Conflict Policy"},"status":{"type":"string","title":"Status"},"headers":{"items":{"type":"string"},"type":"array","title":"Headers"},"row_count":{"type":"integer","title":"Row Count"},"counts":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Counts"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"committed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Committed At"},"rolled_back_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Rolled Back At"}},"type":"object","required":["id","file_name","file_hash","uploaded_by_user_id","event_mapping_id","email_column","conflict_policy","status","headers","row_count","counts","created_at","committed_at","rolled_back_at"],"title":"CsvImportItem"},"CsvImportRowItem":{"properties":{"row_number":{"type":"integer","title":"Row Number"},"status":{"type":"string","title":"Status"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"raw":{"additionalProperties":true,"type":"object","title":"Raw"},"crm_contact_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Crm Contact Id"},"created_contact":{"type":"boolean","title":"Created Contact"}},"type":"object","required":["row_number","status","error","raw","crm_contact_id","created_contact"],"title":"CsvImportRowItem"},"CsvImportRowsPage":{"properties":{"total":{"type":"integer","title":"Total"},"rows":{"items":{"$ref":"#/components/schemas/CsvImportRowItem"},"type":"array","title":"Rows"}},"type":"object","required":["total","rows"],"title":"CsvImportRowsPage"},"DashboardCrossSellExam":{"properties":{"exam_slug":{"type":"string","title":"Exam Slug"},"exam_name":{"type":"string","title":"Exam Name"},"has_free_tier":{"type":"boolean","title":"Has Free Tier"},"free_tier_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Free Tier Url"}},"type":"object","required":["exam_slug","exam_name","has_free_tier"],"title":"DashboardCrossSellExam","description":"Exam the user is NOT subscribed to — shown as a cross-sell card."},"DashboardExamSlice":{"properties":{"exam_slug":{"type":"string","title":"Exam Slug","description":"'sat' | 'toefl' | 'ielts' | ..."},"exam_name":{"type":"string","title":"Exam Name","description":"Display name e.g. 'SAT' or 'TOEFL iBT'"},"tier":{"type":"string","title":"Tier","description":"User's effective tier on THIS exam"},"package_id":{"type":"integer","title":"Package Id"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At","description":"Subscription expiry; None = unbounded"},"is_trial":{"type":"boolean","title":"Is Trial","default":false},"trial_days_remaining":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Trial Days Remaining"},"predicted_score":{"anyOf":[{"$ref":"#/components/schemas/PredictedScoreSummary"},{"type":"null"}]},"study_plan":{"anyOf":[{"$ref":"#/components/schemas/app__schemas__dashboard__StudyPlanSummary"},{"type":"null"}]},"days_until_exam":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days Until Exam"},"mocks_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mocks Total","description":"None means unlimited"},"mocks_completed":{"type":"integer","title":"Mocks Completed","default":0},"mocks_remaining":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mocks Remaining","description":"None means unlimited"},"next_action":{"anyOf":[{"$ref":"#/components/schemas/NextActionItem"},{"type":"null"}]},"last_attempt":{"anyOf":[{"$ref":"#/components/schemas/LastAttemptSummary"},{"type":"null"}]},"has_taken_diagnostic":{"type":"boolean","title":"Has Taken Diagnostic","default":false}},"type":"object","required":["exam_slug","exam_name","tier","package_id"],"title":"DashboardExamSlice","description":"One exam-tab worth of data — keyed off the user's Subscription."},"DashboardStatsResponse":{"properties":{"assessments_count":{"type":"integer","title":"Assessments Count"},"lessons_count":{"type":"integer","title":"Lessons Count"},"tasks_count":{"type":"integer","title":"Tasks Count"},"internal_users_count":{"type":"integer","title":"Internal Users Count"},"external_users_count":{"type":"integer","title":"External Users Count"}},"type":"object","required":["assessments_count","lessons_count","tasks_count","internal_users_count","external_users_count"],"title":"DashboardStatsResponse","description":"Response model for dashboard statistics"},"DataDrivenPatterns":{"properties":{"by_category":{"additionalProperties":{"$ref":"#/components/schemas/CategoryPattern"},"type":"object","title":"By Category","default":{}},"by_topic":{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object","title":"By Topic","default":{}},"by_skill":{"additionalProperties":{"$ref":"#/components/schemas/SkillNodePattern"},"type":"object","title":"By Skill","default":{}},"dominant_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dominant Category"},"total_with_data":{"type":"integer","title":"Total With Data","default":0},"total_wrong":{"type":"integer","title":"Total Wrong","default":0}},"type":"object","title":"DataDrivenPatterns","description":"Data-driven mistake patterns from actual question-level answer_insights.\nTask 4.14: These come from real question data, not heuristics."},"DetailedResultResponse":{"properties":{"id":{"type":"integer","title":"Id"},"assessment":{"type":"integer","title":"Assessment"},"assessment_name":{"type":"string","title":"Assessment Name"},"exam_type":{"type":"string","title":"Exam Type"},"assessment_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assessment Type"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"auto_score":{"type":"integer","title":"Auto Score"},"manual_score":{"type":"integer","title":"Manual Score"},"total_score":{"type":"integer","title":"Total Score"},"max_score":{"type":"integer","title":"Max Score"},"percentage":{"type":"number","title":"Percentage"},"is_grading_complete":{"type":"boolean","title":"Is Grading Complete"},"ai_grading_eligible":{"type":"boolean","title":"Ai Grading Eligible","default":false},"overall_band":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Overall Band"},"max_band":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Band"},"sections":{"items":{"$ref":"#/components/schemas/EngineSectionResultItem"},"type":"array","title":"Sections","default":[]}},"type":"object","required":["id","assessment","assessment_name","exam_type","auto_score","manual_score","total_score","max_score","percentage","is_grading_complete"],"title":"DetailedResultResponse","description":"Mirrors dmango `DetailedResultSerializer`."},"DiagnosticStatusResponse":{"properties":{"id":{"type":"integer","title":"Id"},"assessment_type":{"type":"string","title":"Assessment Type"},"title":{"type":"string","title":"Title"},"display_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"question_count":{"type":"integer","title":"Question Count"},"time_limit_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Time Limit Minutes"},"section_time_limits":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Section Time Limits"},"sections":{"items":{"$ref":"#/components/schemas/SectionInfo"},"type":"array","title":"Sections","default":[]},"is_timed":{"type":"boolean","title":"Is Timed"},"proctoring_config":{"anyOf":[{"$ref":"#/components/schemas/ProctoringConfig"},{"type":"null"}]},"is_completed":{"type":"boolean","title":"Is Completed","default":false},"completed_attempt_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Completed Attempt Id"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Score"},"has_in_progress_attempt":{"type":"boolean","title":"Has In Progress Attempt","default":false},"in_progress_attempt_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"In Progress Attempt Id"},"in_progress_started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"In Progress Started At"}},"type":"object","required":["id","assessment_type","title","description","question_count","time_limit_minutes","is_timed"],"title":"DiagnosticStatusResponse","description":"Diagnostic assessment with completion status."},"DifficultyAccuracy":{"properties":{"correct":{"type":"integer","title":"Correct"},"total":{"type":"integer","title":"Total"},"expected":{"type":"integer","title":"Expected"},"accuracy":{"type":"number","title":"Accuracy"}},"type":"object","required":["correct","total","expected","accuracy"],"title":"DifficultyAccuracy","description":"Accuracy data for a difficulty level."},"DifficultyLevel":{"type":"string","enum":["easy","medium","hard"],"title":"DifficultyLevel","description":"Difficulty labels."},"DiscountCodeCreate":{"properties":{"code":{"type":"string","maxLength":50,"minLength":3,"title":"Code"},"discount_type":{"type":"string","pattern":"^(percent|amount)$","title":"Discount Type"},"discount_value":{"type":"integer","minimum":1.0,"title":"Discount Value"},"applicable_tiers":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Applicable Tiers"},"applicable_regions":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Applicable Regions"},"user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Id"},"max_uses":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Uses"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["code","discount_type","discount_value"],"title":"DiscountCodeCreate"},"DiscountCodeResponse":{"properties":{"id":{"type":"integer","title":"Id"},"code":{"type":"string","title":"Code"},"discount_type":{"type":"string","title":"Discount Type"},"discount_value":{"type":"integer","title":"Discount Value"},"applicable_tiers":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Applicable Tiers"},"applicable_regions":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Applicable Regions"},"user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Id"},"max_uses":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Uses"},"usage_count":{"type":"integer","title":"Usage Count"},"expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expires At"},"is_active":{"type":"boolean","title":"Is Active"}},"type":"object","required":["id","code","discount_type","discount_value","usage_count","is_active"],"title":"DiscountCodeResponse"},"DiscountValidateRequest":{"properties":{"code":{"type":"string","maxLength":64,"title":"Code"},"tier":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Tier"}},"type":"object","required":["code"],"title":"DiscountValidateRequest","description":"#1313 review F10 — replaces a bare `dict` on /discount/validate.\n\nUnbounded strings on a code-checking endpoint are a guessing oracle with no\nupper bound on payload size; the bounds here are generous for any real\ncoupon and hostile to enumeration payloads."},"DismissExpiryRequest":{"properties":{"downgrade_to_free":{"type":"boolean","title":"Downgrade To Free","default":false}},"type":"object","title":"DismissExpiryRequest","description":"Request to dismiss trial expiry modal."},"DismissExpiryResponse":{"properties":{"status":{"type":"string","title":"Status"},"tier":{"type":"string","title":"Tier"}},"type":"object","required":["status","tier"],"title":"DismissExpiryResponse","description":"Response after dismissing trial expiry."},"DomainWeightsResponse":{"properties":{"exam":{"type":"string","title":"Exam"},"math":{"additionalProperties":true,"type":"object","title":"Math"},"reading_writing":{"additionalProperties":true,"type":"object","title":"Reading Writing"}},"type":"object","required":["exam","math","reading_writing"],"title":"DomainWeightsResponse","description":"Domain weights for scoring."},"DowngradeComparison":{"properties":{"lost_features":{"items":{"type":"string"},"type":"array","title":"Lost Features"},"upgrade_plan":{"$ref":"#/components/schemas/UpgradeOption"}},"type":"object","required":["lost_features","upgrade_plan"],"title":"DowngradeComparison","description":"Shows what user had during trial vs what they have now."},"DrillAnswerResponse":{"properties":{"saved":{"type":"boolean","title":"Saved"},"question_id":{"type":"integer","title":"Question Id"}},"type":"object","required":["saved","question_id"],"title":"DrillAnswerResponse","description":"Response after submitting a drill answer.\n\nNote: Correctness is NOT revealed during the drill - only shown in results."},"DrillAnswerSubmit":{"properties":{"question_id":{"type":"integer","title":"Question Id"},"answer":{"type":"string","maxLength":50,"title":"Answer","description":"User's answer. Empty string to clear/deselect.","default":""},"time_spent_seconds":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Time Spent Seconds"}},"type":"object","required":["question_id"],"title":"DrillAnswerSubmit","description":"Submit an answer for a drill question."},"DrillHistoryItem":{"properties":{"attempt_id":{"type":"integer","title":"Attempt Id"},"score":{"type":"integer","title":"Score"},"total_questions":{"type":"integer","title":"Total Questions","default":10},"accuracy":{"type":"number","title":"Accuracy"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"time_taken_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Time Taken Seconds"},"subject_filter":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject Filter"},"topic_filter":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topic Filter"}},"type":"object","required":["attempt_id","score","accuracy","started_at"],"title":"DrillHistoryItem","description":"Single drill in history list."},"DrillHistoryResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/DrillHistoryItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["items","total","page","page_size"],"title":"DrillHistoryResponse","description":"Paginated drill history."},"DrillInsight":{"properties":{"message":{"type":"string","title":"Message"},"type":{"type":"string","title":"Type","description":"Insight type: 'strength', 'weakness', 'tip'"}},"type":"object","required":["message","type"],"title":"DrillInsight","description":"AI-generated insight about drill performance."},"DrillQuestionResponse":{"properties":{"id":{"type":"integer","title":"Id"},"content":{"additionalProperties":true,"type":"object","title":"Content"},"subject_code":{"type":"string","title":"Subject Code"},"topic":{"type":"string","title":"Topic"},"subtopic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtopic"},"difficulty_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Difficulty Label"},"question_type":{"type":"string","title":"Question Type","default":"MULTIPLE_CHOICE"},"position":{"type":"integer","title":"Position","description":"1-indexed position in drill (1-10)"}},"type":"object","required":["id","content","subject_code","topic","position"],"title":"DrillQuestionResponse","description":"Question data for drill display (without correct answer)."},"DrillQuestionResult":{"properties":{"id":{"type":"integer","title":"Id"},"position":{"type":"integer","title":"Position"},"topic":{"type":"string","title":"Topic"},"subtopic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtopic"},"difficulty":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Difficulty"},"answer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Answer"},"correct_answer":{"type":"string","title":"Correct Answer"},"is_correct":{"type":"boolean","title":"Is Correct"},"time_spent_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Time Spent Seconds"},"content":{"additionalProperties":true,"type":"object","title":"Content"},"explanation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Explanation"}},"type":"object","required":["id","position","topic","correct_answer","is_correct","content"],"title":"DrillQuestionResult","description":"Question result for review table."},"DrillQuotaResponse":{"properties":{"math":{"$ref":"#/components/schemas/DrillSubjectQuota"},"reading_writing":{"$ref":"#/components/schemas/DrillSubjectQuota"},"total":{"$ref":"#/components/schemas/DrillQuotaTotal"},"unlimited":{"type":"boolean","title":"Unlimited","description":"True if user has unlimited drills"}},"type":"object","required":["math","reading_writing","total","unlimited"],"title":"DrillQuotaResponse","description":"Current drill quota information.\n\nReturns the per-subject usage breakdown (display only) AND the total\nquota (the enforced axis). New clients should read `total` for the\n\"drills remaining\" indicator."},"DrillQuotaTotal":{"properties":{"used":{"type":"integer","title":"Used","description":"Total drills used across all subjects"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit","description":"Total drill limit, null if unlimited"},"remaining":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Remaining","description":"Total remaining, null if unlimited"}},"type":"object","required":["used"],"title":"DrillQuotaTotal","description":"Total drill quota across both subjects — the actual enforcement axis.\n\n#635 follow-up: enforcement was previously per-subject via a hardcoded\n`DRILL_LIMITS_PER_SUBJECT` table that disagreed with the seeded\n`Package.feature_limits.drills`. Now reads from the package and applies\nthe total across math + R&W. Free `drills=4` → 4 total across both\nsubjects, any split."},"DrillResultsResponse":{"properties":{"attempt_id":{"type":"integer","title":"Attempt Id"},"score":{"type":"integer","title":"Score","description":"Number of correct answers (0-10)"},"total_questions":{"type":"integer","title":"Total Questions","default":10},"accuracy":{"type":"number","title":"Accuracy","description":"Accuracy percentage (0-100)"},"time_taken_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Time Taken Seconds"},"section_breakdown":{"items":{"$ref":"#/components/schemas/SectionBreakdown"},"type":"array","title":"Section Breakdown"},"topic_breakdown":{"items":{"$ref":"#/components/schemas/TopicBreakdown"},"type":"array","title":"Topic Breakdown"},"insights":{"items":{"$ref":"#/components/schemas/DrillInsight"},"type":"array","title":"Insights"},"questions":{"items":{"$ref":"#/components/schemas/DrillQuestionResult"},"type":"array","title":"Questions","description":"Question-by-question results"},"completed_at":{"type":"string","format":"date-time","title":"Completed At"}},"type":"object","required":["attempt_id","score","accuracy","section_breakdown","topic_breakdown","insights","completed_at"],"title":"DrillResultsResponse","description":"Results summary after completing a drill."},"DrillStatsResponse":{"properties":{"math":{"$ref":"#/components/schemas/DrillSubjectStats"},"reading_writing":{"$ref":"#/components/schemas/DrillSubjectStats"}},"type":"object","required":["math","reading_writing"],"title":"DrillStatsResponse","description":"Drill statistics broken down by subject."},"DrillSubjectQuota":{"properties":{"used":{"type":"integer","title":"Used","description":"Number of drills used for this subject"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit","description":"Mirrors total.limit; null if unlimited"},"remaining":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Remaining","description":"Mirrors total.remaining; null if unlimited"}},"type":"object","required":["used"],"title":"DrillSubjectQuota","description":"Per-subject drill usage (display breakdown only).\n\n#635 follow-up: `limit` / `remaining` here are kept for backward-compat\nwith older clients and report the SAME values as `DrillQuotaResponse.total`\n(the enforcement is on the total, not per-subject — see DrillQuotaTotal\nbelow). New code should read `total` directly."},"DrillSubjectStats":{"properties":{"subject_code":{"type":"string","title":"Subject Code"},"total_drills":{"type":"integer","title":"Total Drills"},"average_accuracy":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Average Accuracy"}},"type":"object","required":["subject_code","total_drills"],"title":"DrillSubjectStats","description":"Drill statistics for a specific subject."},"DrillTaskResultsResponse":{"properties":{"task_id":{"type":"integer","title":"Task Id"},"session_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Title"},"topic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topic"},"is_timed":{"type":"boolean","title":"Is Timed","default":false},"assigned_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Assigned Count"},"students":{"items":{"$ref":"#/components/schemas/DrillTaskStudentRow"},"type":"array","title":"Students"}},"type":"object","required":["task_id","students"],"title":"DrillTaskResultsResponse","description":"Batch (per-assignment) drill results across a cohort (#856-P2d).\n\n'How did the whole batch do on this drill' for the Sessions tab. Every\nstudent draws different questions, so this is a roster of per-student\nresults; each completed student links to their own question-wise review."},"DrillTaskStudentRow":{"properties":{"student_id":{"type":"integer","title":"Student Id"},"student_name":{"type":"string","title":"Student Name"},"status":{"type":"string","title":"Status"},"score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Score"},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total"},"accuracy":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Accuracy"}},"type":"object","required":["student_id","student_name","status"],"title":"DrillTaskStudentRow","description":"One student's result on a drill assignment (#856-P2d)."},"EmailPreviewRecipient":{"properties":{"label":{"type":"string","title":"Label"},"email":{"type":"string","title":"Email"}},"type":"object","required":["label","email"],"title":"EmailPreviewRecipient"},"EmailPreviewResponse":{"properties":{"html":{"type":"string","title":"Html"},"subject":{"type":"string","title":"Subject"},"from_email":{"type":"string","title":"From Email"},"reply_to":{"items":{"type":"string"},"type":"array","title":"Reply To"},"recipients":{"items":{"$ref":"#/components/schemas/EmailPreviewRecipient"},"type":"array","title":"Recipients"},"bcc":{"items":{"type":"string"},"type":"array","title":"Bcc","default":[]}},"type":"object","required":["html","subject","from_email","reply_to","recipients"],"title":"EmailPreviewResponse","description":"Rendered report email + the inbox metadata around it."},"EmailTemplateAuditItem":{"properties":{"id":{"type":"integer","title":"Id"},"version":{"type":"integer","title":"Version"},"snapshot":{"additionalProperties":true,"type":"object","title":"Snapshot"},"changed_by_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Changed By User Id"},"change_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Change Summary"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","version","snapshot","created_at"],"title":"EmailTemplateAuditItem"},"EmailTemplateCreate":{"properties":{"template_type":{"type":"string","title":"Template Type"},"name":{"type":"string","title":"Name"},"exam_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exam Slug"},"package_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Package Id"},"subject":{"type":"string","title":"Subject"},"body":{"type":"string","title":"Body"},"sender_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Email"},"sender_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Name"},"body_format":{"type":"string","title":"Body Format","default":"markdown"},"classification":{"type":"string","title":"Classification","default":"transactional"},"is_active":{"type":"boolean","title":"Is Active","default":true}},"type":"object","required":["template_type","name","subject","body"],"title":"EmailTemplateCreate"},"EmailTemplateItem":{"properties":{"template_type":{"type":"string","title":"Template Type"},"name":{"type":"string","title":"Name"},"exam_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exam Slug"},"package_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Package Id"},"subject":{"type":"string","title":"Subject"},"body":{"type":"string","title":"Body"},"sender_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Email"},"sender_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Name"},"body_format":{"type":"string","title":"Body Format","default":"markdown"},"classification":{"type":"string","title":"Classification","default":"transactional"},"is_active":{"type":"boolean","title":"Is Active","default":true},"id":{"type":"integer","title":"Id"},"version":{"type":"integer","title":"Version"},"live_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Live Version"},"test_sent_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Test Sent Version"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"updated_by_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Updated By User Id"}},"type":"object","required":["template_type","name","subject","body","id","version","created_at","updated_at"],"title":"EmailTemplateItem"},"EmailTemplateUpdate":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"exam_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exam Slug"},"package_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Package Id"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body"},"sender_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Email"},"sender_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sender Name"},"body_format":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Body Format"},"classification":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Classification"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"expected_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expected Version"}},"additionalProperties":false,"type":"object","title":"EmailTemplateUpdate","description":"Partial update — only provided fields change. ``expected_version``\nenables optimistic concurrency (409 on mismatch). ``template_type`` is\ndeliberately absent: it is immutable after creation (a type flip would\nleave live_version serving the old type's snapshot) — ``extra=\"forbid\"``\nrejects it at the boundary."},"EmissionStatsResponse":{"properties":{"mapping_id":{"type":"integer","title":"Mapping Id"},"event_key":{"type":"string","title":"Event Key"},"window_days":{"type":"integer","title":"Window Days"},"total_dispatched":{"type":"integer","title":"Total Dispatched"},"emitted_count":{"type":"integer","title":"Emitted Count"},"failed_count":{"type":"integer","title":"Failed Count"},"last_emitted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Emitted At"},"fields_emitted":{"items":{"type":"string"},"type":"array","title":"Fields Emitted"},"fields_declared":{"items":{"type":"string"},"type":"array","title":"Fields Declared"},"fields_declared_never_emitted":{"items":{"type":"string"},"type":"array","title":"Fields Declared Never Emitted"},"is_orphan":{"type":"boolean","title":"Is Orphan"}},"type":"object","required":["mapping_id","event_key","window_days","total_dispatched","emitted_count","failed_count","last_emitted_at","fields_emitted","fields_declared","fields_declared_never_emitted","is_orphan"],"title":"EmissionStatsResponse","description":"#1219 slice 2 — what actually emitted recently for one mapping,\naggregated from outbound_event_queue.dispatch_payload. ``is_orphan`` is\nadvisory (zero emissions in the window), never an auto-cleanup signal."},"EngineAssessmentDetailResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"name_external":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name External"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"exam_type":{"type":"string","title":"Exam Type"},"assessment_type":{"type":"string","title":"Assessment Type"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"},"total_time_mins":{"type":"integer","title":"Total Time Mins"},"is_active":{"type":"boolean","title":"Is Active"},"proctoring_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Proctoring Config"},"sections":{"items":{"$ref":"#/components/schemas/EngineSectionListItem"},"type":"array","title":"Sections","default":[]},"total_questions":{"type":"integer","title":"Total Questions","default":0}},"type":"object","required":["id","name","exam_type","assessment_type","total_time_mins","is_active"],"title":"EngineAssessmentDetailResponse","description":"Mirrors dmango `AssessmentSerializer`."},"EngineBankDetail":{"properties":{"id":{"type":"integer","title":"Id"},"question_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Question Type"},"question_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Question Text"},"exam":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exam"},"skill_external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Skill External Id"},"skill_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Skill Title"},"usage_contexts":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Usage Contexts"},"source_system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source System"},"source_id_ext":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Id Ext"},"version":{"type":"integer","title":"Version"},"is_latest":{"type":"boolean","title":"Is Latest"},"points":{"type":"integer","title":"Points"},"requires_manual_grading":{"type":"boolean","title":"Requires Manual Grading"},"kind":{"type":"string","title":"Kind","default":"question"},"group_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Group Id"},"group_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group Type"},"question_count":{"type":"integer","title":"Question Count","default":1},"preview":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview"},"question_html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Question Html"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"explanation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Explanation"},"expected_text_answer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expected Text Answer"},"correct_word_order":{"anyOf":[{"items":{},"type":"array"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Correct Word Order"},"word_bank":{"anyOf":[{"items":{},"type":"array"},{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Word Bank"},"question_feedback":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Question Feedback"},"options":{"items":{"$ref":"#/components/schemas/EngineBankOption"},"type":"array","title":"Options"}},"type":"object","required":["id","question_type","question_text","exam","skill_external_id","skill_title","usage_contexts","source_system","source_id_ext","version","is_latest","points","requires_manual_grading","question_html","image_url","explanation","expected_text_answer","correct_word_order","word_bank","question_feedback","options"],"title":"EngineBankDetail"},"EngineBankGroupDetail":{"properties":{"id":{"type":"integer","title":"Id"},"group_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group Type"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"},"passage_html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Passage Html"},"audio_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audio Url"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"exam":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exam"},"question_count":{"type":"integer","title":"Question Count"},"questions":{"items":{"$ref":"#/components/schemas/EngineBankGroupQuestion"},"type":"array","title":"Questions"}},"type":"object","required":["id","group_type","title","instructions","passage_html","audio_url","image_url","exam","question_count","questions"],"title":"EngineBankGroupDetail"},"EngineBankGroupQuestion":{"properties":{"id":{"type":"integer","title":"Id"},"question_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Question Type"},"question_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Question Text"},"exam":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exam"},"skill_external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Skill External Id"},"skill_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Skill Title"},"usage_contexts":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Usage Contexts"},"source_system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source System"},"source_id_ext":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Id Ext"},"version":{"type":"integer","title":"Version"},"is_latest":{"type":"boolean","title":"Is Latest"},"points":{"type":"integer","title":"Points"},"requires_manual_grading":{"type":"boolean","title":"Requires Manual Grading"},"kind":{"type":"string","title":"Kind","default":"question"},"group_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Group Id"},"group_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group Type"},"question_count":{"type":"integer","title":"Question Count","default":1},"preview":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview"},"explanation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Explanation"},"expected_text_answer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expected Text Answer"},"question_feedback":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Question Feedback"},"options":{"items":{"$ref":"#/components/schemas/EngineBankOption"},"type":"array","title":"Options"}},"type":"object","required":["id","question_type","question_text","exam","skill_external_id","skill_title","usage_contexts","source_system","source_id_ext","version","is_latest","points","requires_manual_grading","explanation","expected_text_answer","question_feedback","options"],"title":"EngineBankGroupQuestion"},"EngineBankItem":{"properties":{"id":{"type":"integer","title":"Id"},"question_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Question Type"},"question_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Question Text"},"exam":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exam"},"skill_external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Skill External Id"},"skill_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Skill Title"},"usage_contexts":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Usage Contexts"},"source_system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source System"},"source_id_ext":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Id Ext"},"version":{"type":"integer","title":"Version"},"is_latest":{"type":"boolean","title":"Is Latest"},"points":{"type":"integer","title":"Points"},"requires_manual_grading":{"type":"boolean","title":"Requires Manual Grading"},"kind":{"type":"string","title":"Kind","default":"question"},"group_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Group Id"},"group_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group Type"},"question_count":{"type":"integer","title":"Question Count","default":1},"preview":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview"}},"type":"object","required":["id","question_type","question_text","exam","skill_external_id","skill_title","usage_contexts","source_system","source_id_ext","version","is_latest","points","requires_manual_grading"],"title":"EngineBankItem"},"EngineBankListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/EngineBankItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["items","total","page","page_size"],"title":"EngineBankListResponse"},"EngineBankOption":{"properties":{"id":{"type":"integer","title":"Id"},"option_text":{"type":"string","title":"Option Text"},"is_correct":{"type":"boolean","title":"Is Correct"},"order":{"type":"integer","title":"Order"},"rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rationale"}},"type":"object","required":["id","option_text","is_correct","order","rationale"],"title":"EngineBankOption"},"EngineBankSummary":{"properties":{"total":{"type":"integer","title":"Total"},"total_questions":{"type":"integer","title":"Total Questions","default":0},"by_exam":{"items":{"$ref":"#/components/schemas/ExamCount"},"type":"array","title":"By Exam"},"by_source_system":{"items":{"$ref":"#/components/schemas/ExamCount"},"type":"array","title":"By Source System"}},"type":"object","required":["total","by_exam","by_source_system"],"title":"EngineBankSummary"},"EngineLeadRegisterRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"first_name":{"type":"string","maxLength":100,"minLength":1,"title":"First Name"},"last_name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Last Name"},"exam":{"type":"string","maxLength":32,"minLength":1,"title":"Exam"},"slug":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Slug"},"utm_source":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Utm Source"},"utm_medium":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Utm Medium"},"utm_campaign":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Utm Campaign"},"utm_term":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Utm Term"},"utm_content":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Utm Content"},"galv_client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Galv Client Id"},"landing_page":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Landing Page"},"gclid":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Gclid"},"partner":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Partner"},"partner_intake":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Partner Intake"}},"type":"object","required":["email","first_name","exam"],"title":"EngineLeadRegisterRequest"},"EngineLeadRegisterResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"email":{"type":"string","title":"Email"},"exam":{"type":"string","title":"Exam"}},"type":"object","required":["success","email","exam"],"title":"EngineLeadRegisterResponse"},"EngineOptionListItem":{"properties":{"id":{"type":"integer","title":"Id"},"option_text":{"type":"string","title":"Option Text"},"option_image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Option Image"},"order":{"type":"integer","title":"Order"},"blank_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Blank Index"}},"type":"object","required":["id","option_text","order"],"title":"EngineOptionListItem","description":"Option without `is_correct` — what end users see while answering."},"EngineOptionResultItem":{"properties":{"id":{"type":"integer","title":"Id"},"option_text":{"type":"string","title":"Option Text"},"option_image":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Option Image"},"order":{"type":"integer","title":"Order"},"is_correct":{"type":"boolean","title":"Is Correct"},"blank_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Blank Index"}},"type":"object","required":["id","option_text","order","is_correct"],"title":"EngineOptionResultItem","description":"Option WITH `is_correct` — only safe to return AFTER submission."},"EngineQuestionGroupListItem":{"properties":{"id":{"type":"integer","title":"Id"},"group_type":{"type":"string","title":"Group Type"},"title":{"type":"string","title":"Title"},"order":{"type":"integer","title":"Order"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"},"passage_html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Passage Html"},"audio_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audio Url"},"audio_duration_secs":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Audio Duration Secs"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"stimulus_data":{"anyOf":[{},{"type":"null"}],"title":"Stimulus Data"},"allow_audio_replay":{"type":"boolean","title":"Allow Audio Replay"},"allow_back_navigation":{"type":"boolean","title":"Allow Back Navigation"},"questions":{"items":{"$ref":"#/components/schemas/EngineQuestionListItem"},"type":"array","title":"Questions","default":[]}},"type":"object","required":["id","group_type","title","order","allow_audio_replay","allow_back_navigation"],"title":"EngineQuestionGroupListItem"},"EngineQuestionGroupResultItem":{"properties":{"id":{"type":"integer","title":"Id"},"group_type":{"type":"string","title":"Group Type"},"title":{"type":"string","title":"Title"},"order":{"type":"integer","title":"Order"},"passage_html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Passage Html"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"audio_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audio Url"},"questions":{"items":{"$ref":"#/components/schemas/EngineQuestionResultItem"},"type":"array","title":"Questions","default":[]}},"type":"object","required":["id","group_type","title","order"],"title":"EngineQuestionGroupResultItem","description":"Group + per-question results (used in detailed results)."},"EngineQuestionListItem":{"properties":{"id":{"type":"integer","title":"Id"},"question_type":{"type":"string","title":"Question Type"},"question_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Question Text"},"question_html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Question Html"},"audio_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audio Url"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"image_url_2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url 2"},"order":{"type":"integer","title":"Order"},"points":{"type":"integer","title":"Points"},"word_bank":{"anyOf":[{},{"type":"null"}],"title":"Word Bank"},"recording_duration_secs":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Recording Duration Secs"},"min_word_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Word Count"},"question_time_secs":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Question Time Secs"},"requires_manual_grading":{"type":"boolean","title":"Requires Manual Grading"},"blank_length":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Blank Length"},"quantity_a":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quantity A"},"quantity_b":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quantity B"},"options":{"items":{"$ref":"#/components/schemas/EngineOptionListItem"},"type":"array","title":"Options","default":[]}},"type":"object","required":["id","question_type","order","points","requires_manual_grading"],"title":"EngineQuestionListItem","description":"Question content as shown to a user mid-attempt. NO answer fields."},"EngineQuestionResultItem":{"properties":{"id":{"type":"integer","title":"Id"},"question_type":{"type":"string","title":"Question Type"},"question_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Question Text"},"question_html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Question Html"},"audio_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audio Url"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"image_url_2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url 2"},"order":{"type":"integer","title":"Order"},"points":{"type":"integer","title":"Points"},"explanation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Explanation"},"expected_text_answer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expected Text Answer"},"correct_word_order":{"anyOf":[{},{"type":"null"}],"title":"Correct Word Order"},"numeric_answer":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Numeric Answer"},"numeric_tolerance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Numeric Tolerance"},"accepted_numeric_answers":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Accepted Numeric Answers"},"fraction_numerator":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fraction Numerator"},"fraction_denominator":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fraction Denominator"},"quantity_a":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quantity A"},"quantity_b":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quantity B"},"options":{"items":{"$ref":"#/components/schemas/EngineOptionResultItem"},"type":"array","title":"Options","default":[]},"user_answer":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"User Answer"},"is_correct":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Correct"},"points_earned":{"type":"integer","title":"Points Earned","default":0},"band_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Band Score"},"criteria_bands":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Criteria Bands"}},"type":"object","required":["id","question_type","order","points"],"title":"EngineQuestionResultItem","description":"Question on a results page: includes explanation + correct answer."},"EngineSectionDetailResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"name_external":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name External"},"section_type":{"type":"string","title":"Section Type"},"time_mins":{"type":"integer","title":"Time Mins"},"order":{"type":"integer","title":"Order"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"},"audio_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audio Url"},"question_count":{"type":"integer","title":"Question Count","default":0},"question_groups":{"items":{"$ref":"#/components/schemas/EngineQuestionGroupListItem"},"type":"array","title":"Question Groups","default":[]}},"type":"object","required":["id","name","section_type","time_mins","order"],"title":"EngineSectionDetailResponse","description":"Full section payload — used for `/section/{order}/start/`.\n\nMirrors dmango's `SectionSerializer`."},"EngineSectionListItem":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"name_external":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name External"},"section_type":{"type":"string","title":"Section Type"},"time_mins":{"type":"integer","title":"Time Mins"},"order":{"type":"integer","title":"Order"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"},"audio_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audio Url"},"question_count":{"type":"integer","title":"Question Count","default":0}},"type":"object","required":["id","name","section_type","time_mins","order"],"title":"EngineSectionListItem","description":"Section summary — fields shared with the assessment-detail payload.\n\nMirrors dmango's `SectionListSerializer`."},"EngineSectionResultItem":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"name_external":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name External"},"section_type":{"type":"string","title":"Section Type"},"order":{"type":"integer","title":"Order"},"question_groups":{"items":{"$ref":"#/components/schemas/EngineQuestionGroupResultItem"},"type":"array","title":"Question Groups","default":[]},"section_score":{"type":"integer","title":"Section Score","default":0},"section_max_score":{"type":"integer","title":"Section Max Score","default":0},"section_scaled_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Section Scaled Score","default":0.0},"section_max_band":{"type":"number","title":"Section Max Band","default":6.0},"section_ibt_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Section Ibt Score","default":0},"section_max_ibt":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Section Max Ibt","default":30},"section_weighted_score":{"type":"number","title":"Section Weighted Score","default":0.0},"section_weighted_max":{"type":"number","title":"Section Weighted Max","default":0.0}},"type":"object","required":["id","name","section_type","order"],"title":"EngineSectionResultItem","description":"Section + group/question results + scaled scores.\n\nMirrors dmango's `SectionResultSerializer`."},"EnrollmentResult":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"status":{"type":"string","title":"Status"},"user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Id"},"membership_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Membership Id"},"subscription_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Subscription Id"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"}},"type":"object","required":["email","status"],"title":"EnrollmentResult","description":"One row's outcome from bulk_enroll. Per-row independent\ntransactions per #347b; the API returns the full array regardless\nof partial failures."},"EntitlementResponse":{"properties":{"id":{"type":"integer","title":"Id"},"package_name":{"type":"string","title":"Package Name"},"package_tier":{"type":"string","title":"Package Tier"},"activated_at":{"type":"string","format":"date-time","title":"Activated At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"days_remaining":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days Remaining"},"is_active":{"type":"boolean","title":"Is Active"},"source":{"type":"string","title":"Source"},"order_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Order Id"}},"type":"object","required":["id","package_name","package_tier","activated_at","expires_at","days_remaining","is_active","source","order_id"],"title":"EntitlementResponse","description":"Active entitlement/subscription for a user."},"EntitlementsResponse":{"properties":{"plan":{"$ref":"#/components/schemas/PlanInfo"},"entitlements":{"additionalProperties":{"$ref":"#/components/schemas/FeatureEntitlement"},"type":"object","title":"Entitlements"},"upgrade_options":{"items":{"$ref":"#/components/schemas/UpgradeOption"},"type":"array","title":"Upgrade Options"},"downgrade_comparison":{"anyOf":[{"$ref":"#/components/schemas/DowngradeComparison"},{"type":"null"}]}},"type":"object","required":["plan","entitlements","upgrade_options"],"title":"EntitlementsResponse","description":"Top-level response for GET /me/entitlements."},"EventEmailRuleCreate":{"properties":{"condition":{"anyOf":[{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"}],"title":"Condition"},"template_id":{"type":"integer","title":"Template Id"},"priority":{"type":"integer","title":"Priority","default":100},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_active":{"type":"boolean","title":"Is Active","default":true},"event_key":{"type":"string","title":"Event Key"}},"type":"object","required":["condition","template_id","event_key"],"title":"EventEmailRuleCreate"},"EventEmailRuleItem":{"properties":{"condition":{"anyOf":[{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"}],"title":"Condition"},"template_id":{"type":"integer","title":"Template Id"},"priority":{"type":"integer","title":"Priority","default":100},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_active":{"type":"boolean","title":"Is Active","default":true},"id":{"type":"integer","title":"Id"},"event_key":{"type":"string","title":"Event Key"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["condition","template_id","id","event_key","created_at","updated_at"],"title":"EventEmailRuleItem"},"EventEmailRuleReorder":{"properties":{"rule_ids":{"items":{"type":"integer"},"type":"array","title":"Rule Ids"}},"type":"object","required":["rule_ids"],"title":"EventEmailRuleReorder","description":"The FULL ordered list of rule ids for one event.\n\nFull rather than a single moved id on purpose: priorities are\nfirst-match-wins, so a partial update can silently reorder rules the\noperator never touched."},"EventEmailRuleUpdate":{"properties":{"condition":{"anyOf":[{"additionalProperties":true,"type":"object"},{"items":{},"type":"array"},{"type":"null"}],"title":"Condition"},"template_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Template Id"},"priority":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Priority"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"EventEmailRuleUpdate","description":"All optional — a PATCH. ``event_key`` is deliberately absent: moving a\nrule between events silently changes which sends it governs, so that is a\ndelete-and-recreate."},"EventMappingAuditItem":{"properties":{"id":{"type":"integer","title":"Id"},"version":{"type":"integer","title":"Version"},"snapshot":{"additionalProperties":true,"type":"object","title":"Snapshot"},"changed_by_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Changed By User Id"},"change_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Change Summary"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","version","snapshot","created_at"],"title":"EventMappingAuditItem"},"EventMappingCreate":{"properties":{"event_key":{"type":"string","title":"Event Key"},"producer":{"type":"string","title":"Producer"},"display_name":{"type":"string","title":"Display Name"},"crm_child_module":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Crm Child Module"},"crm_contact_updates":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Crm Contact Updates"},"crm_child_field_mapping":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Crm Child Field Mapping"},"crm_note_mapping":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Crm Note Mapping"},"crm_tag_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Crm Tag Source"},"ga4_event_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ga4 Event Name"},"ga4_params_mapping":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Ga4 Params Mapping"},"intent_tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intent Tier"},"otp_required":{"type":"boolean","title":"Otp Required","default":false},"otp_channel":{"type":"string","title":"Otp Channel","default":"email"},"rate_limit_per_ip_per_min":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rate Limit Per Ip Per Min","default":5},"rate_limit_per_email_per_hour":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rate Limit Per Email Per Hour","default":10},"required_fields":{"items":{"type":"string"},"type":"array","title":"Required Fields"},"internal_email_enabled":{"type":"boolean","title":"Internal Email Enabled","default":false},"internal_email_recipients":{"items":{"type":"string"},"type":"array","title":"Internal Email Recipients"},"internal_email_template_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Internal Email Template Id"},"user_email_enabled":{"type":"boolean","title":"User Email Enabled","default":false},"user_email_cc":{"items":{"type":"string"},"type":"array","title":"User Email Cc"},"user_email_bcc":{"items":{"type":"string"},"type":"array","title":"User Email Bcc"},"user_email_template_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Email Template Id"},"sheets_enabled":{"type":"boolean","title":"Sheets Enabled","default":false},"sheets_target_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sheets Target Key"},"sheets_field_mapping":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Sheets Field Mapping"},"is_active":{"type":"boolean","title":"Is Active","default":true}},"type":"object","required":["event_key","producer","display_name"],"title":"EventMappingCreate"},"EventMappingItem":{"properties":{"event_key":{"type":"string","title":"Event Key"},"producer":{"type":"string","title":"Producer"},"display_name":{"type":"string","title":"Display Name"},"crm_child_module":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Crm Child Module"},"crm_contact_updates":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Crm Contact Updates"},"crm_child_field_mapping":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Crm Child Field Mapping"},"crm_note_mapping":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Crm Note Mapping"},"crm_tag_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Crm Tag Source"},"ga4_event_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ga4 Event Name"},"ga4_params_mapping":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Ga4 Params Mapping"},"intent_tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intent Tier"},"otp_required":{"type":"boolean","title":"Otp Required","default":false},"otp_channel":{"type":"string","title":"Otp Channel","default":"email"},"rate_limit_per_ip_per_min":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rate Limit Per Ip Per Min","default":5},"rate_limit_per_email_per_hour":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rate Limit Per Email Per Hour","default":10},"required_fields":{"items":{"type":"string"},"type":"array","title":"Required Fields"},"internal_email_enabled":{"type":"boolean","title":"Internal Email Enabled","default":false},"internal_email_recipients":{"items":{"type":"string"},"type":"array","title":"Internal Email Recipients"},"internal_email_template_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Internal Email Template Id"},"user_email_enabled":{"type":"boolean","title":"User Email Enabled","default":false},"user_email_cc":{"items":{"type":"string"},"type":"array","title":"User Email Cc"},"user_email_bcc":{"items":{"type":"string"},"type":"array","title":"User Email Bcc"},"user_email_template_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Email Template Id"},"sheets_enabled":{"type":"boolean","title":"Sheets Enabled","default":false},"sheets_target_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sheets Target Key"},"sheets_field_mapping":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Sheets Field Mapping"},"is_active":{"type":"boolean","title":"Is Active","default":true},"id":{"type":"integer","title":"Id"},"version":{"type":"integer","title":"Version"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"updated_by_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Updated By User Id"}},"type":"object","required":["event_key","producer","display_name","id","version","created_at","updated_at"],"title":"EventMappingItem"},"EventMappingKeysResponse":{"properties":{"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"env":{"type":"string","title":"Env"},"keys":{"items":{"type":"string"},"type":"array","title":"Keys"}},"type":"object","required":["generated_at","env","keys"],"title":"EventMappingKeysResponse","description":"The contract gtp-wp CI consumes. Additive-only: never remove a field."},"EventMappingUpdate":{"properties":{"event_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Key"},"producer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Producer"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"crm_child_module":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Crm Child Module"},"crm_contact_updates":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Crm Contact Updates"},"crm_child_field_mapping":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Crm Child Field Mapping"},"crm_note_mapping":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Crm Note Mapping"},"crm_tag_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Crm Tag Source"},"ga4_event_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ga4 Event Name"},"ga4_params_mapping":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Ga4 Params Mapping"},"intent_tier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intent Tier"},"otp_required":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Otp Required"},"otp_channel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Otp Channel"},"rate_limit_per_ip_per_min":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rate Limit Per Ip Per Min"},"rate_limit_per_email_per_hour":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rate Limit Per Email Per Hour"},"required_fields":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Required Fields"},"internal_email_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Internal Email Enabled"},"internal_email_recipients":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Internal Email Recipients"},"internal_email_template_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Internal Email Template Id"},"user_email_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"User Email Enabled"},"user_email_cc":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"User Email Cc"},"user_email_bcc":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"User Email Bcc"},"user_email_template_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Email Template Id"},"sheets_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sheets Enabled"},"sheets_target_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sheets Target Key"},"sheets_field_mapping":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Sheets Field Mapping"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"expected_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expected Version"}},"additionalProperties":false,"type":"object","title":"EventMappingUpdate","description":"Partial update — only provided fields change. ``expected_version``\nenables optimistic concurrency (409 on mismatch)."},"ExamCount":{"properties":{"exam":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exam"},"count":{"type":"integer","title":"Count"},"questions":{"type":"integer","title":"Questions","default":0}},"type":"object","required":["exam","count"],"title":"ExamCount"},"ExclusiveInquiryAdminItem":{"properties":{"id":{"type":"integer","title":"Id"},"full_name":{"type":"string","title":"Full Name"},"email":{"type":"string","title":"Email"},"phone":{"type":"string","title":"Phone"},"timezone":{"type":"string","title":"Timezone"},"current_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Current Score"},"target_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Target Score"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Id"},"status":{"$ref":"#/components/schemas/ExclusiveInquiryStatus"},"admin_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Admin Notes"},"submitted_at":{"type":"string","format":"date-time","title":"Submitted At"},"last_status_change_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Status Change At"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"school_board":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"School Board"},"grade":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grade"}},"type":"object","required":["id","full_name","email","phone","timezone","current_score","target_score","notes","user_id","status","admin_notes","submitted_at","last_status_change_at"],"title":"ExclusiveInquiryAdminItem","description":"Detail view used by internal admin inquiries page (#366j).\n\nIncludes profile context (country / school_board / grade) when the\nsubmitter was logged-in — pulled live from `user.profile` via the\n`user_id` FK. None for anonymous inquiries."},"ExclusiveInquiryAdminUpdate":{"properties":{"status":{"anyOf":[{"$ref":"#/components/schemas/ExclusiveInquiryStatus"},{"type":"null"}]},"admin_notes":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"title":"Admin Notes"}},"type":"object","title":"ExclusiveInquiryAdminUpdate","description":"Status / admin-notes update from #366j detail view."},"ExclusiveInquiryCreate":{"properties":{"full_name":{"type":"string","maxLength":255,"minLength":1,"title":"Full Name"},"email":{"type":"string","format":"email","title":"Email"},"phone":{"type":"string","maxLength":32,"minLength":4,"title":"Phone"},"timezone":{"type":"string","maxLength":64,"minLength":1,"title":"Timezone"},"current_score":{"anyOf":[{"type":"integer","maximum":1600.0,"minimum":200.0},{"type":"null"}],"title":"Current Score"},"target_score":{"anyOf":[{"type":"integer","maximum":1600.0,"minimum":200.0},{"type":"null"}],"title":"Target Score"},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Notes"}},"type":"object","required":["full_name","email","phone","timezone"],"title":"ExclusiveInquiryCreate","description":"Public form submission from PricingPage → ExclusiveInquiryModal."},"ExclusiveInquiryResponse":{"properties":{"id":{"type":"integer","title":"Id"},"submitted_at":{"type":"string","format":"date-time","title":"Submitted At"},"status":{"$ref":"#/components/schemas/ExclusiveInquiryStatus"}},"type":"object","required":["id","submitted_at","status"],"title":"ExclusiveInquiryResponse","description":"Confirmation returned to the form. Does NOT echo PII back."},"ExclusiveInquiryStatus":{"type":"string","enum":["new","contacted","qualified","converted","dropped"],"title":"ExclusiveInquiryStatus","description":"Admin-tracked lifecycle of an Exclusive inquiry."},"ExistingQuestionInfo":{"properties":{"source_id":{"type":"string","title":"Source Id"},"id":{"type":"integer","title":"Id"},"topic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topic"},"subtopic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtopic"},"difficulty_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Difficulty Label"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["source_id","id"],"title":"ExistingQuestionInfo","description":"Info about an existing question."},"ExtensionBundleResponse":{"properties":{"id":{"type":"string","title":"Id"},"days":{"type":"integer","title":"Days"},"label":{"type":"string","title":"Label"},"price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Price"},"currency":{"type":"string","title":"Currency"},"currency_symbol":{"type":"string","title":"Currency Symbol"},"country_code":{"type":"string","title":"Country Code"}},"type":"object","required":["id","days","label","price","currency","currency_symbol","country_code"],"title":"ExtensionBundleResponse"},"ExtensionBundlesListResponse":{"properties":{"available":{"type":"boolean","title":"Available"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"bundles":{"items":{"$ref":"#/components/schemas/ExtensionBundleResponse"},"type":"array","title":"Bundles"}},"type":"object","required":["available"],"title":"ExtensionBundlesListResponse"},"ExternalLaunchResponse":{"properties":{"launch_url":{"type":"string","title":"Launch Url"},"scope":{"type":"string","title":"Scope"}},"type":"object","required":["launch_url","scope"],"title":"ExternalLaunchResponse","description":"Signed handoff URL Nova issues for an external-launch product.\n\nThe frontend's job is just `window.location.href = launch_url`; the\nURL itself encodes everything cux-entrayn + dmango need to log the\nuser in (email + scope + timestamp + nonce + HMAC signature)."},"ExternalUserCreateRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"first_name":{"type":"string","maxLength":100,"minLength":1,"title":"First Name"},"last_name":{"type":"string","maxLength":100,"minLength":1,"title":"Last Name"},"primary_source":{"type":"string","maxLength":50,"minLength":1,"title":"Primary Source"},"secondary_source":{"type":"string","maxLength":100,"minLength":1,"title":"Secondary Source"},"tertiary_source":{"type":"string","maxLength":100,"minLength":1,"title":"Tertiary Source"},"phone":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Phone"},"app_source":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"App Source"}},"type":"object","required":["email","first_name","last_name","primary_source","secondary_source","tertiary_source"],"title":"ExternalUserCreateRequest","description":"Webhook payload from a trusted partner system.\n\nThe three source fields are caller-provided so each partner / event\ncan tag users with their own attribution. They flow through to\nEntrayn verbatim and are also stored on our side via the existing\nsync helper."},"ExternalUserCreateResponse":{"properties":{"status":{"type":"string","title":"Status"},"user_id":{"type":"integer","title":"User Id"},"email":{"type":"string","title":"Email"}},"type":"object","required":["status","user_id","email"],"title":"ExternalUserCreateResponse","description":"Response from POST /api/v1/external/users.\n\n`status` is \"created\" for net-new accounts (HTTP 201) and \"exists\"\nwhen the email already had a Galvanize account (HTTP 200). Both\ncases trigger an idempotent Entrayn sync."},"ExternalUserDetailResponse":{"properties":{"id":{"type":"integer","title":"Id"},"email":{"type":"string","title":"Email"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"account_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Type"},"tier":{"type":"string","title":"Tier"},"is_email_verified":{"type":"boolean","title":"Is Email Verified"},"auth_provider":{"type":"string","title":"Auth Provider"},"predicted_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Predicted Score"},"predicted_score_confidence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Predicted Score Confidence"},"predicted_math_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Predicted Math Score"},"predicted_rw_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Predicted Rw Score"},"predicted_score_updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Predicted Score Updated At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"last_login_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Login At"},"phone_country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Country Code"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"},"grade":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grade"},"graduation_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Graduation Year"},"school_board":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"School Board"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"parent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Name"},"parent_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Email"},"parent_phone_country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Phone Country Code"},"parent_phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Phone Number"},"registration_ip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registration Ip"},"registration_user_agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Registration User Agent"},"app_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App Source"},"utm_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Source"},"utm_medium":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Medium"},"utm_campaign":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Campaign"},"utm_term":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Term"},"utm_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Content"},"lead_magnet_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lead Magnet Source"},"signup_flow":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signup Flow"},"last_login_ip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Login Ip"},"last_login_user_agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Login User Agent"},"last_login_app_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Login App Source"},"total_assessments":{"type":"integer","title":"Total Assessments"},"completed_assessments":{"type":"integer","title":"Completed Assessments"},"last_assessment_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Assessment At"},"average_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Average Score"},"highest_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Highest Score"},"qotd_streak":{"type":"integer","title":"Qotd Streak","default":0},"longest_streak":{"type":"integer","title":"Longest Streak","default":0},"longest_streak_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Longest Streak Date"},"share_count":{"type":"integer","title":"Share Count","default":0},"qotd_last_answered_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Qotd Last Answered Date"},"entitlements":{"items":{"$ref":"#/components/schemas/EntitlementResponse"},"type":"array","title":"Entitlements","default":[]},"orders":{"items":{"$ref":"#/components/schemas/OrderHistoryResponse"},"type":"array","title":"Orders","default":[]},"usage_limits":{"items":{"$ref":"#/components/schemas/UsageLimitResponse"},"type":"array","title":"Usage Limits","default":[]}},"type":"object","required":["id","email","first_name","last_name","account_type","tier","is_email_verified","auth_provider","predicted_score","predicted_score_confidence","predicted_math_score","predicted_rw_score","predicted_score_updated_at","created_at","updated_at","last_login_at","total_assessments","completed_assessments","last_assessment_at","average_score","highest_score"],"title":"ExternalUserDetailResponse"},"ExternalUserListResponse":{"properties":{"users":{"items":{"$ref":"#/components/schemas/ExternalUserResponse"},"type":"array","title":"Users"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"limit":{"type":"integer","title":"Limit"},"total_pages":{"type":"integer","title":"Total Pages"}},"type":"object","required":["users","total","page","limit","total_pages"],"title":"ExternalUserListResponse"},"ExternalUserResponse":{"properties":{"id":{"type":"integer","title":"Id"},"email":{"type":"string","title":"Email"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"account_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Type"},"tier":{"type":"string","title":"Tier"},"is_email_verified":{"type":"boolean","title":"Is Email Verified"},"auth_provider":{"type":"string","title":"Auth Provider"},"predicted_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Predicted Score"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"last_login_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Login At"},"phone_country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Country Code"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"},"grade":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grade"},"school_board":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"School Board"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"qotd_streak":{"type":"integer","title":"Qotd Streak","default":0},"longest_streak":{"type":"integer","title":"Longest Streak","default":0},"share_count":{"type":"integer","title":"Share Count","default":0},"subscription_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription Status"},"lead_magnet_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lead Magnet Source"},"signup_flow":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signup Flow"}},"type":"object","required":["id","email","first_name","last_name","account_type","tier","is_email_verified","auth_provider","predicted_score","created_at","updated_at","last_login_at"],"title":"ExternalUserResponse"},"FeatureEntitlement":{"properties":{"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"used":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Used"},"remaining":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Remaining"},"unlimited":{"type":"boolean","title":"Unlimited","default":false},"resets_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Resets At"},"allowed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allowed"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","title":"FeatureEntitlement","description":"Per-feature state: limit, usage, and computed helpers."},"FeedbackOutcomeResponse":{"properties":{"cycle":{"type":"integer","title":"Cycle"}},"type":"object","required":["cycle"],"title":"FeedbackOutcomeResponse"},"FeedbackPackageResponse":{"properties":{"id":{"type":"integer","title":"Id"},"mock_test_attempt_id":{"type":"integer","title":"Mock Test Attempt Id"},"status":{"type":"string","title":"Status"},"booking_deadline":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Booking Deadline"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"mock_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mock Title"}},"type":"object","required":["id","mock_test_attempt_id","status"],"title":"FeedbackPackageResponse"},"FeedbackSessionResponse":{"properties":{"id":{"type":"integer","title":"Id"},"package_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Package Id"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"status":{"type":"string","title":"Status"},"scheduled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled At"},"duration_minutes":{"type":"integer","title":"Duration Minutes"},"meeting_link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meeting Link"},"instructor_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructor Name"},"calcom_reschedule_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Calcom Reschedule Url"},"calcom_cancel_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Calcom Cancel Url"},"rating":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rating"},"instructor_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructor Notes"}},"type":"object","required":["id","status","duration_minutes"],"title":"FeedbackSessionResponse"},"FeedbackSubmitRequest":{"properties":{"cycle":{"type":"integer","title":"Cycle"},"responses":{"additionalProperties":true,"type":"object","title":"Responses"}},"type":"object","required":["cycle","responses"],"title":"FeedbackSubmitRequest"},"ForgotPasswordRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"}},"type":"object","required":["email"],"title":"ForgotPasswordRequest","description":"Request to initiate password reset."},"ForgotPasswordResponse":{"properties":{"message":{"type":"string","title":"Message"},"email":{"type":"string","title":"Email"}},"type":"object","required":["message","email"],"title":"ForgotPasswordResponse","description":"Response after password reset email is sent."},"FormOtpResendRequest":{"properties":{"challenge_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Challenge Id"}},"type":"object","required":["challenge_id"],"title":"FormOtpResendRequest","description":"POST .../form-submissions/resend-otp body (#691 W4)."},"FormOtpResendResponse":{"properties":{"status":{"type":"string","title":"Status"},"challenge_id":{"type":"integer","title":"Challenge Id"}},"type":"object","required":["status","challenge_id"],"title":"FormOtpResendResponse","description":"Result of a resend request. ``status`` is \"sent\" on success; rate\nlimits / resend cap surface as HTTP 429 at the endpoint."},"FormOtpVerifyRequest":{"properties":{"challenge_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Challenge Id"},"code":{"type":"string","maxLength":10,"minLength":4,"title":"Code"}},"type":"object","required":["challenge_id","code"],"title":"FormOtpVerifyRequest","description":"POST .../form-submissions/verify-otp body (#691 W4)."},"FormOtpVerifyResponse":{"properties":{"status":{"type":"string","title":"Status"},"submission_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Submission Id"},"attempts_remaining":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Attempts Remaining"},"retry_after_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Retry After Seconds"}},"type":"object","required":["status"],"title":"FormOtpVerifyResponse","description":"Result of a verify attempt.\n\n``status``:\n  - \"verified\"     → HTTP 200; code matched, lead promoted to active.\n  - \"invalid_code\" → HTTP 400; wrong/used code. ``attempts_remaining`` set.\n  - \"expired\"      → HTTP 410; code expired, request a resend.\n  - \"locked\"       → HTTP 429; too many attempts. ``retry_after_seconds`` set."},"FormSubmissionCreateRequest":{"properties":{"form_id":{"type":"string","maxLength":128,"minLength":1,"title":"Form Id"},"submission_uuid":{"type":"string","maxLength":128,"minLength":1,"title":"Submission Uuid"},"payload":{"additionalProperties":true,"type":"object","title":"Payload"},"attribution":{"$ref":"#/components/schemas/AttributionPayload"}},"type":"object","required":["form_id","submission_uuid","payload"],"title":"FormSubmissionCreateRequest","description":"Incoming Bricks form submission.\n\n``form_id`` identifies the source form (mapped in W5 event_mappings).\n``submission_uuid`` is Bricks-generated; combined with form_id it's\nthe idempotency key so retries from a flaky network are safe.\n\n``payload`` is the raw form field set, preserved verbatim in\nraw_payload for replay. Normalization (country / degree / exam slug\nresolution) happens in W3 at dispatch time.\n\n``extra='ignore'`` (NOT forbid) is deliberate: this is an external\nproducer intake spine, so the replay invariant trumps typo-catching.\nIf Bricks ships a new top-level wire field ahead of Nova's schema,\nPydantic must not 422 the request — the endpoint persists the raw\nbody to JSONB verbatim regardless of whether Pydantic recognizes\nthe field. The endpoint-side ``raw_body`` capture is what protects\nforward-compat; this schema's job is only to validate the typed\ncolumns Nova projects out (page_permalink, request_url) plus the\nnatural-key fields."},"FormSubmissionResponse":{"properties":{"status":{"type":"string","title":"Status"},"submission_id":{"type":"integer","title":"Submission Id"},"form_id":{"type":"string","title":"Form Id"},"submission_uuid":{"type":"string","title":"Submission Uuid"},"challenge_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Challenge Id"},"ari_bucket":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ari Bucket"}},"type":"object","required":["status","submission_id","form_id","submission_uuid"],"title":"FormSubmissionResponse","description":"Response from POST /api/v1/external/form-submissions.\n\n``status`` discriminates the outcome:\n  - \"created\"      → HTTP 201; new row + 2 queue rows persisted\n  - \"exists\"       → HTTP 200; (form_id, submission_uuid) already seen,\n                     existing submission_id returned\n  - \"otp_required\" → HTTP 202; OTP-gated form. The lead is held at\n                     status='pending_otp'; the submitter must POST the\n                     emailed code to .../verify-otp with ``challenge_id``\n                     before the lead is promoted + events fire (#691 W4).\n\n``ari_bucket`` (#1070) is the ARI readiness bucket, 1-4, returned only for\n``form_id=\"ari_assessment\"``. The marketing site gates the result reveal on\nit. The endpoint OMITS the key entirely when there is no bucket — for every\nnon-ARI form, and for an ARI submission that could not be scored — because\na ``null`` or ``0`` would render as a real bucket in the reveal. Absence is\nthe documented degrade signal, so it must stay distinguishable."},"FulfillmentLedgerEntryView":{"properties":{"id":{"type":"integer","title":"Id"},"nova_order_id":{"type":"integer","title":"Nova Order Id"},"state":{"type":"string","title":"State"},"retry_count":{"type":"integer","title":"Retry Count"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"},"last_attempt_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Attempt At"},"next_retry_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Retry At"},"external_ref":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Ref"},"fulfilled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Fulfilled At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["id","nova_order_id","state","retry_count","last_error","last_attempt_at","next_retry_at","external_ref","fulfilled_at","revoked_at","created_at","updated_at"],"title":"FulfillmentLedgerEntryView","description":"One ledger row as shown to internal admins."},"FunnelEventIngestRequest":{"properties":{"event_type":{"type":"string","enum":["pricing_viewed","paywall_hit","insights_viewed","plan_engaged","value_moment_seen","results_stage_viewed","results_offer_cta_clicked","results_shortcut_used"],"title":"Event Type"},"anon_id":{"type":"string","maxLength":128,"minLength":1,"pattern":"^[A-Za-z0-9._-]+$","title":"Anon Id"},"entry_point":{"anyOf":[{"type":"string","maxLength":64,"pattern":"^[A-Za-z0-9._:-]+$"},{"type":"null"}],"title":"Entry Point"},"exam":{"anyOf":[{"type":"string","maxLength":50,"pattern":"^[A-Za-z0-9._-]+$"},{"type":"null"}],"title":"Exam"},"product_id":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Product Id"},"device":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Device"},"client_occurred_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Client Occurred At"},"event_id":{"anyOf":[{"type":"string","maxLength":64,"pattern":"^[A-Za-z0-9._-]+$"},{"type":"null"}],"title":"Event Id"},"payload":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Payload"}},"additionalProperties":false,"type":"object","required":["event_type","anon_id"],"title":"FunnelEventIngestRequest","description":"One client view event posted by the browser ``track()`` shim."},"FunnelEventIngestResponse":{"properties":{"accepted":{"type":"boolean","title":"Accepted"}},"type":"object","required":["accepted"],"title":"FunnelEventIngestResponse"},"FunnelIdentityLinkRequest":{"properties":{"anon_id":{"type":"string","maxLength":128,"minLength":1,"pattern":"^[A-Za-z0-9._-]+$","title":"Anon Id"},"actor_role":{"type":"string","enum":["learner","registrant","payer","parent"],"title":"Actor Role","default":"registrant"},"source":{"type":"string","enum":["signup","login","manual"],"title":"Source","default":"signup"}},"additionalProperties":false,"type":"object","required":["anon_id"],"title":"FunnelIdentityLinkRequest","description":"Posted (authenticated) after signup/login to stitch a pre-signup ``anon_id``\nto the now-known user.\n\nThe ``user_id`` is NEVER taken from the body — the server derives it from the\nsession, so a client can only ever link its own identity. ``extra=\"forbid\"``\nmeans an attacker-supplied ``user_id`` is a hard 422 rather than a silently\nignored field, which is the behaviour worth pinning in a test."},"FunnelIdentityLinkResponse":{"properties":{"linked":{"type":"boolean","title":"Linked"}},"type":"object","required":["linked"],"title":"FunnelIdentityLinkResponse"},"FunnelReportResponse":{"properties":{"stages":{"items":{"$ref":"#/components/schemas/FunnelStageStatOut"},"type":"array","title":"Stages"},"perception":{"additionalProperties":true,"type":"object","title":"Perception"},"reconciliation":{"additionalProperties":true,"type":"object","title":"Reconciliation"}},"type":"object","required":["stages","perception","reconciliation"],"title":"FunnelReportResponse"},"FunnelStageStatOut":{"properties":{"stage":{"type":"string","title":"Stage"},"event_type":{"type":"string","title":"Event Type"},"actors":{"type":"integer","title":"Actors"},"step_conversion":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Step Conversion"}},"type":"object","required":["stage","event_type","actors"],"title":"FunnelStageStatOut","description":"One ordered funnel stage: how many distinct users ever reached it, and the\nconversion from the stage immediately before (``None`` for the first stage)."},"FvfIntentRequest":{"properties":{"target_exam":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Exam","description":"GRE | TOEFL | IELTS | SAT | PTE | OTHER"},"target_exams":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":10},{"type":"null"}],"title":"Target Exams","description":"Multi-exam selection; values from GRE | TOEFL | IELTS | SAT | PTE | OTHER"},"target_country":{"anyOf":[{"$ref":"#/components/schemas/FvfTargetCountry"},{"type":"null"}]},"target_stream":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Target Stream"},"target_dept":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Target Dept"},"target_semester":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Target Semester"}},"additionalProperties":false,"type":"object","title":"FvfIntentRequest","description":"Payload Cordova posts to /api/v1/vocab/me/fvf-intent. All fields\nnullable — Cordova may submit partial payloads. Server sets captured_at,\nso we forbid it in the request to avoid client-clock drift."},"FvfTargetCountry":{"properties":{"first":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"First"},"second":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Second"},"other":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Other"}},"additionalProperties":false,"type":"object","title":"FvfTargetCountry","description":"User's target country choices. All fields free-form; only `first` is\nexpected to be populated most of the time, but the FVF UI lets users\nadd up to three. Empty strings are normalized to None on serialize."},"GenericSuccess":{"properties":{"success":{"type":"boolean","title":"Success","default":true}},"type":"object","title":"GenericSuccess"},"GoogleSheetsTargetCreate":{"properties":{"target_key":{"type":"string","maxLength":100,"minLength":1,"title":"Target Key"},"env":{"type":"string","enum":["staging","production"],"title":"Env"},"spreadsheet_id":{"type":"string","minLength":1,"title":"Spreadsheet Id"},"sheet_tab":{"type":"string","minLength":1,"title":"Sheet Tab"},"key_column":{"type":"string","maxLength":100,"minLength":1,"title":"Key Column","default":"uuid"},"allowed_fields":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Fields"},"pii_policy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pii Policy"},"nova_env_sentinel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nova Env Sentinel"},"is_active":{"type":"boolean","title":"Is Active","default":true}},"type":"object","required":["target_key","env","spreadsheet_id","sheet_tab"],"title":"GoogleSheetsTargetCreate"},"GoogleSheetsTargetItem":{"properties":{"id":{"type":"integer","title":"Id"},"target_key":{"type":"string","title":"Target Key"},"env":{"type":"string","title":"Env"},"spreadsheet_id":{"type":"string","title":"Spreadsheet Id"},"sheet_tab":{"type":"string","title":"Sheet Tab"},"key_column":{"type":"string","title":"Key Column"},"allowed_fields":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Fields"},"pii_policy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pii Policy"},"nova_env_sentinel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nova Env Sentinel"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","target_key","env","spreadsheet_id","sheet_tab","key_column","is_active","created_at","updated_at"],"title":"GoogleSheetsTargetItem"},"GoogleSheetsTargetUpdate":{"properties":{"spreadsheet_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Spreadsheet Id"},"sheet_tab":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Sheet Tab"},"key_column":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Key Column"},"allowed_fields":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Fields"},"pii_policy":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pii Policy"},"nova_env_sentinel":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nova Env Sentinel"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"GoogleSheetsTargetUpdate"},"GradingCallbackRequest":{"properties":{"schema_version":{"type":"integer","minimum":1.0,"title":"Schema Version","description":"Bumped when the callback shape changes incompatibly. Nova rejects unknown versions with 400 to avoid silent mis-parsing of new fields.","default":1},"attempt_id":{"type":"integer","title":"Attempt Id","description":"Nova AssessmentAttempt.id"},"results":{"items":{"$ref":"#/components/schemas/GradingResultItem"},"type":"array","minItems":1,"title":"Results","description":"One entry per graded response"}},"additionalProperties":false,"type":"object","required":["attempt_id","results"],"title":"GradingCallbackRequest","description":"The bulk-update callback payload.\n\nschema_version is explicit (auditor required): unknown versions are\nrejected with a 400, not silently mis-parsed."},"GradingCallbackResponse":{"properties":{"status":{"type":"string","title":"Status","description":"'ok' on success; 'no_op_replay' on idempotent re-delivery"},"graded_count":{"type":"integer","title":"Graded Count","description":"Responses newly graded by this call","default":0},"skipped_count":{"type":"integer","title":"Skipped Count","description":"Responses already graded (idempotent re-delivery, replay-safe). Caller can ignore unless reconciling.","default":0},"all_graded":{"type":"boolean","title":"All Graded","description":"True when every manual-grading response on the attempt is now COMPLETE. Caller (worker) logs this for ops visibility.","default":false},"total_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Score","description":"Sum of all manual points across the attempt; None until all_graded."},"max_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Score","description":"Sum of all manual max points; None until all_graded."}},"type":"object","required":["status"],"title":"GradingCallbackResponse","description":"The callback's response — shape mirrors dmango's."},"GradingHistoryDetail":{"properties":{"id":{"type":"integer","title":"Id"},"status":{"type":"string","title":"Status"},"source":{"type":"string","title":"Source"},"engine_attempt_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Engine Attempt Id"},"attempt_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Attempt Id"},"exam_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exam Type"},"assessment_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assessment Name"},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email"},"response_count":{"type":"integer","title":"Response Count"},"retry_count":{"type":"integer","title":"Retry Count"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"dispatched_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Dispatched At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"task_id_external":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Id External"},"responses":{"items":{"$ref":"#/components/schemas/GradingHistoryResponseItem"},"type":"array","title":"Responses"}},"type":"object","required":["id","status","source","response_count","retry_count","responses"],"title":"GradingHistoryDetail"},"GradingHistoryItem":{"properties":{"id":{"type":"integer","title":"Id"},"status":{"type":"string","title":"Status"},"source":{"type":"string","title":"Source"},"engine_attempt_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Engine Attempt Id"},"attempt_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Attempt Id"},"exam_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exam Type"},"assessment_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assessment Name"},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email"},"response_count":{"type":"integer","title":"Response Count"},"retry_count":{"type":"integer","title":"Retry Count"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"},"created_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created At"},"dispatched_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Dispatched At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"}},"type":"object","required":["id","status","source","response_count","retry_count"],"title":"GradingHistoryItem"},"GradingHistoryList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/GradingHistoryItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"},"pages":{"type":"integer","title":"Pages"}},"type":"object","required":["items","total","page","page_size","pages"],"title":"GradingHistoryList"},"GradingHistoryResponseItem":{"properties":{"engine_response_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Engine Response Id"},"question_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Question Type"},"task_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Task Type"},"exam":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exam"},"writing_response":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Writing Response"},"recording_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recording Url"},"recording_duration_secs":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Recording Duration Secs"},"expected_text_answer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expected Text Answer"}},"type":"object","title":"GradingHistoryResponseItem"},"GradingQueueItem":{"properties":{"response_id":{"type":"integer","title":"Response Id"},"attempt_id":{"type":"integer","title":"Attempt Id"},"user_email":{"type":"string","title":"User Email"},"user_name":{"type":"string","title":"User Name"},"assessment_name":{"type":"string","title":"Assessment Name"},"exam_type":{"type":"string","title":"Exam Type"},"question_type":{"type":"string","title":"Question Type"},"question_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Question Text"},"question_order":{"type":"integer","title":"Question Order"},"max_points":{"type":"integer","title":"Max Points"},"writing_response":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Writing Response"},"recording_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recording Url"},"answered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Answered At"}},"type":"object","required":["response_id","attempt_id","user_email","user_name","assessment_name","exam_type","question_type","question_order","max_points"],"title":"GradingQueueItem","description":"One row in the admin grading queue (ungraded manual responses)."},"GradingQueueListResponse":{"properties":{"count":{"type":"integer","title":"Count"},"responses":{"items":{"$ref":"#/components/schemas/GradingQueueItem"},"type":"array","title":"Responses","default":[]}},"type":"object","required":["count"],"title":"GradingQueueListResponse"},"GradingResultItem":{"properties":{"response_id":{"type":"integer","title":"Response Id","description":"Nova AttemptResponse.id this grade is for"},"points_earned":{"type":"integer","minimum":0.0,"title":"Points Earned","description":"Score on the rubric's scale (0-5 for TOEFL, 0-9 IELTS×2)"},"grader_notes":{"additionalProperties":true,"type":"object","title":"Grader Notes","description":"Opaque JSON from the grader: rubric_breakdown, feedback, transcript, model_id. Stored verbatim — never logged."},"usage":{"anyOf":[{"items":{"$ref":"#/components/schemas/GradingUsageItem"},"type":"array"},{"type":"null"}],"title":"Usage","description":"Gemini calls made for this response (#1601). Optional: a service version that does not report usage omits it and grading is unchanged."}},"type":"object","required":["response_id","points_earned"],"title":"GradingResultItem","description":"One graded response in the callback payload.\n\nMatches the worker's per-response shape exactly:\n  {response_id, points_earned, grader_notes}\n\n`grader_notes` is opaque JSON (rubric breakdown, transcript,\nfeedback). Nova stores it in `GradingResult.rubric_breakdown` +\n`AttemptResponse.response_data` so the FE can render rubric\ndetail without re-fetching from the grading service."},"GradingStatusResponse":{"properties":{"attempt_id":{"type":"integer","title":"Attempt Id"},"overall_status":{"type":"string","title":"Overall Status"},"responses":{"items":{"$ref":"#/components/schemas/GradingStatusResponseItem"},"type":"array","title":"Responses"},"all_graded":{"type":"boolean","title":"All Graded"},"total_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Score"},"max_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Score"}},"type":"object","required":["attempt_id","overall_status","responses","all_graded"],"title":"GradingStatusResponse","description":"Poll target for the frontend grading-status UI.\n\nReturned by GET /api/v1/assessments/attempts/{attempt_id}/grading-status.\nFrontend polls every 5s while status != complete, backs off to 15s\nafter 30s elapsed, stops at COMPLETE/FAILED."},"GradingStatusResponseItem":{"properties":{"response_id":{"type":"integer","title":"Response Id"},"grading_status":{"type":"string","title":"Grading Status"},"points_earned":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Points Earned"},"grader_notes":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Grader Notes"}},"type":"object","required":["response_id","grading_status"],"title":"GradingStatusResponseItem","description":"Per-response grading state. Frontend uses this to render\npartial results as Gemini grades each response sequentially."},"GradingUnlockOfferResponse":{"properties":{"available":{"type":"boolean","title":"Available","default":false},"state":{"type":"string","title":"State","default":"unavailable"},"attempt_id":{"type":"integer","title":"Attempt Id"},"exam_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exam Slug"},"product_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Label"},"requires_phone":{"type":"boolean","title":"Requires Phone","default":false},"price":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Price"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"price_display":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Price Display"}},"type":"object","required":["attempt_id"],"title":"GradingUnlockOfferResponse","description":"#1176 (slice F) — region-aware offer for the grading-unlock checkout page.\n\n`available`/`state` mirror the results projector; `price`/`currency`/\n`price_display` are populated only in the \"offer\" state (region-resolved\nserver-side). Price is authoritative here and re-derived at /initiate."},"GradingUnlockStateResponse":{"properties":{"available":{"type":"boolean","title":"Available","default":false},"state":{"type":"string","title":"State","default":"unavailable"},"attempt_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Attempt Id"},"exam_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exam Slug"},"magnet_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Magnet Kind"}},"type":"object","title":"GradingUnlockStateResponse","description":"#1176 (slice E) — read-only grading-unlock state for the results page.\n\n`state`: \"offer\" (eligible to buy — available=True) | \"grading_in_progress\"\n| \"dispatch_failed\" (paid but grading dispatch failed) | \"complete\" |\n\"unavailable\" (not an eligible lead-magnet attempt / already package-graded).\nPrice is intentionally absent — it's region-resolved server-side at checkout."},"GradingUsageItem":{"properties":{"call_id":{"type":"string","maxLength":64,"minLength":8,"title":"Call Id","description":"Unique per Gemini call; Nova's idempotency key"},"model":{"type":"string","maxLength":100,"minLength":1,"title":"Model","description":"Model id that was called, e.g. gemini-2.5-pro"},"outcome":{"type":"string","enum":["success","empty","error"],"title":"Outcome","description":"success = returned a grade; empty = no usable text; error = the call raised"},"input_tokens":{"type":"integer","maximum":2147483647.0,"minimum":0.0,"title":"Input Tokens","description":"Whole prompt, every modality","default":0},"audio_input_tokens":{"type":"integer","maximum":2147483647.0,"minimum":0.0,"title":"Audio Input Tokens","description":"Audio part of input_tokens","default":0},"cached_input_tokens":{"type":"integer","maximum":2147483647.0,"minimum":0.0,"title":"Cached Input Tokens","description":"Cached part of input_tokens","default":0},"cached_audio_input_tokens":{"type":"integer","maximum":2147483647.0,"minimum":0.0,"title":"Cached Audio Input Tokens","description":"Audio part of cached_input_tokens (cached audio has its own rate)","default":0},"output_tokens":{"type":"integer","maximum":2147483647.0,"minimum":0.0,"title":"Output Tokens","description":"Response tokens, excluding thinking","default":0},"thinking_tokens":{"type":"integer","maximum":2147483647.0,"minimum":0.0,"title":"Thinking Tokens","description":"Thinking tokens (billed as output)","default":0},"called_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Called At","description":"When the service made the call"}},"type":"object","required":["call_id","model","outcome"],"title":"GradingUsageItem","description":"One Gemini call the grading service made for a response (#1601).\n\nReported so Nova can record what grading cost. A response can carry several:\nthe service walks a chain of fallback models with a retry each, and a failed\nor empty call still consumed tokens.\n\nUnknown fields are ignored so the service can add detail without a Nova\nrelease. Counts are raw token counts as Gemini reported them."},"GreDiagnostic":{"properties":{"assessment_engine_id":{"type":"integer","title":"Assessment Engine Id"},"name":{"type":"string","title":"Name"},"attempted":{"type":"boolean","title":"Attempted"},"best_measures":{"anyOf":[{"$ref":"#/components/schemas/GreMeasures"},{"type":"null"}]},"last_attempt_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Attempt At"},"best_attempt_engine_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Best Attempt Engine Id"}},"type":"object","required":["assessment_engine_id","name","attempted"],"title":"GreDiagnostic"},"GreHomeResponse":{"properties":{"tier":{"type":"string","title":"Tier"},"package_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Package Name"},"upgrade_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Upgrade Url"},"subscription_active_from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription Active From"},"subscription_expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription Expires At"},"has_taken_diagnostic":{"type":"boolean","title":"Has Taken Diagnostic"},"diagnostic":{"anyOf":[{"$ref":"#/components/schemas/GreDiagnostic"},{"type":"null"}]},"best_score":{"anyOf":[{"$ref":"#/components/schemas/GreMeasures"},{"type":"null"}]},"mocks":{"$ref":"#/components/schemas/GreMocksBlock"},"section_groups":{"$ref":"#/components/schemas/GreSectionGroupsBlock"},"lessons":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Lessons","description":"Always null — GRE has no Nova lessons"},"sample_results":{"items":{"$ref":"#/components/schemas/GreSampleResult"},"type":"array","title":"Sample Results","default":[]},"completed_count":{"type":"integer","title":"Completed Count","default":0},"recommended_next":{"anyOf":[{"$ref":"#/components/schemas/GreRecommendedNext"},{"type":"null"}]},"targets":{"$ref":"#/components/schemas/GreTargets"}},"type":"object","required":["tier","has_taken_diagnostic","mocks","section_groups"],"title":"GreHomeResponse","description":"Top-level payload for the GRE home page. Same render states + gating as the\nIELTS home; scores are GRE's three independent measures (Verbal/Quant 130-170,\nAWA band 0-6) and `lessons` is always null."},"GreMeasures":{"properties":{"verbal":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Verbal","description":"Verbal Reasoning scaled 130-170"},"quant":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Quant","description":"Quantitative Reasoning scaled 130-170"},"awa":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Awa","description":"Analytical Writing band 0-6 (0.5 steps)"}},"type":"object","title":"GreMeasures","description":"GRE's three independent measures. Any may be null (measure not attempted)."},"GreMockItem":{"properties":{"assessment_engine_id":{"type":"integer","title":"Assessment Engine Id"},"name":{"type":"string","title":"Name"},"unlocked":{"type":"boolean","title":"Unlocked"},"gated_pre_diagnostic":{"type":"boolean","title":"Gated Pre Diagnostic"},"attempted":{"type":"boolean","title":"Attempted"},"best_measures":{"anyOf":[{"$ref":"#/components/schemas/GreMeasures"},{"type":"null"}]},"lock_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lock Kind"},"unlock_after_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unlock After Name"},"lock_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lock Reason"},"last_attempt_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Attempt At"},"best_attempt_engine_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Best Attempt Engine Id"}},"type":"object","required":["assessment_engine_id","name","unlocked","gated_pre_diagnostic","attempted"],"title":"GreMockItem"},"GreMocksBlock":{"properties":{"limit_label":{"type":"string","title":"Limit Label"},"available_after_diagnostic":{"type":"boolean","title":"Available After Diagnostic","default":true},"assessments":{"items":{"$ref":"#/components/schemas/GreMockItem"},"type":"array","title":"Assessments"}},"type":"object","required":["limit_label","assessments"],"title":"GreMocksBlock"},"GreRecommendedNext":{"properties":{"assessment_engine_id":{"type":"integer","title":"Assessment Engine Id"},"name":{"type":"string","title":"Name"},"skill":{"type":"string","title":"Skill","description":"verbal|quant|writing"},"reason":{"type":"string","title":"Reason"}},"type":"object","required":["assessment_engine_id","name","skill","reason"],"title":"GreRecommendedNext"},"GreSampleResult":{"properties":{"assessment_engine_id":{"type":"integer","title":"Assessment Engine Id"},"name":{"type":"string","title":"Name"},"measures":{"$ref":"#/components/schemas/GreMeasures"},"attempted_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Attempted At"}},"type":"object","required":["assessment_engine_id","name","measures"],"title":"GreSampleResult"},"GreSectionGroupsBlock":{"properties":{"limit_label":{"type":"string","title":"Limit Label"},"available_after_diagnostic":{"type":"boolean","title":"Available After Diagnostic","default":true},"skills":{"items":{"$ref":"#/components/schemas/GreSkillGroup"},"type":"array","title":"Skills"}},"type":"object","required":["limit_label","skills"],"title":"GreSectionGroupsBlock"},"GreSectionTestItem":{"properties":{"assessment_engine_id":{"type":"integer","title":"Assessment Engine Id"},"name":{"type":"string","title":"Name"},"unlocked":{"type":"boolean","title":"Unlocked"},"gated_pre_diagnostic":{"type":"boolean","title":"Gated Pre Diagnostic"},"attempted":{"type":"boolean","title":"Attempted"},"best_scaled_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Best Scaled Score","description":"Verbal/Quant scaled 130-170, or AWA band 0-6 for Writing"},"max_scaled_score":{"type":"number","title":"Max Scaled Score","description":"170 for Verbal/Quant, 6 for Writing","default":170},"best_raw_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Best Raw Score"},"best_max_raw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Best Max Raw"},"lock_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lock Reason"},"last_attempt_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Attempt At"},"best_attempt_engine_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Best Attempt Engine Id"}},"type":"object","required":["assessment_engine_id","name","unlocked","gated_pre_diagnostic","attempted"],"title":"GreSectionTestItem"},"GreSkillGroup":{"properties":{"skill":{"type":"string","title":"Skill","description":"verbal|quant|writing"},"label":{"type":"string","title":"Label"},"assessments":{"items":{"$ref":"#/components/schemas/GreSectionTestItem"},"type":"array","title":"Assessments"}},"type":"object","required":["skill","label","assessments"],"title":"GreSkillGroup"},"GreTargets":{"properties":{"test_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Test Date","description":"ISO date (YYYY-MM-DD), or null if not set"},"target_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Target Score","description":"Target score, or null — GRE has no single scale (3 measures)"},"intake_season":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intake Season"},"intake_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Intake Year"}},"type":"object","title":"GreTargets"},"GuestTokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"expires_in":{"type":"integer","title":"Expires In","default":86400},"session_id":{"type":"string","title":"Session Id"},"tier":{"type":"string","title":"Tier","default":"guest"},"limits":{"additionalProperties":{"type":"integer"},"type":"object","title":"Limits"}},"type":"object","required":["access_token","session_id","limits"],"title":"GuestTokenResponse","description":"Response for guest token request.\n\nReturns a short-lived JWT that identifies a guest session.\nNo database user record is created - this is stateless."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HalfStats":{"properties":{"correct":{"type":"integer","title":"Correct"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["correct","total"],"title":"HalfStats","description":"Statistics for first/second half of a section."},"HeartbeatRequest":{"properties":{"section_time_remaining":{"additionalProperties":{"type":"integer"},"type":"object","title":"Section Time Remaining","description":"Remaining seconds per section, keyed by section (e.g., 'section_1': 300)"},"current_section":{"type":"integer","minimum":1.0,"title":"Current Section","description":"Current section number (1-indexed)"},"current_question_index":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Current Question Index","description":"Current question index (0-based), for resume"}},"type":"object","required":["section_time_remaining","current_section"],"title":"HeartbeatRequest","description":"Schema for periodic timer state persistence (heartbeat).\n\nSaves the current timer state without requiring an answer submission.\nUsed to handle edge cases where students leave without answering."},"HistoryItem":{"properties":{"id":{"type":"integer","title":"Id"},"question_id":{"type":"integer","title":"Question Id"},"topic":{"type":"string","title":"Topic"},"subject_code":{"type":"string","title":"Subject Code"},"is_correct":{"type":"boolean","title":"Is Correct"},"time_spent":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Time Spent"},"attempted_at":{"type":"string","format":"date-time","title":"Attempted At"}},"type":"object","required":["id","question_id","topic","subject_code","is_correct","attempted_at"],"title":"HistoryItem","description":"Single practice history entry."},"HomeSummaryResponse":{"properties":{"questions_count":{"type":"integer","title":"Questions Count"},"lessons_count":{"type":"integer","title":"Lessons Count"},"assessments_count":{"type":"integer","title":"Assessments Count"},"internal_users_count":{"type":"integer","title":"Internal Users Count"},"external_users_count":{"type":"integer","title":"External Users Count"},"exclusive_inquiries_open":{"type":"integer","title":"Exclusive Inquiries Open"},"current_version":{"type":"string","title":"Current Version"},"grading_pending":{"type":"integer","title":"Grading Pending"},"failed_events":{"type":"integer","title":"Failed Events"},"draft_templates":{"type":"integer","title":"Draft Templates"},"recent_activity":{"items":{"$ref":"#/components/schemas/RecentActivityItem"},"type":"array","title":"Recent Activity"}},"type":"object","required":["questions_count","lessons_count","assessments_count","internal_users_count","external_users_count","exclusive_inquiries_open","current_version","grading_pending","failed_events","draft_templates","recent_activity"],"title":"HomeSummaryResponse","description":"Data powering the role-aware internal Home (#1020d).\n\nOne cheap aggregate call per page load: KPI counts, \"needs attention\" counts\n(the frontend shows each only when > 0), and a small recent-activity feed.\nEach role's Home renders the subset relevant to it; quick actions + nav come\nfrom the frontend nav config."},"IeltsBestScore":{"properties":{"total":{"type":"number","title":"Total"},"max_total":{"type":"number","title":"Max Total","default":9},"source_name":{"type":"string","title":"Source Name","description":"Where this band came from, e.g. 'Mock Test 1'"},"source_assessment_engine_id":{"type":"integer","title":"Source Assessment Engine Id"},"attempted_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Attempted At"}},"type":"object","required":["total","source_name","source_assessment_engine_id"],"title":"IeltsBestScore"},"IeltsDiagnostic":{"properties":{"assessment_engine_id":{"type":"integer","title":"Assessment Engine Id"},"name":{"type":"string","title":"Name"},"attempted":{"type":"boolean","title":"Attempted"},"best_total_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Best Total Score","description":"Best overall band (0-9)"},"max_total_score":{"type":"number","title":"Max Total Score","default":9},"last_attempt_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Attempt At"},"best_attempt_engine_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Best Attempt Engine Id"}},"type":"object","required":["assessment_engine_id","name","attempted"],"title":"IeltsDiagnostic"},"IeltsHomeResponse":{"properties":{"tier":{"type":"string","title":"Tier"},"package_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Package Name"},"upgrade_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Upgrade Url"},"subscription_active_from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription Active From"},"subscription_expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription Expires At"},"has_taken_diagnostic":{"type":"boolean","title":"Has Taken Diagnostic"},"diagnostic":{"anyOf":[{"$ref":"#/components/schemas/IeltsDiagnostic"},{"type":"null"}]},"best_score":{"anyOf":[{"$ref":"#/components/schemas/IeltsBestScore"},{"type":"null"}]},"mocks":{"$ref":"#/components/schemas/IeltsMocksBlock"},"section_groups":{"$ref":"#/components/schemas/IeltsSectionGroupsBlock"},"lessons":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Lessons","description":"Always null — IELTS has no lessons"},"sample_results":{"items":{"$ref":"#/components/schemas/IeltsSampleResult"},"type":"array","title":"Sample Results","default":[]},"completed_count":{"type":"integer","title":"Completed Count","default":0},"recommended_next":{"anyOf":[{"$ref":"#/components/schemas/IeltsRecommendedNext"},{"type":"null"}]},"targets":{"$ref":"#/components/schemas/IeltsTargets"}},"type":"object","required":["tier","has_taken_diagnostic","mocks","section_groups"],"title":"IeltsHomeResponse","description":"Top-level payload for the IELTS home page. Same render states +\nkeys as ToeflHomeResponse (the frontend consumes the same shape); the\nscores are IELTS bands (0-9, floats) and `lessons` is always null."},"IeltsMockItem":{"properties":{"assessment_engine_id":{"type":"integer","title":"Assessment Engine Id"},"name":{"type":"string","title":"Name"},"unlocked":{"type":"boolean","title":"Unlocked"},"gated_pre_diagnostic":{"type":"boolean","title":"Gated Pre Diagnostic"},"attempted":{"type":"boolean","title":"Attempted"},"best_total_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Best Total Score","description":"Overall band 0-9"},"max_total_score":{"type":"number","title":"Max Total Score","default":9},"lock_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lock Kind"},"unlock_after_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unlock After Name"},"lock_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lock Reason"},"last_attempt_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Attempt At"},"best_attempt_engine_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Best Attempt Engine Id"}},"type":"object","required":["assessment_engine_id","name","unlocked","gated_pre_diagnostic","attempted"],"title":"IeltsMockItem"},"IeltsMocksBlock":{"properties":{"limit_label":{"type":"string","title":"Limit Label"},"available_after_diagnostic":{"type":"boolean","title":"Available After Diagnostic","default":true},"assessments":{"items":{"$ref":"#/components/schemas/IeltsMockItem"},"type":"array","title":"Assessments"}},"type":"object","required":["limit_label","assessments"],"title":"IeltsMocksBlock"},"IeltsRecommendedNext":{"properties":{"assessment_engine_id":{"type":"integer","title":"Assessment Engine Id"},"name":{"type":"string","title":"Name"},"skill":{"type":"string","title":"Skill","description":"listening|reading|speaking|writing"},"reason":{"type":"string","title":"Reason"}},"type":"object","required":["assessment_engine_id","name","skill","reason"],"title":"IeltsRecommendedNext"},"IeltsSampleResult":{"properties":{"assessment_engine_id":{"type":"integer","title":"Assessment Engine Id"},"name":{"type":"string","title":"Name"},"score_total":{"type":"number","title":"Score Total"},"max_total":{"type":"number","title":"Max Total","default":9},"attempted_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Attempted At"}},"type":"object","required":["assessment_engine_id","name","score_total"],"title":"IeltsSampleResult"},"IeltsSectionGroupsBlock":{"properties":{"limit_label":{"type":"string","title":"Limit Label"},"available_after_diagnostic":{"type":"boolean","title":"Available After Diagnostic","default":true},"skills":{"items":{"$ref":"#/components/schemas/IeltsSkillGroup"},"type":"array","title":"Skills"}},"type":"object","required":["limit_label","skills"],"title":"IeltsSectionGroupsBlock"},"IeltsSectionTestItem":{"properties":{"assessment_engine_id":{"type":"integer","title":"Assessment Engine Id"},"name":{"type":"string","title":"Name"},"unlocked":{"type":"boolean","title":"Unlocked"},"gated_pre_diagnostic":{"type":"boolean","title":"Gated Pre Diagnostic"},"attempted":{"type":"boolean","title":"Attempted"},"best_section_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Best Section Score","description":"Band 0-9 for this skill"},"max_section_score":{"type":"number","title":"Max Section Score","default":9},"lock_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lock Kind","description":"Why this section test is locked: null (unlocked) | 'diagnostic' | 'tier'"},"lock_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lock Reason"},"last_attempt_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Attempt At"},"best_attempt_engine_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Best Attempt Engine Id"}},"type":"object","required":["assessment_engine_id","name","unlocked","gated_pre_diagnostic","attempted"],"title":"IeltsSectionTestItem"},"IeltsSkillGroup":{"properties":{"skill":{"type":"string","title":"Skill","description":"listening|reading|speaking|writing"},"label":{"type":"string","title":"Label"},"assessments":{"items":{"$ref":"#/components/schemas/IeltsSectionTestItem"},"type":"array","title":"Assessments"}},"type":"object","required":["skill","label","assessments"],"title":"IeltsSkillGroup"},"IeltsTargets":{"properties":{"test_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Test Date","description":"ISO date (YYYY-MM-DD), or null if not set"},"target_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Target Score","description":"Target band (0-9, 0.5 steps), or null"},"max_score":{"type":"number","title":"Max Score","default":9},"intake_season":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intake Season"},"intake_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Intake Year"}},"type":"object","title":"IeltsTargets"},"ImageExistsResult":{"properties":{"filename":{"type":"string","title":"Filename"},"exists":{"type":"boolean","title":"Exists"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"}},"type":"object","required":["filename","exists"],"title":"ImageExistsResult","description":"Result for a single image existence check."},"ImageUploadResponse":{"properties":{"filename":{"type":"string","title":"Filename"},"url":{"type":"string","title":"Url"},"size_bytes":{"type":"integer","title":"Size Bytes"}},"type":"object","required":["filename","url","size_bytes"],"title":"ImageUploadResponse","description":"Response for single image upload."},"ImageUploadResult":{"properties":{"filename":{"type":"string","title":"Filename"},"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"success":{"type":"boolean","title":"Success"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["filename","url","success"],"title":"ImageUploadResult","description":"Result of image upload during import."},"ImpersonatedUser":{"properties":{"id":{"type":"integer","title":"Id"},"email":{"type":"string","title":"Email"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"}},"type":"object","required":["id","email"],"title":"ImpersonatedUser"},"ImportBatchSummary":{"properties":{"batch_id":{"type":"string","title":"Batch Id"},"source_system":{"type":"string","title":"Source System"},"imported_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Imported At"},"imported_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Imported By"},"count_questions":{"type":"integer","title":"Count Questions","default":0},"count_lessons":{"type":"integer","title":"Count Lessons","default":0},"count_skill_nodes":{"type":"integer","title":"Count Skill Nodes","default":0},"validation_status_breakdown":{"additionalProperties":{"type":"integer"},"type":"object","title":"Validation Status Breakdown"}},"type":"object","required":["batch_id","source_system"],"title":"ImportBatchSummary"},"ImportError":{"properties":{"index":{"type":"integer","title":"Index"},"source_id":{"type":"string","title":"Source Id"},"error":{"type":"string","title":"Error"}},"type":"object","required":["index","source_id","error"],"title":"ImportError","description":"Error details for a failed import item"},"ImportLedgerResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ImportBatchSummary"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["items","total","limit","offset"],"title":"ImportLedgerResponse"},"ImportQuestionItem":{"properties":{"source_id":{"type":"string","title":"Source Id"},"subject_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Subject Id"},"module":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Module"},"topic":{"type":"string","title":"Topic"},"subtopic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtopic"},"question_type":{"type":"string","title":"Question Type","default":"multiple_choice"},"difficulty":{"type":"integer","title":"Difficulty","default":3},"difficulty_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Difficulty Label"},"content":{"additionalProperties":true,"type":"object","title":"Content"},"answer_insights":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Answer Insights"},"usage_contexts":{"items":{"type":"string"},"type":"array","title":"Usage Contexts","default":["free_practice"]},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"expected_time_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expected Time Seconds"},"irt_difficulty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Irt Difficulty"},"irt_discrimination":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Irt Discrimination"},"irt_guessing":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Irt Guessing"}},"type":"object","required":["source_id","topic","content"],"title":"ImportQuestionItem","description":"Single question item for import"},"ImportQuestionsRequest":{"properties":{"questions":{"items":{"$ref":"#/components/schemas/ImportQuestionItem"},"type":"array","title":"Questions"},"preview_only":{"type":"boolean","title":"Preview Only","default":false}},"type":"object","required":["questions"],"title":"ImportQuestionsRequest","description":"Request for bulk question import"},"ImportResult":{"properties":{"total":{"type":"integer","title":"Total"},"valid":{"type":"integer","title":"Valid"},"invalid":{"type":"integer","title":"Invalid"},"created":{"type":"integer","title":"Created"},"errors":{"items":{"$ref":"#/components/schemas/ImportError"},"type":"array","title":"Errors"}},"type":"object","required":["total","valid","invalid","created","errors"],"title":"ImportResult","description":"Result of question import"},"ImportRunRequest":{"properties":{"source_system":{"type":"string","title":"Source System","description":"One of: studio, dmango, moodle"},"exam":{"type":"string","title":"Exam","description":"ExamCode slug, e.g. 'sat' / 'toefl'"},"payload":{"title":"Payload","description":"JSON payload accepted by the import script"},"dry_run":{"type":"boolean","title":"Dry Run","default":false}},"type":"object","required":["source_system","exam","payload"],"title":"ImportRunRequest","description":"Inline import-script invocation (Epic 9d).\n\n`source_system` selects which Epic 8 import script to delegate to.\n`exam` is validated against ExamCode. `payload` is the JSON the\nscript would otherwise read from disk. `dry_run` runs validation\nwithout writing rows."},"ImportRunResponse":{"properties":{"batch_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Batch Id"},"source_system":{"type":"string","title":"Source System"},"total":{"type":"integer","title":"Total"},"created":{"type":"integer","title":"Created","default":0},"updated":{"type":"integer","title":"Updated","default":0},"skipped":{"type":"integer","title":"Skipped","default":0},"flagged":{"type":"integer","title":"Flagged","default":0},"errors":{"items":{"type":"string"},"type":"array","title":"Errors"},"dry_run":{"type":"boolean","title":"Dry Run","default":false}},"type":"object","required":["batch_id","source_system","total"],"title":"ImportRunResponse"},"ImportWithImagesResult":{"properties":{"total_questions":{"type":"integer","title":"Total Questions"},"valid_questions":{"type":"integer","title":"Valid Questions"},"invalid_questions":{"type":"integer","title":"Invalid Questions"},"created_questions":{"type":"integer","title":"Created Questions"},"updated_questions":{"type":"integer","title":"Updated Questions","default":0},"skipped_questions":{"type":"integer","title":"Skipped Questions","default":0},"total_images":{"type":"integer","title":"Total Images"},"uploaded_images":{"type":"integer","title":"Uploaded Images"},"failed_images":{"type":"integer","title":"Failed Images"},"missing_images":{"items":{"type":"string"},"type":"array","title":"Missing Images"},"image_results":{"items":{"$ref":"#/components/schemas/ImageUploadResult"},"type":"array","title":"Image Results"},"question_errors":{"items":{"$ref":"#/components/schemas/ImportError"},"type":"array","title":"Question Errors"}},"type":"object","required":["total_questions","valid_questions","invalid_questions","created_questions","total_images","uploaded_images","failed_images","missing_images","image_results","question_errors"],"title":"ImportWithImagesResult","description":"Result of question import with images."},"InitiateRefundRequest":{"properties":{"reason":{"type":"string","maxLength":500,"minLength":3,"title":"Reason"}},"type":"object","required":["reason"],"title":"InitiateRefundRequest","description":"POST body for refunding an order. Full refunds only (v1) — no amount."},"InitiateRequest":{"properties":{"item_type":{"type":"string","enum":["package","extension","addon","grading_unlock"],"title":"Item Type"},"item_id":{"type":"integer","title":"Item Id"},"country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Code"},"bundle_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bundle Id"},"addon_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Addon Id"},"exam_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exam Slug"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone"},"discount_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Discount Code"},"gateway":{"anyOf":[{"type":"string","enum":["razorpay","paypal"]},{"type":"null"}],"title":"Gateway"},"galv_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Galv Session Id"},"entry_point":{"anyOf":[{"type":"string","const":"results_offer"},{"type":"null"}],"title":"Entry Point"},"source_attempt_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Source Attempt Id"}},"type":"object","required":["item_type","item_id"],"title":"InitiateRequest","description":"Frontend -> backend initiate call.\n\nitem_type:\n    \"package\":   item_id = Package.id\n    \"extension\": item_id = Subscription.id being extended; bundle_id required\n    \"addon\" (#543 Epic 5e): item_id = 0 sentinel; addon_id + exam_slug required\n    \"grading_unlock\" (#1176 d1): item_id = EngineAttempt.id for the submitted\n        lead-magnet attempt whose Writing/Speaking responses are being unlocked"},"InitiateResponse":{"properties":{"order_id":{"type":"integer","title":"Order Id"},"gateway":{"type":"string","title":"Gateway"},"gateway_order_id":{"type":"string","title":"Gateway Order Id"},"price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Price"},"currency":{"type":"string","title":"Currency"},"frontend_payload":{"additionalProperties":true,"type":"object","title":"Frontend Payload"}},"type":"object","required":["order_id","gateway","gateway_order_id","price","currency","frontend_payload"],"title":"InitiateResponse","description":"Backend -> frontend response from /initiate.\n\n`frontend_payload.type` tells the frontend how to render checkout:\n- \"razorpay_checkout\": open Razorpay modal with order_id + key_id\n- \"easebuzz_redirect\": redirect to frontend_payload.url (form POST)\n- \"paypal_redirect\" (#855n): navigate to frontend_payload.approval_url;\n  PayPal returns to /payment/callback with ?token=<order_id>\n- \"mock_modal\": dev-only success/failure modal"},"InsightsDetail":{"properties":{"attempt_id":{"type":"integer","title":"Attempt Id"},"total_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Score"},"math_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Math Score"},"rw_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rw Score"},"percentile_estimate":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Percentile Estimate"},"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"assessment_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assessment Type"},"is_first_assessment":{"type":"boolean","title":"Is First Assessment","default":false},"time_insights":{"anyOf":[{"$ref":"#/components/schemas/TimeInsights"},{"type":"null"}]},"accuracy_by_topic":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/TopicAccuracy"},"type":"object"},{"type":"null"}],"title":"Accuracy By Topic"},"accuracy_by_difficulty":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/DifficultyAccuracy"},"type":"object"},{"type":"null"}],"title":"Accuracy By Difficulty"},"mistake_breakdown":{"anyOf":[{"$ref":"#/components/schemas/MistakeBreakdown"},{"type":"null"}]},"section_variance":{"anyOf":[{"$ref":"#/components/schemas/SectionVariance"},{"type":"null"}]},"study_correlation":{"anyOf":[{"$ref":"#/components/schemas/StudyCorrelation"},{"type":"null"}]},"key_takeaways":{"anyOf":[{"items":{"$ref":"#/components/schemas/KeyTakeaway"},"type":"array"},{"type":"null"}],"title":"Key Takeaways"},"trend_analysis":{"anyOf":[{"$ref":"#/components/schemas/TrendAnalysis"},{"type":"null"}]},"wrong_answer_analysis":{"anyOf":[{"$ref":"#/components/schemas/WrongAnswerAnalysis"},{"type":"null"}]},"recommendations":{"anyOf":[{"items":{"$ref":"#/components/schemas/Recommendation"},"type":"array"},{"type":"null"}],"title":"Recommendations"}},"type":"object","required":["attempt_id","generated_at"],"title":"InsightsDetail","description":"Full deep insights (Guided+ tiers only).\n\nIncludes detailed time analysis, accuracy breakdown,\nmistake categorization, fatigue detection, and study correlation."},"InsightsGenerateResponse":{"properties":{"status":{"type":"string","title":"Status"},"insights_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Insights Id"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["status"],"title":"InsightsGenerateResponse","description":"Response when triggering insights generation."},"InsightsSummary":{"properties":{"attempt_id":{"type":"integer","title":"Attempt Id"},"total_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Score"},"math_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Math Score"},"rw_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rw Score"},"percentile_estimate":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Percentile Estimate"},"generated_at":{"type":"string","format":"date-time","title":"Generated At"}},"type":"object","required":["attempt_id","generated_at"],"title":"InsightsSummary","description":"Basic insights summary (available to all tiers).\n\nShows only score information, no detailed analysis."},"InstitutionCoordinatorCreate":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"email":{"type":"string","format":"email","title":"Email"},"phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Phone"}},"type":"object","required":["name","email"],"title":"InstitutionCoordinatorCreate","description":"Body shape for POST /api/internal/institutions/{id}/coordinators."},"InstitutionCoordinatorResponse":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"email":{"type":"string","format":"email","title":"Email"},"phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Phone"},"id":{"type":"integer","title":"Id"},"institution_id":{"type":"integer","title":"Institution Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["name","email","id","institution_id","created_at","updated_at"],"title":"InstitutionCoordinatorResponse","description":"Admin-only response — contains PII (email, phone)."},"InstitutionCreate":{"properties":{"slug":{"type":"string","maxLength":60,"minLength":1,"pattern":"^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$","title":"Slug"},"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"type":{"type":"string","maxLength":20,"title":"Type","default":"school"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"contact_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Contact Email"},"contact_phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Contact Phone"},"timezone":{"type":"string","maxLength":64,"title":"Timezone","default":"Asia/Kolkata"}},"type":"object","required":["slug","name"],"title":"InstitutionCreate","description":"Body shape for POST /api/internal/institutions."},"InstitutionPublicResponse":{"properties":{"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"}},"type":"object","required":["slug","name","type","logo_url"],"title":"InstitutionPublicResponse","description":"GET /api/v1/institutions/{slug} — public, unauthenticated.\n\nOmits PII (coordinators, contact email/phone) by design — the\nlanding page only needs branding + name to introduce the program.\nSee `security.md` §5."},"InstitutionResponse":{"properties":{"slug":{"type":"string","maxLength":60,"minLength":1,"pattern":"^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$","title":"Slug"},"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"type":{"type":"string","maxLength":20,"title":"Type","default":"school"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"contact_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Contact Email"},"contact_phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Contact Phone"},"timezone":{"type":"string","maxLength":64,"title":"Timezone","default":"Asia/Kolkata"},"id":{"type":"integer","title":"Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"coordinators":{"items":{"$ref":"#/components/schemas/InstitutionCoordinatorResponse"},"type":"array","title":"Coordinators"}},"type":"object","required":["slug","name","id","created_at","updated_at"],"title":"InstitutionResponse","description":"Admin-only response — full record incl. PII."},"InstitutionUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Name"},"type":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Type"},"logo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Logo Url"},"contact_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Contact Email"},"contact_phone":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}],"title":"Contact Phone"},"timezone":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Timezone"}},"type":"object","title":"InstitutionUpdate","description":"PATCH /api/internal/institutions/{id} — all fields optional."},"InstructorOption":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"booking_url":{"type":"string","title":"Booking Url"}},"type":"object","required":["id","name","booking_url"],"title":"InstructorOption","description":"A bookable instructor + their prepared Cal.com URL for one subject."},"IntegrityAttemptItem":{"properties":{"attempt_id":{"type":"integer","title":"Attempt Id"},"attempt_source":{"type":"string","title":"Attempt Source","default":"legacy"},"user_id":{"type":"integer","title":"User Id"},"user_email":{"type":"string","title":"User Email"},"assessment_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assessment Title"},"exam_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exam Type"},"risk_score":{"type":"integer","title":"Risk Score"},"flag":{"type":"string","title":"Flag"},"counts":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Counts"},"computed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Computed At"},"attempt_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Attempt At"}},"type":"object","required":["attempt_id","user_id","user_email","risk_score","flag"],"title":"IntegrityAttemptItem"},"IntegrityAttemptsResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/IntegrityAttemptItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"flag_counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Flag Counts","default":{}}},"type":"object","required":["items","total"],"title":"IntegrityAttemptsResponse"},"IntegrityEventIn":{"properties":{"source":{"type":"string","enum":["vision","browser"],"title":"Source"},"event_type":{"type":"string","maxLength":48,"minLength":1,"title":"Event Type"},"detail":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Detail"},"client_ts":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Client Ts"}},"type":"object","required":["source","event_type"],"title":"IntegrityEventIn","description":"A single on-device proctoring / browser event posted from the client (#1057e)."},"IntegrityEventsBatch":{"properties":{"events":{"items":{"$ref":"#/components/schemas/IntegrityEventIn"},"type":"array","title":"Events"}},"type":"object","title":"IntegrityEventsBatch","description":"A batch of integrity events flushed periodically by the client."},"InternalLoginRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"}},"type":"object","required":["email","password"],"title":"InternalLoginRequest"},"InternalLoginResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"user":{"$ref":"#/components/schemas/app__api__internal__auth__InternalUserResponse"}},"type":"object","required":["access_token","user"],"title":"InternalLoginResponse"},"JourneyOverview":{"properties":{"recommendations":{"items":{"$ref":"#/components/schemas/JourneyRecommendation"},"type":"array","title":"Recommendations"}},"type":"object","title":"JourneyOverview","description":"The JourneyOverviewCard's content. Sole next-action surface per D2."},"JourneyRecommendation":{"properties":{"title":{"type":"string","title":"Title"},"subtitle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtitle"},"cta_label":{"type":"string","title":"Cta Label"},"cta_url":{"type":"string","title":"Cta Url"},"priority":{"type":"integer","maximum":3.0,"minimum":1.0,"title":"Priority","description":"1=top recommendation","default":1}},"type":"object","required":["title","cta_label","cta_url"],"title":"JourneyRecommendation","description":"One next-action item in JourneyOverviewCard. 1-3 of these per\ndashboard, ordered by priority (1 = loudest)."},"KareersBookingResponse":{"properties":{"state":{"type":"string","enum":["none","booked","past","completed","cancelled","no_show"],"title":"State"},"start_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start At"},"end_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End At"}},"type":"object","required":["state"],"title":"KareersBookingResponse"},"KeyTakeaway":{"properties":{"priority":{"type":"integer","title":"Priority"},"category":{"type":"string","title":"Category"},"message":{"type":"string","title":"Message"},"action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"}},"type":"object","required":["priority","category","message"],"title":"KeyTakeaway","description":"Single key takeaway with priority."},"LLMProviderModeResponse":{"properties":{"mode":{"type":"string","title":"Mode"},"valid_modes":{"items":{"type":"string"},"type":"array","title":"Valid Modes"},"source":{"type":"string","title":"Source"}},"type":"object","required":["mode","valid_modes","source"],"title":"LLMProviderModeResponse","description":"Current value of the LLM provider mode + the (DB-known) modes."},"LLMProviderModeUpdate":{"properties":{"mode":{"type":"string","title":"Mode","description":"One of cliproxy_primary | openrouter_primary | cliproxy_only | openrouter_only"}},"type":"object","required":["mode"],"title":"LLMProviderModeUpdate"},"LastAttemptSummary":{"properties":{"id":{"type":"integer","title":"Id"},"kind":{"type":"string","enum":["mock","section_test","diagnostic","engine_mock","engine_diagnostic"],"title":"Kind"},"score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Score"},"completed_at":{"type":"string","format":"date-time","title":"Completed At"},"has_unreviewed_reflections":{"type":"boolean","title":"Has Unreviewed Reflections","default":false},"review_url":{"type":"string","title":"Review Url"}},"type":"object","required":["id","kind","completed_at","review_url"],"title":"LastAttemptSummary","description":"Last completed attempt card (review-mistakes CTA)."},"LaunchClearedUpdate":{"properties":{"launch_cleared":{"type":"boolean","title":"Launch Cleared"}},"type":"object","required":["launch_cleared"],"title":"LaunchClearedUpdate","description":"#855d: the one-field body keeps the human launch sign-off deliberate."},"LeadListResponse":{"properties":{"items":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"},"pages":{"type":"integer","title":"Pages"}},"type":"object","required":["items","total","page","page_size","pages"],"title":"LeadListResponse"},"LeadMagnetConfigCreate":{"properties":{"exam":{"type":"string","title":"Exam"},"magnet_kind":{"type":"string","title":"Magnet Kind"},"assessment_id":{"type":"integer","title":"Assessment Id"},"section_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section Key"},"display_order":{"type":"integer","title":"Display Order","default":0},"is_active":{"type":"boolean","title":"Is Active","default":true},"label_override":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label Override"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","required":["exam","magnet_kind","assessment_id"],"title":"LeadMagnetConfigCreate"},"LeadMagnetConfigItem":{"properties":{"id":{"type":"integer","title":"Id"},"exam_type":{"type":"string","title":"Exam Type"},"magnet_kind":{"type":"string","title":"Magnet Kind"},"section_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section Key"},"assessment_id":{"type":"integer","title":"Assessment Id"},"assessment_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assessment Name"},"display_order":{"type":"integer","title":"Display Order"},"is_active":{"type":"boolean","title":"Is Active"},"label_override":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label Override"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","exam_type","magnet_kind","section_key","assessment_id","display_order","is_active","label_override","slug","created_at","updated_at"],"title":"LeadMagnetConfigItem"},"LeadMagnetConfigResponse":{"properties":{"slug":{"type":"string","title":"Slug"},"title":{"type":"string","title":"Title"},"subtitle":{"type":"string","title":"Subtitle"},"description":{"type":"string","title":"Description"},"cta_text":{"type":"string","title":"Cta Text"},"kind":{"type":"string","title":"Kind","default":"test"},"assessment_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assessment Type"},"estimated_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Estimated Time"},"question_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Question Count"},"sections":{"items":{"type":"string"},"type":"array","title":"Sections","default":[]},"features":{"items":{"type":"string"},"type":"array","title":"Features","default":[]},"post_register_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Post Register Path"}},"type":"object","required":["slug","title","subtitle","description","cta_text"],"title":"LeadMagnetConfigResponse","description":"Response schema for lead magnet configuration."},"LeadMagnetConfigUpdate":{"properties":{"assessment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Assessment Id"},"section_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section Key"},"display_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Display Order"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"label_override":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label Override"},"slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Slug"}},"type":"object","title":"LeadMagnetConfigUpdate"},"LeadMagnetInfoResponse":{"properties":{"email_masked":{"type":"string","title":"Email Masked"},"lead_magnet":{"type":"string","title":"Lead Magnet"},"lead_magnet_title":{"type":"string","title":"Lead Magnet Title"},"is_expired":{"type":"boolean","title":"Is Expired"},"is_verified":{"type":"boolean","title":"Is Verified"},"attempts_remaining":{"type":"integer","title":"Attempts Remaining"},"can_resend":{"type":"boolean","title":"Can Resend"},"resend_cooldown_seconds":{"type":"integer","title":"Resend Cooldown Seconds"}},"type":"object","required":["email_masked","lead_magnet","lead_magnet_title","is_expired","is_verified","attempts_remaining","can_resend","resend_cooldown_seconds"],"title":"LeadMagnetInfoResponse","description":"Response schema for registration info (used on verify page)."},"LeadMagnetRegisterRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"name":{"type":"string","title":"Name"},"utm_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Source"},"utm_medium":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Medium"},"utm_campaign":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Campaign"},"utm_term":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Term"},"utm_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Content"},"galv_client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Galv Client Id"},"landing_page":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Landing Page"},"gclid":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Gclid"},"partner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Partner"},"partner_intake":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Partner Intake"}},"type":"object","required":["email","name"],"title":"LeadMagnetRegisterRequest","description":"Request schema for lead magnet registration (Gate 1)."},"LeadMagnetRegisterResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"redirect_token":{"type":"string","title":"Redirect Token"},"message":{"type":"string","title":"Message","default":"Please check your email for the verification code"}},"type":"object","required":["success","redirect_token"],"title":"LeadMagnetRegisterResponse","description":"Response schema for lead magnet registration."},"LeadMagnetResendRequest":{"properties":{"token":{"type":"string","title":"Token"}},"type":"object","required":["token"],"title":"LeadMagnetResendRequest","description":"Request schema for OTP resend."},"LeadMagnetResendResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","message"],"title":"LeadMagnetResendResponse","description":"Response schema for OTP resend."},"LeadMagnetVerifyRequest":{"properties":{"token":{"type":"string","title":"Token"},"otp":{"type":"string","title":"Otp"}},"type":"object","required":["token","otp"],"title":"LeadMagnetVerifyRequest","description":"Request schema for OTP verification."},"LeadMagnetVerifyResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"access_token":{"type":"string","title":"Access Token"},"refresh_token":{"type":"string","title":"Refresh Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"redirect_to":{"type":"string","title":"Redirect To"}},"type":"object","required":["success","access_token","refresh_token","redirect_to"],"title":"LeadMagnetVerifyResponse","description":"Response schema for successful OTP verification."},"LeadTimelineResponse":{"properties":{"attempt_id":{"type":"integer","title":"Attempt Id"},"identity":{"additionalProperties":true,"type":"object","title":"Identity"},"events":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Events"}},"type":"object","required":["attempt_id","identity","events"],"title":"LeadTimelineResponse"},"LessonCompleteResponse":{"properties":{"progress_id":{"type":"integer","title":"Progress Id"},"lesson_id":{"type":"integer","title":"Lesson Id"},"completed_at":{"type":"string","format":"date-time","title":"Completed At"}},"type":"object","required":["progress_id","lesson_id","completed_at"],"title":"LessonCompleteResponse","description":"Response when completing a lesson."},"LessonCreateRequest":{"properties":{"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"module":{"type":"string","title":"Module"},"topic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topic"},"subtopic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtopic"},"skill_node_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Skill Node Id"},"content_type":{"type":"string","title":"Content Type"},"content_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Url"},"content_body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Body"},"slides_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Slides Data"},"duration_minutes":{"type":"integer","title":"Duration Minutes","default":10},"order_index":{"type":"integer","title":"Order Index","default":0},"is_sample":{"type":"boolean","title":"Is Sample","default":false},"is_active":{"type":"boolean","title":"Is Active","default":true}},"type":"object","required":["title","module","content_type"],"title":"LessonCreateRequest"},"LessonDetail":{"properties":{"lesson":{"$ref":"#/components/schemas/LessonFull"},"progress":{"anyOf":[{"$ref":"#/components/schemas/LessonProgressOut"},{"type":"null"}]},"can_access":{"type":"boolean","title":"Can Access","default":true}},"type":"object","required":["lesson"],"title":"LessonDetail","description":"Single lesson with progress."},"LessonFull":{"properties":{"id":{"type":"integer","title":"Id"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"module":{"type":"string","title":"Module"},"topic":{"type":"string","title":"Topic"},"subtopic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtopic"},"content_type":{"type":"string","title":"Content Type"},"duration_minutes":{"type":"integer","title":"Duration Minutes"},"is_sample":{"type":"boolean","title":"Is Sample"},"content_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Url"},"content_body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Body"},"slides_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Slides Data"},"order_index":{"type":"integer","title":"Order Index"}},"type":"object","required":["id","title","module","topic","content_type","duration_minutes","is_sample","order_index"],"title":"LessonFull","description":"Full lesson with content."},"LessonImportRequest":{"properties":{"lessons":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Lessons"},"preview_only":{"type":"boolean","title":"Preview Only","default":false}},"type":"object","required":["lessons"],"title":"LessonImportRequest"},"LessonImportResponse":{"properties":{"imported":{"type":"integer","title":"Imported"},"skipped":{"type":"integer","title":"Skipped"},"errors":{"items":{"type":"string"},"type":"array","title":"Errors"},"preview":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Preview"}},"type":"object","required":["imported","skipped","errors"],"title":"LessonImportResponse"},"LessonList":{"properties":{"lessons":{"items":{"$ref":"#/components/schemas/LessonSummary"},"type":"array","title":"Lessons"},"total":{"type":"integer","title":"Total"},"viewable_count":{"type":"integer","title":"Viewable Count","default":0},"locked_count":{"type":"integer","title":"Locked Count","default":0}},"type":"object","required":["lessons","total"],"title":"LessonList","description":"List of lessons response.\n\n#593: response now exposes a viewable/locked split so free + guest\nsurfaces can render locked lessons with an upgrade CTA instead of\nsilently hiding them. Paid tiers see `locked_count == 0` and a\nflat `lessons` list of all-viewable entries — no behavior change."},"LessonListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/LessonResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"LessonListResponse"},"LessonProgressOut":{"properties":{"id":{"type":"integer","title":"Id"},"lesson_id":{"type":"integer","title":"Lesson Id"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"last_position":{"type":"integer","title":"Last Position","default":0},"slides_completed":{"items":{"type":"integer"},"type":"array","title":"Slides Completed","default":[]}},"type":"object","required":["id","lesson_id"],"title":"LessonProgressOut","description":"User's progress on a lesson."},"LessonPublish":{"properties":{"source_id":{"type":"string","maxLength":255,"title":"Source Id"},"source_version_hash":{"type":"string","title":"Source Version Hash"},"title":{"type":"string","maxLength":200,"minLength":1,"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"module":{"type":"string","title":"Module"},"topic":{"type":"string","maxLength":100,"title":"Topic"},"subtopic":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Subtopic"},"skill_external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Skill External Id"},"content_type":{"type":"string","enum":["video","text","interactive"],"title":"Content Type"},"content_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Url"},"content_body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Body"},"slides_data":{"anyOf":[{},{"type":"null"}],"title":"Slides Data"},"duration_minutes":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Duration Minutes"},"order_index":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Order Index"},"is_sample":{"type":"boolean","title":"Is Sample","default":false}},"additionalProperties":false,"type":"object","required":["source_id","source_version_hash","title","module","topic","content_type"],"title":"LessonPublish"},"LessonPublishResult":{"properties":{"source_id":{"type":"string","title":"Source Id"},"action":{"type":"string","enum":["created","updated","unchanged"],"title":"Action"},"lesson_id":{"type":"integer","title":"Lesson Id"}},"type":"object","required":["source_id","action","lesson_id"],"title":"LessonPublishResult"},"LessonResponse":{"properties":{"id":{"type":"integer","title":"Id"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"module":{"type":"string","title":"Module"},"topic":{"type":"string","title":"Topic"},"subtopic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtopic"},"skill_node_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Skill Node Id"},"skill_node_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Skill Node Title"},"content_type":{"type":"string","title":"Content Type"},"content_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Url"},"content_body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Body"},"slides_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Slides Data"},"duration_minutes":{"type":"integer","title":"Duration Minutes"},"order_index":{"type":"integer","title":"Order Index"},"is_sample":{"type":"boolean","title":"Is Sample"},"is_active":{"type":"boolean","title":"Is Active","default":true}},"type":"object","required":["id","title","description","module","topic","subtopic","content_type","content_url","content_body","slides_data","duration_minutes","order_index","is_sample"],"title":"LessonResponse"},"LessonStartResponse":{"properties":{"progress_id":{"type":"integer","title":"Progress Id"},"lesson_id":{"type":"integer","title":"Lesson Id"},"started_at":{"type":"string","format":"date-time","title":"Started At"}},"type":"object","required":["progress_id","lesson_id","started_at"],"title":"LessonStartResponse","description":"Response when starting a lesson."},"LessonSummary":{"properties":{"id":{"type":"integer","title":"Id"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"module":{"type":"string","title":"Module"},"topic":{"type":"string","title":"Topic"},"subtopic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtopic"},"content_type":{"type":"string","title":"Content Type"},"duration_minutes":{"type":"integer","title":"Duration Minutes"},"is_sample":{"type":"boolean","title":"Is Sample"},"order_index":{"type":"integer","title":"Order Index"},"completed":{"type":"boolean","title":"Completed","default":false},"locked":{"type":"boolean","title":"Locked","default":false},"content_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Url"}},"type":"object","required":["id","title","module","topic","content_type","duration_minutes","is_sample","order_index"],"title":"LessonSummary","description":"Lesson summary for list views (no content)."},"LessonUnpublishResult":{"properties":{"source_id":{"type":"string","title":"Source Id"},"action":{"type":"string","enum":["unpublished","already_unpublished","not_found"],"title":"Action"},"lesson_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lesson Id"}},"type":"object","required":["source_id","action"],"title":"LessonUnpublishResult"},"LessonUpdateRequest":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"module":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Module"},"topic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topic"},"subtopic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtopic"},"skill_node_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Skill Node Id"},"content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Type"},"content_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Url"},"content_body":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Content Body"},"slides_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Slides Data"},"duration_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Minutes"},"order_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order Index"},"is_sample":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Sample"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"LessonUpdateRequest"},"LessonsPublishRequest":{"properties":{"source_system":{"type":"string","title":"Source System"},"dry_run":{"type":"boolean","title":"Dry Run","default":false},"lessons":{"items":{"$ref":"#/components/schemas/LessonPublish"},"type":"array","maxItems":500,"minItems":1,"title":"Lessons"}},"additionalProperties":false,"type":"object","required":["source_system","lessons"],"title":"LessonsPublishRequest"},"LessonsPublishResponse":{"properties":{"dry_run":{"type":"boolean","title":"Dry Run"},"published":{"type":"integer","title":"Published"},"unchanged":{"type":"integer","title":"Unchanged"},"failed":{"type":"integer","title":"Failed"},"results":{"items":{"$ref":"#/components/schemas/LessonPublishResult"},"type":"array","title":"Results"},"errors":{"items":{"$ref":"#/components/schemas/PublishItemError"},"type":"array","title":"Errors"}},"type":"object","required":["dry_run","published","unchanged","failed"],"title":"LessonsPublishResponse"},"LessonsUnpublishRequest":{"properties":{"source_system":{"type":"string","title":"Source System"},"source_ids":{"items":{"type":"string"},"type":"array","maxItems":500,"minItems":1,"title":"Source Ids"},"dry_run":{"type":"boolean","title":"Dry Run","default":false}},"additionalProperties":false,"type":"object","required":["source_system","source_ids"],"title":"LessonsUnpublishRequest"},"LessonsUnpublishResponse":{"properties":{"dry_run":{"type":"boolean","title":"Dry Run"},"unpublished":{"type":"integer","title":"Unpublished"},"results":{"items":{"$ref":"#/components/schemas/LessonUnpublishResult"},"type":"array","title":"Results"}},"type":"object","required":["dry_run","unpublished"],"title":"LessonsUnpublishResponse"},"LevelStat":{"properties":{"level":{"type":"integer","title":"Level"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["level","count"],"title":"LevelStat"},"MagnetSummaryResponse":{"properties":{"items":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Items"},"total_users":{"type":"integer","title":"Total Users"},"total_attributed_users":{"type":"integer","title":"Total Attributed Users"},"excluded_internal":{"type":"integer","title":"Excluded Internal"}},"type":"object","required":["items","total_users","total_attributed_users","excluded_internal"],"title":"MagnetSummaryResponse"},"MarkForReviewRequest":{"properties":{"question_id":{"type":"integer","title":"Question Id"},"marked":{"type":"boolean","title":"Marked"}},"type":"object","required":["question_id","marked"],"title":"MarkForReviewRequest","description":"Lightweight toggle for the \"flag for review\" chip.\n\nDistinct from save-response so the client can flip the flag without\nbeing forced to send a (potentially empty) answer payload. The\nbackend writes into `EngineResponse.question_evaluation.marked_for_review`,\ncreating the response row if it doesn't exist yet."},"MarkForReviewResponse":{"properties":{"message":{"type":"string","title":"Message"},"question_id":{"type":"integer","title":"Question Id"},"marked":{"type":"boolean","title":"Marked"}},"type":"object","required":["message","question_id","marked"],"title":"MarkForReviewResponse"},"MarkedForReviewListResponse":{"properties":{"question_ids":{"items":{"type":"integer"},"type":"array","title":"Question Ids"}},"type":"object","title":"MarkedForReviewListResponse","description":"Hydration payload — list of question ids currently marked for review\nin this attempt. Used on player mount to rehydrate the client set."},"MasteryDeltaItem":{"properties":{"skill_node_id":{"type":"integer","title":"Skill Node Id"},"skill_title":{"type":"string","title":"Skill Title"},"module":{"type":"string","title":"Module"},"before_accuracy":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Before Accuracy"},"after_accuracy":{"type":"number","title":"After Accuracy"},"direction":{"type":"string","title":"Direction"}},"type":"object","required":["skill_node_id","skill_title","module","before_accuracy","after_accuracy","direction"],"title":"MasteryDeltaItem","description":"A single skill's mastery change between two snapshots.\n\ndirection values:\n  - \"up\":   after > before\n  - \"down\": after < before\n  - \"flat\": unchanged\n  - \"new\":  no prior snapshot for this skill"},"MathMistakes":{"properties":{"careless":{"items":{"$ref":"#/components/schemas/MistakeItem"},"type":"array","title":"Careless","default":[]},"concept_gap":{"items":{"$ref":"#/components/schemas/MistakeItem"},"type":"array","title":"Concept Gap","default":[]},"misread":{"items":{"$ref":"#/components/schemas/MistakeItem"},"type":"array","title":"Misread","default":[]},"trap":{"items":{"$ref":"#/components/schemas/MistakeItem"},"type":"array","title":"Trap","default":[]}},"type":"object","title":"MathMistakes","description":"Math section mistake categories."},"MintablePlanItem":{"properties":{"sku":{"type":"string","title":"Sku"},"exam":{"type":"string","title":"Exam"},"exam_name":{"type":"string","title":"Exam Name"},"tier":{"type":"string","title":"Tier"},"display_name":{"type":"string","title":"Display Name"},"price":{"type":"number","title":"Price"},"currency":{"type":"string","title":"Currency"},"bridge_live":{"type":"boolean","title":"Bridge Live","default":true}},"type":"object","required":["sku","exam","exam_name","tier","display_name","price","currency"],"title":"MintablePlanItem","description":"One catalog plan a counselor may mint a link for (#902a).\n\nPrices are the LIVE catalog values at list time — informational only.\nA minted link never locks a price; redemption re-resolves the catalog."},"MintablePlansResponse":{"properties":{"plans":{"items":{"$ref":"#/components/schemas/MintablePlanItem"},"type":"array","title":"Plans"},"default_ttl_hours":{"type":"integer","title":"Default Ttl Hours"},"max_ttl_hours":{"type":"integer","title":"Max Ttl Hours"}},"type":"object","required":["plans","default_ttl_hours","max_ttl_hours"],"title":"MintablePlansResponse"},"MistakeBreakdown":{"properties":{"math":{"$ref":"#/components/schemas/MathMistakes"},"rw":{"$ref":"#/components/schemas/RWMistakes"}},"type":"object","required":["math","rw"],"title":"MistakeBreakdown","description":"Complete mistake breakdown by section."},"MistakeItem":{"properties":{"q_id":{"type":"integer","title":"Q Id"},"topic":{"type":"string","title":"Topic"},"detail":{"type":"string","title":"Detail","default":""}},"type":"object","required":["q_id","topic"],"title":"MistakeItem","description":"Single mistake entry with details."},"MobileLeadSubmissionResponse":{"properties":{"status":{"type":"string","title":"Status","default":"captured"},"id":{"type":"integer","title":"Id"}},"type":"object","required":["id"],"title":"MobileLeadSubmissionResponse","description":"Minimal 200 ack for the vocab client (#794).\n\nThe Cordova client only deletes its queued `GQ-<ts>` item on HTTP success,\nso any 200 body works; we return the captured id for traceability."},"MockReportAssessment":{"properties":{"name":{"type":"string","title":"Name"},"label":{"type":"string","title":"Label"},"mock_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mock Number"},"is_diagnostic":{"type":"boolean","title":"Is Diagnostic"},"date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date"}},"type":"object","required":["name","label","mock_number","is_diagnostic","date"],"title":"MockReportAssessment"},"MockReportDomainAccuracy":{"properties":{"domain":{"type":"string","title":"Domain"},"accuracy":{"type":"integer","title":"Accuracy"}},"type":"object","required":["domain","accuracy"],"title":"MockReportDomainAccuracy"},"MockReportDomainImprovement":{"properties":{"domain":{"type":"string","title":"Domain"},"previous":{"type":"integer","title":"Previous"},"current":{"type":"integer","title":"Current"},"change":{"type":"integer","title":"Change"}},"type":"object","required":["domain","previous","current","change"],"title":"MockReportDomainImprovement"},"MockReportHighlightDomain":{"properties":{"domain":{"type":"string","title":"Domain"},"accuracy":{"type":"integer","title":"Accuracy"},"section":{"type":"string","title":"Section"}},"type":"object","required":["domain","accuracy","section"],"title":"MockReportHighlightDomain"},"MockReportHighlights":{"properties":{"strongest":{"items":{"$ref":"#/components/schemas/MockReportHighlightDomain"},"type":"array","title":"Strongest"},"focus":{"items":{"$ref":"#/components/schemas/MockReportHighlightDomain"},"type":"array","title":"Focus"},"summary":{"type":"string","title":"Summary"}},"type":"object","required":["strongest","focus","summary"],"title":"MockReportHighlights"},"MockReportPerformance":{"properties":{"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total"},"math":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Math"},"rw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rw"}},"type":"object","required":["total","math","rw"],"title":"MockReportPerformance"},"MockReportProgress":{"properties":{"since_previous_mock":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Since Previous Mock"},"since_diagnostic":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Since Diagnostic"}},"type":"object","required":["since_previous_mock","since_diagnostic"],"title":"MockReportProgress"},"MockReportRecommendedFocus":{"properties":{"math":{"items":{"type":"string"},"type":"array","title":"Math"},"rw":{"items":{"type":"string"},"type":"array","title":"Rw"},"summary":{"type":"string","title":"Summary"}},"type":"object","required":["math","rw","summary"],"title":"MockReportRecommendedFocus"},"MockReportResponse":{"properties":{"attempt_id":{"type":"integer","title":"Attempt Id"},"assessment":{"$ref":"#/components/schemas/MockReportAssessment"},"current_performance":{"$ref":"#/components/schemas/MockReportPerformance"},"score_progress":{"$ref":"#/components/schemas/MockReportProgress"},"domain_accuracy":{"$ref":"#/components/schemas/MockReportSectionDomains"},"domain_improvement":{"anyOf":[{"$ref":"#/components/schemas/MockReportSectionImprovement"},{"type":"null"}]},"highlights":{"$ref":"#/components/schemas/MockReportHighlights"},"recommended_focus":{"$ref":"#/components/schemas/MockReportRecommendedFocus"}},"type":"object","required":["attempt_id","assessment","current_performance","score_progress","domain_accuracy","domain_improvement","highlights","recommended_focus"],"title":"MockReportResponse"},"MockReportSectionDomains":{"properties":{"math":{"items":{"$ref":"#/components/schemas/MockReportDomainAccuracy"},"type":"array","title":"Math"},"rw":{"items":{"$ref":"#/components/schemas/MockReportDomainAccuracy"},"type":"array","title":"Rw"}},"type":"object","required":["math","rw"],"title":"MockReportSectionDomains"},"MockReportSectionImprovement":{"properties":{"math":{"items":{"$ref":"#/components/schemas/MockReportDomainImprovement"},"type":"array","title":"Math"},"rw":{"items":{"$ref":"#/components/schemas/MockReportDomainImprovement"},"type":"array","title":"Rw"}},"type":"object","required":["math","rw"],"title":"MockReportSectionImprovement"},"MockTaskResultsResponse":{"properties":{"task_id":{"type":"integer","title":"Task Id"},"session_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Title"},"mock_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mock Title"},"question_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Question Count"},"students":{"items":{"$ref":"#/components/schemas/MockTaskStudentRow"},"type":"array","title":"Students"}},"type":"object","required":["task_id","students"],"title":"MockTaskResultsResponse","description":"Batch (per-assignment) mock results across a cohort — the instructor roster\nfor a mock_test task. Each completed student links to their own\nquestion-by-question review (which reuses the internal attempt-results\nendpoint). Every student takes the SAME mock, but this stays a per-student\nroster (status/score/accuracy) to match the drill-results UX."},"MockTaskStudentRow":{"properties":{"student_id":{"type":"integer","title":"Student Id"},"student_name":{"type":"string","title":"Student Name"},"status":{"type":"string","title":"Status"},"score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Score"},"accuracy":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Accuracy"},"attempt_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Attempt Id"}},"type":"object","required":["student_id","student_name","status"],"title":"MockTaskStudentRow","description":"One active student's result on a mock-test assignment."},"MockTestSummary":{"properties":{"tests_completed":{"type":"integer","title":"Tests Completed","default":0},"tests_available":{"type":"integer","title":"Tests Available","default":0},"latest_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latest Score"},"latest_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Latest Date"},"has_pending_feedback":{"type":"boolean","title":"Has Pending Feedback","default":false}},"type":"object","title":"MockTestSummary","description":"Mock test history summary."},"MySessionsResponse":{"properties":{"upcoming":{"items":{"$ref":"#/components/schemas/FeedbackSessionResponse"},"type":"array","title":"Upcoming"},"past":{"items":{"$ref":"#/components/schemas/FeedbackSessionResponse"},"type":"array","title":"Past"}},"type":"object","required":["upcoming","past"],"title":"MySessionsResponse"},"MySponsorInterests":{"properties":{"partner_slugs":{"items":{"type":"string"},"type":"array","title":"Partner Slugs"}},"type":"object","required":["partner_slugs"],"title":"MySponsorInterests"},"NextActionItem":{"properties":{"title":{"type":"string","title":"Title"},"url":{"type":"string","title":"Url"},"kind":{"type":"string","enum":["diagnostic","task","mock","rest_day"],"title":"Kind"},"est_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Est Minutes"}},"type":"object","required":["title","url","kind"],"title":"NextActionItem","description":"Pick-up panel — the one action the user should do next."},"OfflineGrantBlocking":{"properties":{"package_id":{"type":"integer","title":"Package Id"},"display_name":{"type":"string","title":"Display Name"},"same_plan":{"type":"boolean","title":"Same Plan"}},"type":"object","required":["package_id","display_name","same_plan"],"title":"OfflineGrantBlocking"},"OfflineGrantPreview":{"properties":{"user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Id"},"email":{"type":"string","title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"effect":{"type":"string","enum":["fresh","upgrade","blocked"],"title":"Effect"},"blocking":{"anyOf":[{"$ref":"#/components/schemas/OfflineGrantBlocking"},{"type":"null"}]},"is_new_user":{"type":"boolean","title":"Is New User","default":false}},"type":"object","required":["email","name","effect"],"title":"OfflineGrantPreview"},"OfflineGrantRequest":{"properties":{"user_email":{"type":"string","maxLength":255,"minLength":3,"title":"User Email"},"item_type":{"type":"string","enum":["package","addon"],"title":"Item Type"},"item_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Item Id","description":"Package id for item_type=package"},"addon_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Addon Id","description":"Addon SKU for item_type=addon"},"exam_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exam Slug","description":"Required for item_type=addon"},"method":{"type":"string","enum":["net_banking","bank_transfer","cash","cheque","comp","b2b_partner_paid","b2b_partner_free"],"title":"Method"},"amount":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d{0,2}0*$"}],"title":"Amount"},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency"},"idempotency_key":{"type":"string","maxLength":80,"minLength":1,"title":"Idempotency Key"},"reference":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Reference"},"notes":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Notes"},"override_existing":{"type":"boolean","title":"Override Existing","default":false},"override_reason":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Override Reason"}},"type":"object","required":["user_email","item_type","method","amount","currency","idempotency_key"],"title":"OfflineGrantRequest","description":"Record an offline payment / comp and grant access. Single item per call."},"OfflineLedgerPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/OfflinePaymentView"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["items","total","page","page_size"],"title":"OfflineLedgerPage"},"OfflinePaymentView":{"properties":{"id":{"type":"integer","title":"Id"},"user_id":{"type":"integer","title":"User Id"},"user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Email"},"item_type":{"type":"string","title":"Item Type"},"item_id":{"type":"integer","title":"Item Id"},"offline_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Offline Method"},"price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Price"},"currency":{"type":"string","title":"Currency"},"status":{"type":"string","title":"Status"},"offline_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Offline Reference"},"offline_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Offline Notes"},"granted_by_internal_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Granted By Internal User Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"paid_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paid At"}},"type":"object","required":["id","user_id","item_type","item_id","offline_method","price","currency","status","offline_reference","offline_notes","granted_by_internal_user_id","created_at","paid_at"],"title":"OfflinePaymentView","description":"One offline-grant ledger row."},"OfflineReversalRequest":{"properties":{"reason":{"type":"string","maxLength":500,"minLength":1,"title":"Reason"}},"type":"object","required":["reason"],"title":"OfflineReversalRequest"},"OlympiadAwardResponse":{"properties":{"partner_slug":{"type":"string","title":"Partner Slug"},"partner_name":{"type":"string","title":"Partner Name"},"award_key":{"type":"string","title":"Award Key"},"label":{"type":"string","title":"Label"},"kind":{"type":"string","title":"Kind"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"},"claimed":{"type":"boolean","title":"Claimed","default":false}},"type":"object","required":["partner_slug","partner_name","award_key","label","kind"],"title":"OlympiadAwardResponse"},"OlympiadAwardsResponse":{"properties":{"attempt_id":{"type":"integer","title":"Attempt Id"},"total_score":{"type":"integer","title":"Total Score"},"rank":{"type":"integer","title":"Rank"},"cohort_size":{"type":"integer","title":"Cohort Size"},"awards":{"items":{"$ref":"#/components/schemas/OlympiadAwardResponse"},"type":"array","title":"Awards"},"claims":{"items":{"$ref":"#/components/schemas/OlympiadClaimResponse"},"type":"array","title":"Claims"}},"type":"object","required":["attempt_id","total_score","rank","cohort_size","awards","claims"],"title":"OlympiadAwardsResponse"},"OlympiadCertificateResponse":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"OlympiadCertificateResponse"},"OlympiadClaimCreate":{"properties":{"partner_slug":{"type":"string","maxLength":50,"minLength":1,"title":"Partner Slug"},"award_key":{"type":"string","maxLength":50,"minLength":1,"title":"Award Key"},"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name"},"email":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Email"},"secondary_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Secondary Email"},"mobile":{"type":"string","maxLength":32,"minLength":6,"title":"Mobile"},"graduation_year":{"anyOf":[{"type":"integer","maximum":2040.0,"minimum":2020.0},{"type":"null"}],"title":"Graduation Year"},"target_countries":{"items":{"type":"string"},"type":"array","maxItems":12,"minItems":1,"title":"Target Countries"},"advisor_session_at":{"type":"string","format":"date-time","title":"Advisor Session At"},"terms_accepted":{"type":"boolean","title":"Terms Accepted"},"terms_version":{"type":"string","maxLength":40,"title":"Terms Version","default":"2026-09-18"}},"type":"object","required":["partner_slug","award_key","name","mobile","target_countries","advisor_session_at","terms_accepted"],"title":"OlympiadClaimCreate"},"OlympiadClaimCreated":{"properties":{"status":{"type":"string","title":"Status"},"claim":{"$ref":"#/components/schemas/OlympiadClaimResponse"}},"type":"object","required":["status","claim"],"title":"OlympiadClaimCreated"},"OlympiadClaimResponse":{"properties":{"id":{"type":"integer","title":"Id"},"partner_slug":{"type":"string","title":"Partner Slug"},"award_key":{"type":"string","title":"Award Key"},"award_label":{"type":"string","title":"Award Label"},"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"},"secondary_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secondary Email"},"mobile":{"type":"string","title":"Mobile"},"graduation_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Graduation Year"},"target_countries":{"items":{"type":"string"},"type":"array","title":"Target Countries"},"advisor_session_at":{"type":"string","format":"date-time","title":"Advisor Session At"},"terms_version":{"type":"string","title":"Terms Version"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","partner_slug","award_key","award_label","name","email","mobile","target_countries","advisor_session_at","terms_version","created_at"],"title":"OlympiadClaimResponse"},"OlympiadDifficultyResultResponse":{"properties":{"difficulty":{"type":"string","title":"Difficulty"},"correct":{"type":"integer","title":"Correct"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["difficulty","correct","total"],"title":"OlympiadDifficultyResultResponse"},"OlympiadEventItem":{"properties":{"id":{"type":"integer","title":"Id"},"slug":{"type":"string","title":"Slug"},"exam":{"type":"string","title":"Exam"},"display_name":{"type":"string","title":"Display Name"},"default_currency":{"type":"string","title":"Default Currency"},"is_active":{"type":"boolean","title":"Is Active"}},"type":"object","required":["id","slug","exam","display_name","default_currency","is_active"],"title":"OlympiadEventItem"},"OlympiadExamStatus":{"properties":{"has_attempt":{"type":"boolean","title":"Has Attempt"},"attempt_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Attempt Id"},"assessment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Assessment Id"},"assessment_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assessment Name"},"is_submitted":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Submitted"},"is_result_published":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Result Published"},"is_grading_complete":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Grading Complete"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"}},"type":"object","required":["has_attempt"],"title":"OlympiadExamStatus"},"OlympiadInterestRequest":{"properties":{"answers":{"additionalProperties":true,"type":"object","title":"Answers"},"consent_given":{"type":"boolean","title":"Consent Given","default":false}},"type":"object","title":"OlympiadInterestRequest"},"OlympiadInterestResponse":{"properties":{"status":{"type":"string","enum":["created","updated"],"title":"Status"},"submission_id":{"type":"integer","title":"Submission Id"},"offer_id":{"type":"integer","title":"Offer Id"},"routing":{"type":"string","title":"Routing"}},"type":"object","required":["status","submission_id","offer_id","routing"],"title":"OlympiadInterestResponse"},"OlympiadObservationResponse":{"properties":{"kind":{"type":"string","title":"Kind"},"text":{"type":"string","title":"Text"}},"type":"object","required":["kind","text"],"title":"OlympiadObservationResponse"},"OlympiadPacingResponse":{"properties":{"seconds_spent":{"type":"integer","title":"Seconds Spent"},"avg_seconds_per_question":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Avg Seconds Per Question"},"rushed":{"type":"integer","title":"Rushed"},"overtime":{"type":"integer","title":"Overtime"},"unanswered":{"type":"integer","title":"Unanswered"}},"type":"object","required":["seconds_spent","avg_seconds_per_question","rushed","overtime","unanswered"],"title":"OlympiadPacingResponse"},"OlympiadPricingTierCreate":{"properties":{"tier_slug":{"type":"string","minLength":1,"title":"Tier Slug"},"region":{"type":"string","title":"Region"},"amount":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Amount"},"currency":{"type":"string","maxLength":3,"minLength":3,"title":"Currency"},"is_active":{"type":"boolean","title":"Is Active","default":true}},"type":"object","required":["tier_slug","region","amount","currency"],"title":"OlympiadPricingTierCreate"},"OlympiadPricingTierItem":{"properties":{"id":{"type":"integer","title":"Id"},"olympiad_event_id":{"type":"integer","title":"Olympiad Event Id"},"tier_slug":{"type":"string","title":"Tier Slug"},"region":{"type":"string","title":"Region"},"amount":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Amount"},"currency":{"type":"string","title":"Currency"},"is_active":{"type":"boolean","title":"Is Active"}},"type":"object","required":["id","olympiad_event_id","tier_slug","region","amount","currency","is_active"],"title":"OlympiadPricingTierItem"},"OlympiadPricingTierUpdate":{"properties":{"amount":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Amount"},"currency":{"anyOf":[{"type":"string","maxLength":3,"minLength":3},{"type":"null"}],"title":"Currency"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"additionalProperties":false,"type":"object","title":"OlympiadPricingTierUpdate","description":"Partial update — amount / currency / is_active only. tier_slug + region\nare the resolver key (immutable)."},"OlympiadQuestionResultResponse":{"properties":{"number":{"type":"integer","title":"Number"},"section_title":{"type":"string","title":"Section Title"},"topic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topic"},"difficulty":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Difficulty"},"question_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Question Type"},"passage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Passage"},"stem":{"type":"string","title":"Stem"},"options":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Options"},"your_answer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Your Answer"},"correct_answer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Correct Answer"},"is_correct":{"type":"boolean","title":"Is Correct"},"explanation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Explanation"},"time_spent_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Time Spent Seconds"},"pace":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pace"}},"type":"object","required":["number","section_title","topic","difficulty","question_type","passage","stem","options","your_answer","correct_answer","is_correct","explanation","time_spent_seconds","pace"],"title":"OlympiadQuestionResultResponse"},"OlympiadRegistrationRequest":{"properties":{"olympiad_slug":{"type":"string","maxLength":100,"minLength":1,"title":"Olympiad Slug"},"tier_slug":{"type":"string","maxLength":50,"title":"Tier Slug","default":"default"},"registrant_type":{"type":"string","enum":["individual","school"],"title":"Registrant Type"},"submission_uuid":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Submission Uuid"},"payment_mode":{"type":"string","enum":["link","inline"],"title":"Payment Mode","default":"link"},"payload":{"additionalProperties":true,"type":"object","title":"Payload"},"attribution":{"additionalProperties":true,"type":"object","title":"Attribution"}},"type":"object","required":["olympiad_slug","registrant_type"],"title":"OlympiadRegistrationRequest"},"OlympiadRegistrationResponse":{"properties":{"status":{"type":"string","enum":["created","exists"],"title":"Status"},"registration_id":{"type":"integer","title":"Registration Id"},"payment_status":{"type":"string","title":"Payment Status"},"payment_link_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Link Url"},"checkout":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Checkout"}},"type":"object","required":["status","registration_id","payment_status"],"title":"OlympiadRegistrationResponse"},"OlympiadResultResponse":{"properties":{"attempt_id":{"type":"integer","title":"Attempt Id"},"submitted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Submitted At"},"total_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Score"},"sections":{"items":{"$ref":"#/components/schemas/OlympiadSectionResultResponse"},"type":"array","title":"Sections"},"questions_total":{"type":"integer","title":"Questions Total"},"questions_answered":{"type":"integer","title":"Questions Answered"},"questions":{"items":{"$ref":"#/components/schemas/OlympiadQuestionResultResponse"},"type":"array","title":"Questions"},"pacing":{"$ref":"#/components/schemas/OlympiadPacingResponse"},"by_difficulty":{"items":{"$ref":"#/components/schemas/OlympiadDifficultyResultResponse"},"type":"array","title":"By Difficulty"},"topics":{"items":{"$ref":"#/components/schemas/OlympiadTopicResultResponse"},"type":"array","title":"Topics"},"observations":{"items":{"$ref":"#/components/schemas/OlympiadObservationResponse"},"type":"array","title":"Observations"}},"type":"object","required":["attempt_id","submitted_at","total_score","sections","questions_total","questions_answered","questions","pacing","by_difficulty","topics","observations"],"title":"OlympiadResultResponse"},"OlympiadResumeResponse":{"properties":{"status":{"type":"string","enum":["resumable","paid","not_applicable","not_found"],"title":"Status"},"payment_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment Status"},"checkout":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Checkout"}},"type":"object","required":["status"],"title":"OlympiadResumeResponse"},"OlympiadSectionResultResponse":{"properties":{"title":{"type":"string","title":"Title"},"scaled_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Scaled Score"},"correct":{"type":"integer","title":"Correct"},"total":{"type":"integer","title":"Total"},"seconds_spent":{"type":"integer","title":"Seconds Spent"},"seconds_allowed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seconds Allowed"}},"type":"object","required":["title","scaled_score","correct","total","seconds_spent","seconds_allowed"],"title":"OlympiadSectionResultResponse"},"OlympiadStartResponse":{"properties":{"assessment_id":{"type":"integer","title":"Assessment Id"},"title":{"type":"string","title":"Title"},"resumed":{"type":"boolean","title":"Resumed"}},"type":"object","required":["assessment_id","title","resumed"],"title":"OlympiadStartResponse"},"OlympiadTopicResultResponse":{"properties":{"topic":{"type":"string","title":"Topic"},"correct":{"type":"integer","title":"Correct"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["topic","correct","total"],"title":"OlympiadTopicResultResponse"},"OrderHistoryResponse":{"properties":{"id":{"type":"integer","title":"Id"},"gateway":{"type":"string","title":"Gateway"},"gateway_order_id":{"type":"string","title":"Gateway Order Id"},"gateway_payment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gateway Payment Id"},"package_name":{"type":"string","title":"Package Name"},"package_tier":{"type":"string","title":"Package Tier"},"amount_cents":{"type":"integer","title":"Amount Cents"},"currency":{"type":"string","title":"Currency"},"status":{"type":"string","title":"Status"},"item_type":{"type":"string","title":"Item Type"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"paid_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paid At"}},"type":"object","required":["id","gateway","gateway_order_id","package_name","package_tier","amount_cents","currency","status","item_type","created_at","paid_at"],"title":"OrderHistoryResponse","description":"Purchase order history item — reads from the Payment v1 orders table.\n\nShape kept compatible with the admin UI; `amount_cents` is computed from\nthe Decimal `price` for backward compatibility with the current frontend."},"OrderStatusResponse":{"properties":{"state":{"type":"string","enum":["verifying","provisioning","success","failed","refunded"],"title":"State"},"exam":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exam"},"redirect_url":{"type":"string","title":"Redirect Url"},"order_reference":{"type":"string","title":"Order Reference"},"item_type":{"type":"string","title":"Item Type"},"plan_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Name"},"grants_study_plan":{"type":"boolean","title":"Grants Study Plan","default":false}},"type":"object","required":["state","exam","redirect_url","order_reference","item_type"],"title":"OrderStatusResponse","description":"Derived order status for the post-payment processing page poll (#855p).\n\nDeliberately PII-free and internals-free: no amounts, no gateway ids, no\nuser fields — the page polls this every 2s and the payload may end up in\nlogs / analytics breadcrumbs.\n\nstate:\n    verifying    — gateway hasn't confirmed the payment yet\n    provisioning — paid, access being set up (nova fulfillment pending or\n                   external ledger row not yet external_fulfilled)\n    success      — paid + fulfilled; frontend redirects to redirect_url\n    failed       — payment failed before capture (nothing charged)\n    refunded     — order was refunded / access revoked"},"OutstandingItem":{"properties":{"type":{"type":"string","title":"Type"},"session_title":{"type":"string","title":"Session Title"},"status":{"type":"string","title":"Status","default":"overdue"}},"type":"object","required":["type","session_title"],"title":"OutstandingItem"},"PackageBookingOptions":{"properties":{"package_id":{"type":"integer","title":"Package Id"},"status":{"type":"string","title":"Status"},"booking_deadline":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Booking Deadline"},"expired":{"type":"boolean","title":"Expired"},"review_pending":{"type":"boolean","title":"Review Pending","default":false},"math":{"$ref":"#/components/schemas/SubjectBookingOptions"},"rw":{"$ref":"#/components/schemas/SubjectBookingOptions"}},"type":"object","required":["package_id","status","expired","math","rw"],"title":"PackageBookingOptions","description":"Per-subject booking options for a package."},"PackageCatalogUpdate":{"properties":{"display_name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Display Name"},"tagline":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Tagline"},"sku":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Sku"},"price":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Price"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency","description":"ISO 4217 code (normalized to uppercase)"},"pricing_by_country":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/StrictCountryPricing"},"type":"object"},{"type":"null"}],"title":"Pricing By Country","description":"Replaces the whole override map. Keys: UPPERCASE ISO 3166-1 alpha-2 or 'DEFAULT'."},"india_listed_price":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"India Listed Price"},"india_net_price":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"India Net Price"},"india_tax_applicable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"India Tax Applicable"},"india_tax_pct":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"India Tax Pct"},"intl_listed_price":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Intl Listed Price"},"intl_net_price":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Intl Net Price"},"intl_tax_applicable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Intl Tax Applicable"},"intl_tax_pct":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Intl Tax Pct"},"feature_limits":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"integer"}]},"type":"object"},{"type":"null"}],"title":"Feature Limits"},"validity_days":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Validity Days"},"listed_publicly":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Listed Publicly","description":"Show this package on public pricing pages. False keeps it purchasable via counselor checkout links only."}},"additionalProperties":false,"type":"object","title":"PackageCatalogUpdate","description":"Design-scope edits for the #855/#902 Pricing & Packages catalog tab.\n\nDeliberately narrow: no is_active, no entitlements, no sellable flag —\nstate changes go through their own deliberate paths. extra='forbid' so\nan attempt to smuggle sellable_in_nova / fulfillment_handler /\nis_active through this endpoint fails loudly instead of silently\nno-oping. listed_publicly IS editable here (#902): hiding a package\nfrom the public pricing pages is a display decision, not a launch\ngate — it stays purchasable via counselor links."},"PackageReadiness":{"properties":{"checkout":{"type":"boolean","title":"Checkout"},"entitlement":{"type":"boolean","title":"Entitlement"},"dashboard":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Dashboard"},"welcome_email":{"type":"boolean","title":"Welcome Email"},"launch":{"type":"boolean","title":"Launch"},"sku_mapped":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Sku Mapped"},"ready":{"type":"boolean","title":"Ready"},"blocking":{"items":{"type":"string"},"type":"array","title":"Blocking"}},"type":"object","required":["checkout","entitlement","welcome_email","launch","ready"],"title":"PackageReadiness","description":"#855d / #979 launch-readiness matrix for one package.\n\nEach gate is a REAL signal (see package_readiness_service). The\napplicable gate set depends on fulfillment_handler: `dashboard` is\nnull for dmango_bridge packages (Dmango delivers content), and\n`sku_mapped` is null for nova packages. `ready` is the AND of the\nAPPLICABLE (non-null) gates; `blocking` lists the failing applicable\ngate keys in display order. The chips are advisory — the UI allows a\nconfirm-to-override flip when not ready."},"PackageResponse":{"properties":{"id":{"type":"integer","title":"Id"},"exam_id":{"type":"integer","title":"Exam Id"},"exam_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exam Slug"},"tier":{"type":"string","title":"Tier"},"sku":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sku"},"display_name":{"type":"string","title":"Display Name"},"tagline":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tagline"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"price":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Price"},"currency":{"type":"string","title":"Currency"},"pricing_by_country":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Pricing By Country"},"india_listed_price":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"India Listed Price"},"india_net_price":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"India Net Price"},"india_tax_applicable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"India Tax Applicable"},"india_tax_pct":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"India Tax Pct"},"intl_listed_price":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Intl Listed Price"},"intl_net_price":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Intl Net Price"},"intl_tax_applicable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Intl Tax Applicable"},"intl_tax_pct":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Intl Tax Pct"},"validity_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Validity Days"},"is_active":{"type":"boolean","title":"Is Active"},"sellable_in_nova":{"type":"boolean","title":"Sellable In Nova"},"fulfillment_handler":{"type":"string","title":"Fulfillment Handler"},"listed_publicly":{"type":"boolean","title":"Listed Publicly"},"launch_cleared":{"type":"boolean","title":"Launch Cleared"},"feature_limits":{"additionalProperties":true,"type":"object","title":"Feature Limits"},"readiness":{"anyOf":[{"$ref":"#/components/schemas/PackageReadiness"},{"type":"null"}]}},"type":"object","required":["id","exam_id","tier","display_name","description","price","currency","pricing_by_country","validity_days","is_active","sellable_in_nova","fulfillment_handler","listed_publicly","launch_cleared"],"title":"PackageResponse"},"ParentInfo":{"properties":{"name":{"type":"string","title":"Name"},"email":{"type":"string","format":"email","title":"Email"},"phone_country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Country Code"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"}},"type":"object","required":["name","email"],"title":"ParentInfo","description":"Parent information for student accounts."},"PartnerPostTestStatusResponse":{"properties":{"submitted":{"type":"boolean","title":"Submitted"},"answers":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Answers"}},"type":"object","required":["submitted"],"title":"PartnerPostTestStatusResponse","description":"Whether the post-test for an attempt is on file (the reveal gate reads this)."},"PartnerPostTestSubmitRequest":{"properties":{"attempt_source":{"type":"string","enum":["engine","legacy"],"title":"Attempt Source"},"attempt_id":{"type":"integer","title":"Attempt Id"},"exam":{"type":"string","enum":["ielts","sat","gre"],"title":"Exam"},"answers":{"additionalProperties":true,"type":"object","title":"Answers"}},"type":"object","required":["attempt_source","attempt_id","exam","answers"],"title":"PartnerPostTestSubmitRequest"},"PasswordSetupRequest":{"properties":{"password":{"type":"string","title":"Password"}},"type":"object","required":["password"],"title":"PasswordSetupRequest","description":"Set a password on an OTP-only account.\n\nReuses `validate_password_complexity` so the rules match the\nsignup + reset paths exactly."},"PasswordSetupResponse":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"PasswordSetupResponse","description":"Response after password set."},"PaymentGatewayCredentialItem":{"properties":{"gateway":{"type":"string","title":"Gateway"},"label":{"type":"string","title":"Label"},"configured":{"type":"boolean","title":"Configured"},"reason":{"type":"string","title":"Reason","description":"Why it is not configured. Empty when it is. Never contains a secret."}},"type":"object","required":["gateway","label","configured","reason"],"title":"PaymentGatewayCredentialItem"},"PaymentGatewaySwitchChangeItem":{"properties":{"gateway":{"type":"string","title":"Gateway"},"gateway_label":{"type":"string","title":"Gateway Label"},"feature":{"type":"string","title":"Feature"},"feature_label":{"type":"string","title":"Feature Label"},"old_state":{"type":"string","title":"Old State"},"new_state":{"type":"string","title":"New State"},"changed_by_email":{"type":"string","title":"Changed By Email"},"changed_at":{"type":"string","format":"date-time","title":"Changed At"}},"type":"object","required":["gateway","gateway_label","feature","feature_label","old_state","new_state","changed_by_email","changed_at"],"title":"PaymentGatewaySwitchChangeItem"},"PaymentGatewaySwitchItem":{"properties":{"gateway":{"type":"string","title":"Gateway"},"gateway_label":{"type":"string","title":"Gateway Label"},"region":{"type":"string","title":"Region"},"feature":{"type":"string","title":"Feature"},"feature_label":{"type":"string","title":"Feature Label"},"state":{"type":"string","enum":["off","staff_only","on"],"title":"State"},"origin":{"type":"string","title":"Origin","description":"'setting' when a saved row decides, 'default' when the environment flag does"}},"type":"object","required":["gateway","gateway_label","region","feature","feature_label","state","origin"],"title":"PaymentGatewaySwitchItem","description":"One switch: a gateway for a feature."},"PaymentGatewaySwitchUpdate":{"properties":{"gateway":{"type":"string","maxLength":32,"minLength":1,"title":"Gateway","description":"paypal | easebuzz"},"feature":{"type":"string","maxLength":32,"minLength":1,"title":"Feature","description":"package | extension | addon | grading_unlock"},"state":{"type":"string","enum":["off","staff_only","on"],"title":"State"}},"type":"object","required":["gateway","feature","state"],"title":"PaymentGatewaySwitchUpdate"},"PaymentGatewaySwitchesResponse":{"properties":{"switches":{"items":{"$ref":"#/components/schemas/PaymentGatewaySwitchItem"},"type":"array","title":"Switches"},"credentials":{"items":{"$ref":"#/components/schemas/PaymentGatewayCredentialItem"},"type":"array","title":"Credentials"},"states":{"items":{"type":"string"},"type":"array","title":"States"},"recent_changes":{"items":{"$ref":"#/components/schemas/PaymentGatewaySwitchChangeItem"},"type":"array","title":"Recent Changes"}},"type":"object","required":["switches","credentials","states","recent_changes"],"title":"PaymentGatewaySwitchesResponse"},"PaymentHistoryResponse":{"properties":{"orders":{"items":{"$ref":"#/components/schemas/PaymentOrderResponse"},"type":"array","title":"Orders"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["orders","total"],"title":"PaymentHistoryResponse"},"PaymentOrderResponse":{"properties":{"id":{"type":"integer","title":"Id"},"user_id":{"type":"integer","title":"User Id"},"price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Price"},"currency":{"type":"string","title":"Currency"},"gateway":{"type":"string","title":"Gateway"},"gateway_order_id":{"type":"string","title":"Gateway Order Id"},"gateway_payment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gateway Payment Id"},"status":{"type":"string","title":"Status"},"paid_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Paid At"},"failure_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Failure Reason"},"item_type":{"type":"string","title":"Item Type"},"item_id":{"type":"integer","title":"Item Id"},"fulfillment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fulfillment Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"days_added":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days Added"},"new_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"New Expires At"}},"type":"object","required":["id","user_id","price","currency","gateway","gateway_order_id","gateway_payment_id","status","paid_at","failure_reason","item_type","item_id","fulfillment_id","created_at"],"title":"PaymentOrderResponse","description":"A PaymentOrder row as returned by verify / history endpoints.\n\nFor `item_type=\"extension\"` successfully-fulfilled orders, the verify\nendpoint also sets `days_added` and `new_expires_at` so the frontend\ncan render the inline success banner without a second round-trip.\n`/history` leaves both None."},"PendingAction":{"properties":{"session_id":{"type":"integer","title":"Session Id"},"activity":{"type":"string","title":"Activity"},"session_type":{"type":"string","title":"Session Type"},"session_date":{"type":"string","title":"Session Date"}},"type":"object","required":["session_id","activity","session_type","session_date"],"title":"PendingAction"},"PendingFeedback":{"properties":{"cohort_id":{"type":"integer","title":"Cohort Id"},"cycle":{"type":"integer","title":"Cycle"},"form":{"additionalProperties":true,"type":"object","title":"Form"}},"type":"object","required":["cohort_id","cycle","form"],"title":"PendingFeedback","description":"Biweekly program-feedback form due for this student (#961). Present on\n/home only when a cycle is due; carries the form definition so the modal\nrenders without a second fetch."},"PendingFulfillmentPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/FulfillmentLedgerEntryView"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"page_size":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Page Size"}},"type":"object","required":["items","total","page","page_size"],"title":"PendingFulfillmentPage","description":"Paginated page of orders awaiting fulfillment (pending + failed)."},"PendingTasksWeek":{"properties":{"week_index":{"type":"integer","title":"Week Index"},"week_start":{"type":"string","format":"date","title":"Week Start"},"week_end":{"type":"string","format":"date","title":"Week End"},"sessions":{"items":{"$ref":"#/components/schemas/SessionResponse"},"type":"array","title":"Sessions"},"tasks":{"items":{"$ref":"#/components/schemas/ClassroomTaskResponse"},"type":"array","title":"Tasks"}},"type":"object","required":["week_index","week_start","week_end","sessions","tasks"],"title":"PendingTasksWeek","description":"One week bucket of pending classroom work for the SAT home (#1173).\n\nHome now shows the full pending backlog in the same cohort-relative week\norder as the segment view, rather than a compact current-window snapshot.\n`sessions` is the subset of sessions in that week that still have pending\npre/post work, so the frontend can reuse the segment-style per-session\ngrouping without rendering empty session shells."},"PerMockEmailPreviewRequest":{"properties":{"narrative":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Narrative"}},"type":"object","title":"PerMockEmailPreviewRequest","description":"POST body for the per-mock email preview (unsaved-narrative preview)."},"PerMockNarrativeEditRequest":{"properties":{"narrative":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Narrative"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","title":"PerMockNarrativeEditRequest"},"PerMockQueueResponse":{"properties":{"rows":{"items":{"$ref":"#/components/schemas/PerMockQueueRow"},"type":"array","title":"Rows"}},"type":"object","required":["rows"],"title":"PerMockQueueResponse"},"PerMockQueueRow":{"properties":{"mock_attempt_id":{"type":"integer","title":"Mock Attempt Id"},"user_id":{"type":"integer","title":"User Id"},"student_name":{"type":"string","title":"Student Name"},"score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Score"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"},"has_parent_email":{"type":"boolean","title":"Has Parent Email"},"edited":{"type":"boolean","title":"Edited"},"assessment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Assessment Id"},"mock_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mock Title"}},"type":"object","required":["mock_attempt_id","user_id","student_name","score","completed_at","has_parent_email","edited"],"title":"PerMockQueueRow"},"PerMockSendRequest":{"properties":{"mock_attempt_ids":{"items":{"type":"integer"},"type":"array","minItems":1,"title":"Mock Attempt Ids"}},"type":"object","required":["mock_attempt_ids"],"title":"PerMockSendRequest"},"PhoneInfo":{"properties":{"country_code":{"type":"string","title":"Country Code"},"number":{"type":"string","title":"Number"}},"type":"object","required":["country_code","number"],"title":"PhoneInfo","description":"Phone number with country code."},"PlanInfo":{"properties":{"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"is_trial":{"type":"boolean","title":"Is Trial"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"days_remaining":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days Remaining"},"had_paid_subscription":{"type":"boolean","title":"Had Paid Subscription","default":false}},"type":"object","required":["slug","name","is_trial","expires_at","days_remaining"],"title":"PlanInfo","description":"Current plan summary shown in the UI header / settings page."},"PlanPaceEnum":{"type":"string","enum":["relaxed","moderate","intense"],"title":"PlanPaceEnum","description":"Study intensity levels."},"PracticeCountResponse":{"properties":{"count":{"type":"integer","title":"Count"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"unlimited":{"type":"boolean","title":"Unlimited"}},"type":"object","required":["count","unlimited"],"title":"PracticeCountResponse","description":"Practice count and limit info."},"PracticeQuestionResponse":{"properties":{"id":{"type":"integer","title":"Id"},"content":{"additionalProperties":true,"type":"object","title":"Content"},"subject_code":{"type":"string","title":"Subject Code"},"topic":{"type":"string","title":"Topic"},"subtopic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtopic"},"difficulty_label":{"type":"string","title":"Difficulty Label"},"question_type":{"type":"string","title":"Question Type","default":"MULTIPLE_CHOICE"},"recommended_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recommended Reason"}},"type":"object","required":["id","content","subject_code","topic","difficulty_label"],"title":"PracticeQuestionResponse","description":"Question returned for practice."},"PredictedScoreInfo":{"properties":{"has_score":{"type":"boolean","title":"Has Score","default":false},"total_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Score"},"math_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Math Score"},"rw_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rw Score"},"confidence_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Confidence Level"},"last_updated":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Updated"}},"type":"object","title":"PredictedScoreInfo","description":"Predicted score summary for dashboard."},"PredictedScoreResponse":{"properties":{"predicted_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Predicted Score","description":"Total predicted score (400-1600)"},"math_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Math Score","description":"Math section score (200-800)"},"rw_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rw Score","description":"R&W section score (200-800)"},"confidence_level":{"anyOf":[{"$ref":"#/components/schemas/ConfidenceLevel"},{"type":"null"}],"description":"Confidence level"},"confidence_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Confidence Score","description":"Numeric confidence (0-1)"},"questions_analyzed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Questions Analyzed","description":"Questions used in calculation"},"topic_coverage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Topic Coverage","description":"Topic coverage percentage"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At","description":"When score was last updated"},"has_score":{"type":"boolean","title":"Has Score","description":"Whether user has a predicted score"}},"type":"object","required":["has_score"],"title":"PredictedScoreResponse","description":"Response with current predicted score.","example":{"confidence_level":"low","confidence_score":0.35,"has_score":true,"math_score":600,"predicted_score":1200,"questions_analyzed":44,"rw_score":600,"topic_coverage":45.5,"updated_at":"2025-12-03T10:30:00Z"}},"PredictedScoreSummary":{"properties":{"value":{"type":"integer","title":"Value","description":"Latest predicted total score"},"max":{"type":"integer","title":"Max","description":"Max scale for this exam (e.g., 1600 SAT, 120 TOEFL)"},"delta_since_diagnostic":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Delta Since Diagnostic","description":"Change since the user's diagnostic-trigger predicted score. None if no diagnostic baseline exists."}},"type":"object","required":["value","max"],"title":"PredictedScoreSummary","description":"Hero card: user's latest predicted score on an exam."},"PrerequisiteCreateRequest":{"properties":{"prereq_concept_id":{"type":"integer","title":"Prereq Concept Id"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["prereq_concept_id"],"title":"PrerequisiteCreateRequest"},"PrerequisiteResponse":{"properties":{"prereq_concept_id":{"type":"integer","title":"Prereq Concept Id"},"prereq_title":{"type":"string","title":"Prereq Title"},"prereq_code":{"type":"string","title":"Prereq Code"},"prereq_level":{"type":"integer","title":"Prereq Level"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"}},"type":"object","required":["prereq_concept_id","prereq_title","prereq_code","prereq_level"],"title":"PrerequisiteResponse"},"PreviewRequest":{"properties":{"template":{"$ref":"#/components/schemas/EmailTemplateCreate"},"context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Context"}},"type":"object","required":["template"],"title":"PreviewRequest","description":"Template payload + optional context overrides — renders the would-be\nemail with the type's sample data, without sending."},"PreviewResponse":{"properties":{"subject":{"type":"string","title":"Subject"},"html_body":{"type":"string","title":"Html Body"},"text_body":{"type":"string","title":"Text Body"}},"type":"object","required":["subject","html_body","text_body"],"title":"PreviewResponse"},"PricingPlanResponse":{"properties":{"package_id":{"type":"integer","title":"Package Id"},"tier":{"type":"string","title":"Tier"},"sku":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sku"},"exam_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exam Slug"},"name":{"type":"string","title":"Name"},"tagline":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tagline"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Price"},"currency":{"type":"string","title":"Currency"},"currency_symbol":{"type":"string","title":"Currency Symbol"},"duration_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Days"},"country_code":{"type":"string","title":"Country Code"},"feature_limits":{"additionalProperties":true,"type":"object","title":"Feature Limits"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"},"listed_price":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Listed Price"},"net_price":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Net Price"},"tax_applicable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Tax Applicable"},"tax_rate":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Tax Rate"},"tax_amount":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Tax Amount"},"round_off":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Round Off"},"gross_price":{"anyOf":[{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Gross Price"},"pricing_seeded":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Pricing Seeded"},"fulfillment_handler":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Fulfillment Handler"}},"type":"object","required":["package_id","tier","name","tagline","description","price","currency","currency_symbol","duration_days","country_code","feature_limits"],"title":"PricingPlanResponse","description":"Per-package pricing for the /pricing endpoint.\n\n``price``/``currency`` are the legacy single-amount mirror (price == the\ngross charge). #907g adds the structured per-region breakdown so the\npricing card can render a struck-through listed price + net + GST line:\nthese fields are populated from the #907f ResolvedPricing and are null\nfor rows not yet seeded with the #907 per-region pricing (#907e) and for\nnon-purchasable (Free) rows."},"ProctoringConfig":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":false},"level":{"type":"string","const":"strict","title":"Level","default":"strict"}},"type":"object","title":"ProctoringConfig","description":"On-device proctoring settings stored per assessment (#1057).\n\nv1 is strict-only: an assessment is either not proctored (``enabled=False``)\nor proctored in strict mode. ``level`` is kept for forward-compatibility so\npresets (light/standard) can be added later without a migration."},"ProductAccessSlice":{"properties":{"product_key":{"$ref":"#/components/schemas/ProductKey"},"product_surface":{"$ref":"#/components/schemas/ProductSurface"},"status":{"$ref":"#/components/schemas/ProductAccessStatus"},"display_name":{"type":"string","title":"Display Name"},"cta_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cta Url","description":"Where 'Continue' navigates. /sat-home for Nova-native, Dmango deep-link for GRE/Admissions, null for service products (handled via service_cards instead)."},"target_test_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Target Test Date","description":"User's target_test_date for this product if set"},"best_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Best Score","description":"Best scaled score the user has achieved on this exam, if any."},"max_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Score","description":"Max scaled score for this exam (120 TOEFL, 1600 SAT, 9 IELTS, 340 GRE)."},"extra":{"additionalProperties":true,"type":"object","title":"Extra","description":"Free-form per-product metadata (admissions stage, latest predicted score, mocks_taken, etc.) — opaque pass-through for the card to render."}},"type":"object","required":["product_key","product_surface","status","display_name"],"title":"ProductAccessSlice","description":"Single shape both the adapter (Subscription → status) and the\nrow-reader (UserProductAccess → status) emit. Dashboard consumers\nsee one shape regardless of source — eng review A1 finding."},"ProductAccessStatus":{"type":"string","enum":["no_access","free","trial","paid_active","trial_expired","enrolled"],"title":"ProductAccessStatus","description":"User's current relationship with a product.\n\n- `no_access`     : never started, no entitlement\n- `free`          : free-tier active\n- `trial`         : paid-tier trial active and unexpired\n- `paid_active`   : paid-tier active and unexpired\n- `trial_expired` : trial ended without an upgrade\n- `enrolled`      : Admissions-specific (Dmango enrollment row)"},"ProductKey":{"type":"string","enum":["sat","toefl","ielts","gre","pte","admissions","profile_building"],"title":"ProductKey","description":"The 7 products the dashboard surfaces (#544 P3).\n\nSix test-prep / admissions products plus Profile Building (a service\ncard, not an enrollable product). Adding a new product key here is a\nstructural change: bump the Postgres enum via a migration and update\n`TARGET_DEGREE_TO_PRODUCT_KEYS` in PR-2."},"ProductSurface":{"type":"string","enum":["nova","dmango","service"],"title":"ProductSurface","description":"Where a product lives — drives the card's navigation behavior.\n\n- `nova`    : product page exists in this app (e.g. /sat-home)\n- `dmango`  : deep-link to the legacy Dmango platform; v1 ships with\n              the RE-A2 \"you'll be redirected\" warning UX\n- `service` : not a product surface at all; renders as a service card\n              with a \"Talk to Expert\" CTA that posts a Zoho lead"},"ProductTargetResponse":{"properties":{"product_key":{"$ref":"#/components/schemas/ProductKey"},"target_test_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Target Test Date"},"target_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Target Score"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["product_key","target_test_date","updated_at"],"title":"ProductTargetResponse","description":"Echo of the persisted row so the client can confirm what landed."},"ProductTargetUpsert":{"properties":{"target_test_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Target Test Date","description":"ISO date (YYYY-MM-DD). Must be today or later."},"target_score":{"anyOf":[{"type":"number","maximum":1600.0,"minimum":0.0},{"type":"null"}],"title":"Target Score","description":"User's target for this exam (TOEFL 4.5/6 band, IELTS 6.5/9 band, SAT 1400/1600)."}},"type":"object","title":"ProductTargetUpsert","description":"Request body for upserting a user's per-product targets.\n\nEither field is optional so the client can update one without\nclobbering the other (e.g., set target_score without re-passing\nthe existing date). The endpoint rejects an empty payload (no\nfields set) with 422."},"ProfileGateRequest":{"properties":{"phone":{"type":"string","title":"Phone"},"graduation_year":{"type":"string","title":"Graduation Year"}},"type":"object","required":["phone","graduation_year"],"title":"ProfileGateRequest"},"ProfileGateResponse":{"properties":{"success":{"type":"boolean","title":"Success"}},"type":"object","required":["success"],"title":"ProfileGateResponse"},"ProfileIntentResponse":{"properties":{"exam":{"type":"string","title":"Exam"},"target_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Target Score"},"exam_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Exam Date"},"booking_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Booking Status"},"study_purpose":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Study Purpose"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["exam","updated_at"],"title":"ProfileIntentResponse"},"ProfileIntentUpsert":{"properties":{"exam":{"type":"string","maxLength":32,"minLength":1,"title":"Exam"},"target_score":{"anyOf":[{"type":"number","maximum":1600.0,"minimum":0.0},{"type":"null"}],"title":"Target Score"},"exam_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Exam Date"},"booking_status":{"anyOf":[{"type":"string","enum":["considering","booked","taken","cancelled"]},{"type":"null"}],"title":"Booking Status"},"study_purpose":{"anyOf":[{"type":"string","enum":["university","work","immigration","other"]},{"type":"null"}],"title":"Study Purpose"},"clear":{"anyOf":[{"items":{"type":"string","const":"exam_date"},"type":"array"},{"type":"null"}],"title":"Clear"}},"type":"object","required":["exam"],"title":"ProfileIntentUpsert","description":"Partial by design — every field except `exam` is optional.\n\nA skipped question stores nothing (null, indistinguishable from never\nasked). That is a deliberate product decision (Sriram, 2026-08-07): the\nalternative, an \"asked and declined\" sentinel, costs a picklist value and a\nbranch in every reader for segmentation nobody has asked for.\n\nBecause absent means \"don't touch\", clearing needs its own verb — see\n`clear` below."},"ProgressResponse":{"properties":{"import_status":{"type":"string","title":"Import Status"},"counts":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Counts"},"queue_total":{"type":"integer","title":"Queue Total"},"queue_by_status":{"additionalProperties":{"type":"integer"},"type":"object","title":"Queue By Status"},"done":{"type":"integer","title":"Done"},"percent":{"type":"integer","title":"Percent"}},"type":"object","required":["import_status","counts","queue_total","queue_by_status","done","percent"],"title":"ProgressResponse"},"ProgressUpdate":{"properties":{"position":{"type":"integer","minimum":0.0,"title":"Position","description":"Position (seconds for video, slide index for interactive)"},"slide_completed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Slide Completed","description":"Slide ID to mark as completed"}},"type":"object","required":["position"],"title":"ProgressUpdate","description":"Request to update lesson progress."},"PteHomeResponse":{"properties":{"tier":{"type":"string","title":"Tier"},"package_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Package Name"},"upgrade_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Upgrade Url"},"subscription_active_from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription Active From"},"subscription_expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription Expires At"},"has_baseline":{"type":"boolean","title":"Has Baseline","description":"True once the user has completed any mock","default":false},"best_overall":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Best Overall","description":"Best Overall 10-90 across completed mocks"},"mocks":{"$ref":"#/components/schemas/PteMocksBlock"},"section_groups":{"$ref":"#/components/schemas/PteSectionGroupsBlock"},"lessons":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Lessons","description":"Always null — PTE lessons deferred"},"completed_count":{"type":"integer","title":"Completed Count","default":0},"recommended_next":{"anyOf":[{"$ref":"#/components/schemas/PteRecommendedNext"},{"type":"null"}]},"targets":{"$ref":"#/components/schemas/PteTargets"}},"type":"object","required":["tier","mocks","section_groups"],"title":"PteHomeResponse","description":"Top-level payload for the PTE home page. Single 10-90 Overall; mock-only\nfunnel (no diagnostic); lessons always null (deferred)."},"PteMockItem":{"properties":{"assessment_engine_id":{"type":"integer","title":"Assessment Engine Id"},"name":{"type":"string","title":"Name"},"unlocked":{"type":"boolean","title":"Unlocked"},"attempted":{"type":"boolean","title":"Attempted"},"best_overall":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Best Overall","description":"Best Overall 10-90, or null if none/pending"},"pending":{"type":"boolean","title":"Pending","description":"True while the best attempt awaits AI grading","default":false},"lock_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lock Kind"},"unlock_after_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unlock After Name"},"lock_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lock Reason"},"last_attempt_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Attempt At"},"best_attempt_engine_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Best Attempt Engine Id"}},"type":"object","required":["assessment_engine_id","name","unlocked","attempted"],"title":"PteMockItem"},"PteMocksBlock":{"properties":{"limit_label":{"type":"string","title":"Limit Label"},"assessments":{"items":{"$ref":"#/components/schemas/PteMockItem"},"type":"array","title":"Assessments"}},"type":"object","required":["limit_label","assessments"],"title":"PteMocksBlock"},"PteRecommendedNext":{"properties":{"assessment_engine_id":{"type":"integer","title":"Assessment Engine Id"},"name":{"type":"string","title":"Name"},"skill":{"type":"string","title":"Skill"},"reason":{"type":"string","title":"Reason"}},"type":"object","required":["assessment_engine_id","name","skill","reason"],"title":"PteRecommendedNext"},"PteSectionGroupsBlock":{"properties":{"limit_label":{"type":"string","title":"Limit Label"},"skills":{"items":{"$ref":"#/components/schemas/PteSkillGroup"},"type":"array","title":"Skills"}},"type":"object","required":["limit_label","skills"],"title":"PteSectionGroupsBlock"},"PteSectionTestItem":{"properties":{"assessment_engine_id":{"type":"integer","title":"Assessment Engine Id"},"name":{"type":"string","title":"Name"},"unlocked":{"type":"boolean","title":"Unlocked"},"attempted":{"type":"boolean","title":"Attempted"},"best_overall":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Best Overall"},"pending":{"type":"boolean","title":"Pending","default":false},"lock_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lock Reason"},"last_attempt_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Attempt At"},"best_attempt_engine_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Best Attempt Engine Id"}},"type":"object","required":["assessment_engine_id","name","unlocked","attempted"],"title":"PteSectionTestItem"},"PteSkillGroup":{"properties":{"skill":{"type":"string","title":"Skill","description":"speaking_writing|reading|listening"},"label":{"type":"string","title":"Label"},"assessments":{"items":{"$ref":"#/components/schemas/PteSectionTestItem"},"type":"array","title":"Assessments"}},"type":"object","required":["skill","label","assessments"],"title":"PteSkillGroup"},"PteTargets":{"properties":{"test_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Test Date"},"target_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Target Score","description":"Target Overall 10-90, or null"},"intake_season":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intake Season"},"intake_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Intake Year"}},"type":"object","title":"PteTargets"},"PublicTestimonialResponse":{"properties":{"student_name":{"type":"string","title":"Student Name"},"score_improvement":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Score Improvement"},"quote":{"type":"string","title":"Quote"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"university":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"University"},"year":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Year"},"featured":{"type":"boolean","title":"Featured"}},"type":"object","required":["student_name","score_improvement","quote","avatar_url","university","year","featured"],"title":"PublicTestimonialResponse"},"PublishAsset":{"properties":{"url":{"type":"string","title":"Url"},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$","title":"Sha256"},"bytes":{"type":"integer","minimum":0.0,"title":"Bytes"}},"additionalProperties":false,"type":"object","required":["url","sha256","bytes"],"title":"PublishAsset"},"PublishFeedback":{"properties":{"feedback":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feedback"},"mistake_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mistake Category"},"remediation_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remediation Hint"}},"additionalProperties":false,"type":"object","title":"PublishFeedback"},"PublishGroup":{"properties":{"order":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Order"},"group_type":{"type":"string","title":"Group Type","default":"GENERIC"},"title":{"type":"string","title":"Title","default":""},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"},"passage_html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Passage Html"},"audio_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audio Url"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"questions":{"items":{"$ref":"#/components/schemas/PublishQuestion"},"type":"array","maxItems":500,"minItems":1,"title":"Questions"}},"additionalProperties":false,"type":"object","required":["questions"],"title":"PublishGroup"},"PublishItemError":{"properties":{"source_id":{"type":"string","title":"Source Id"},"code":{"type":"string","enum":["drift_conflict","invalid","skill_not_found","asset_invalid","internal"],"title":"Code"},"message":{"type":"string","title":"Message"},"retriable":{"type":"boolean","title":"Retriable","default":false}},"type":"object","required":["source_id","code","message"],"title":"PublishItemError"},"PublishItemResult":{"properties":{"source_id":{"type":"string","title":"Source Id"},"action":{"type":"string","enum":["created","versioned","unchanged"],"title":"Action"},"question_id":{"type":"integer","title":"Question Id"},"version":{"type":"integer","title":"Version"}},"type":"object","required":["source_id","action","question_id","version"],"title":"PublishItemResult"},"PublishOption":{"properties":{"source_option_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Option Id"},"text":{"type":"string","title":"Text"},"is_correct":{"type":"boolean","title":"Is Correct"},"order":{"type":"integer","minimum":0.0,"title":"Order"},"blank_index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Blank Index"},"rationale":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rationale"},"mistake_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mistake Category"},"insight":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Insight"},"remediation_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Remediation Hint"},"is_common_error":{"type":"boolean","title":"Is Common Error","default":false}},"additionalProperties":false,"type":"object","required":["text","is_correct","order"],"title":"PublishOption"},"PublishQuestion":{"properties":{"source_id":{"type":"string","maxLength":255,"title":"Source Id"},"source_version_hash":{"type":"string","title":"Source Version Hash"},"external_id":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"External Id"},"exam":{"type":"string","title":"Exam"},"question_type":{"type":"string","enum":["MCQ","CLOZE","DRAG_ORDER","FREE_TEXT","AUDIO_RECORD","NUMERIC","MULTI_SELECT","MULTI_BLANK","COMPARISON","HIGHLIGHT_INCORRECT_WORDS","FILL_BLANKS_LISTENING"],"title":"Question Type"},"question_text":{"type":"string","minLength":1,"title":"Question Text"},"order":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Order"},"passage_html":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Passage Html"},"image_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url"},"image_url_2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Url 2"},"skill_external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Skill External Id"},"subject_external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject External Id"},"usage_contexts":{"items":{"type":"string","enum":["qotd","free_practice","practice_assessment","diagnostic","mock","section_test","sample"]},"type":"array","title":"Usage Contexts"},"difficulty":{"anyOf":[{"type":"integer","maximum":5.0,"minimum":1.0},{"type":"null"}],"title":"Difficulty"},"irt_difficulty":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Irt Difficulty"},"irt_discrimination":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Irt Discrimination"},"expected_time_seconds":{"anyOf":[{"type":"integer","maximum":600.0,"minimum":10.0},{"type":"null"}],"title":"Expected Time Seconds"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"options":{"anyOf":[{"items":{"$ref":"#/components/schemas/PublishOption"},"type":"array"},{"type":"null"}],"title":"Options"},"expected_text_answer":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Expected Text Answer"},"blanks_feedback":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Blanks Feedback"},"correct_word_order":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Correct Word Order"},"word_bank":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Word Bank"},"recording_duration_secs":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Recording Duration Secs"},"min_word_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Word Count"},"numeric_answer":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Numeric Answer"},"numeric_tolerance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Numeric Tolerance"},"accepted_numeric_answers":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Accepted Numeric Answers"},"fraction_numerator":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fraction Numerator"},"fraction_denominator":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fraction Denominator"},"quantity_a":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quantity A"},"quantity_b":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quantity B"},"question_feedback":{"anyOf":[{"$ref":"#/components/schemas/PublishFeedback"},{"type":"null"}]},"answer_insights":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Answer Insights"},"assets":{"items":{"$ref":"#/components/schemas/PublishAsset"},"type":"array","title":"Assets"}},"additionalProperties":false,"type":"object","required":["source_id","source_version_hash","exam","question_type","question_text"],"title":"PublishQuestion"},"PublishSection":{"properties":{"order":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Order"},"name":{"type":"string","title":"Name"},"name_external":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name External"},"section_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section Type"},"time_mins":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Time Mins"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"},"question_groups":{"items":{"$ref":"#/components/schemas/PublishGroup"},"type":"array","maxItems":200,"minItems":1,"title":"Question Groups"}},"additionalProperties":false,"type":"object","required":["name","question_groups"],"title":"PublishSection"},"PublishedSourceIds":{"properties":{"source_system":{"type":"string","title":"Source System"},"exam":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exam"},"source_ids":{"items":{"type":"string"},"type":"array","title":"Source Ids"}},"type":"object","required":["source_system"],"title":"PublishedSourceIds"},"PurchasePackageInfo":{"properties":{"id":{"type":"integer","title":"Id"},"tier":{"type":"string","title":"Tier"},"sku":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sku"},"name":{"type":"string","title":"Name"},"price":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"duration_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Days"}},"type":"object","required":["id","tier","name","price","currency","duration_days"],"title":"PurchasePackageInfo"},"PurchaseStartRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"tier":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Tier"},"sku":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Sku"},"exam":{"anyOf":[{"type":"string","maxLength":32,"minLength":1},{"type":"null"}],"title":"Exam"},"link_token":{"anyOf":[{"type":"string","maxLength":1024,"minLength":1},{"type":"null"}],"title":"Link Token"},"submission_uuid":{"type":"string","maxLength":128,"minLength":1,"title":"Submission Uuid"},"first_name":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Last Name"},"attribution":{"$ref":"#/components/schemas/AttributionPayload"}},"type":"object","required":["email","submission_uuid"],"title":"PurchaseStartRequest","description":"Anonymous GTP visitor starts a purchase: records the intent\n(form_id=gtp_purchase_intent) and issues the email OTP challenge.\n\n#855k: plan selection is EITHER a signed checkout link (``link_token``\n— its verified SKU wins; client tier/exam are ignored) OR an explicit\n(exam, tier) pair, exam defaulting to SAT for the original contract."},"PurchaseStartResponse":{"properties":{"status":{"type":"string","title":"Status"},"challenge_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Challenge Id"},"submission_id":{"type":"integer","title":"Submission Id"},"package":{"$ref":"#/components/schemas/PurchasePackageInfo"}},"type":"object","required":["status","submission_id","package"],"title":"PurchaseStartResponse"},"PurchaseVerifyRequest":{"properties":{"challenge_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Challenge Id"},"code":{"type":"string","maxLength":10,"minLength":4,"title":"Code"}},"type":"object","required":["challenge_id","code"],"title":"PurchaseVerifyRequest"},"PurchaseVerifyResponse":{"properties":{"status":{"type":"string","title":"Status"},"access_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"},"refresh_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"user_created":{"type":"boolean","title":"User Created","default":false},"needs_password_setup_prompt":{"type":"boolean","title":"Needs Password Setup Prompt","default":false},"attempts_remaining":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Attempts Remaining"},"retry_after_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Retry After Seconds"}},"type":"object","required":["status"],"title":"PurchaseVerifyResponse","description":"OTP verified → session starts (mirrors /auth/verify-otp's token\ncontract so the frontend adopts tokens the same way)."},"PushTokenRegister":{"properties":{"token":{"type":"string","title":"Token"},"device_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Id"},"os":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Os"}},"type":"object","required":["token"],"title":"PushTokenRegister"},"QotdAnswerRequest":{"properties":{"answer":{"type":"string","title":"Answer","description":"Selected option ID (a, b, c, or d)"},"time_taken_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Time Taken Seconds","description":"Time taken to answer in seconds"}},"type":"object","required":["answer"],"title":"QotdAnswerRequest","description":"Request to answer Question of the Day."},"QotdAnswerResponse":{"properties":{"is_correct":{"type":"boolean","title":"Is Correct"},"correct_answer":{"type":"string","title":"Correct Answer"},"explanation":{"type":"string","title":"Explanation"},"streak":{"type":"integer","title":"Streak"},"points_earned":{"type":"integer","title":"Points Earned","default":0},"milestone_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Milestone Message","description":"Celebration message for streak milestones"}},"type":"object","required":["is_correct","correct_answer","explanation","streak"],"title":"QotdAnswerResponse","description":"Response after answering QOTD."},"QotdQuestion":{"properties":{"id":{"type":"integer","title":"Id"},"question_text":{"type":"string","title":"Question Text"},"options":{"items":{"$ref":"#/components/schemas/QuestionOption"},"type":"array","title":"Options"},"section":{"type":"string","title":"Section","description":"'math' or 'rw' (reading & writing)"},"topic":{"type":"string","title":"Topic"},"difficulty":{"type":"string","title":"Difficulty","description":"'easy', 'medium', 'hard'"},"explanation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Explanation"},"hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hint"}},"type":"object","required":["id","question_text","options","section","topic","difficulty"],"title":"QotdQuestion","description":"Question of the Day structure."},"QotdResponse":{"properties":{"question":{"anyOf":[{"$ref":"#/components/schemas/QotdQuestion"},{"type":"null"}]},"date":{"type":"string","format":"date","title":"Date"},"already_answered":{"type":"boolean","title":"Already Answered","default":false},"user_answer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Answer"},"is_correct":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Correct"},"streak":{"type":"integer","title":"Streak","description":"Current QOTD streak","default":0},"longest_streak":{"type":"integer","title":"Longest Streak","description":"Best streak ever (#65)","default":0}},"type":"object","required":["date"],"title":"QotdResponse","description":"Response for Question of the Day endpoint.","example":{"already_answered":false,"date":"2025-12-03","longest_streak":7,"question":{"difficulty":"easy","id":42,"options":[{"id":"a","text":"5"},{"id":"b","text":"7"},{"id":"c","text":"12"},{"id":"d","text":"17"}],"question_text":"If x + 5 = 12, what is the value of x?","section":"math","topic":"Algebra"},"streak":3}},"QualificationStatusResponse":{"properties":{"status":{"type":"string","title":"Status"},"iq_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Iq At"},"dq_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Dq At"},"dq_trigger":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dq Trigger"},"show_decision_paths":{"type":"boolean","title":"Show Decision Paths","default":false}},"type":"object","required":["status"],"title":"QualificationStatusResponse","description":"Current qualification status for a user."},"QuestionForAssessment":{"properties":{"id":{"type":"integer","title":"Id"},"content":{"additionalProperties":true,"type":"object","title":"Content"},"subject_code":{"type":"string","title":"Subject Code"},"topic":{"type":"string","title":"Topic"},"subtopic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtopic"},"difficulty_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Difficulty Label"},"question_type":{"type":"string","title":"Question Type"},"position":{"type":"integer","title":"Position"},"section_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Section Number"},"expected_time_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expected Time Seconds"}},"type":"object","required":["id","content","subject_code","topic","subtopic","difficulty_label","question_type","position","expected_time_seconds"],"title":"QuestionForAssessment","description":"Question data sent to frontend during assessment."},"QuestionImpact":{"properties":{"source_system":{"type":"string","title":"Source System"},"source_id":{"type":"string","title":"Source Id"},"found":{"type":"boolean","title":"Found"},"question_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Question Id"},"version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version"},"usage_contexts":{"items":{"type":"string"},"type":"array","title":"Usage Contexts"},"response_count":{"type":"integer","title":"Response Count","default":0},"attempted":{"type":"boolean","title":"Attempted","default":false},"placement_count":{"type":"integer","title":"Placement Count","default":0}},"type":"object","required":["source_system","source_id","found"],"title":"QuestionImpact"},"QuestionListItem":{"properties":{"id":{"type":"integer","title":"Id"},"source_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Id"},"subject_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Subject Id"},"subject_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject Code"},"question_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Question Type"},"topic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topic"},"subtopic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtopic"},"skill":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Skill"},"difficulty":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Difficulty"},"difficulty_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Difficulty Label"},"usage_contexts":{"items":{"type":"string"},"type":"array","title":"Usage Contexts"},"assessment_count":{"type":"integer","title":"Assessment Count","default":0},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"content":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Content"}},"type":"object","required":["id","source_id","subject_id","subject_code","question_type","topic","subtopic","difficulty","difficulty_label","usage_contexts"],"title":"QuestionListItem"},"QuestionListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/QuestionListItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"}},"type":"object","required":["items","total","page","page_size"],"title":"QuestionListResponse"},"QuestionOption":{"properties":{"id":{"type":"string","title":"Id"},"text":{"type":"string","title":"Text"},"is_correct":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Correct"}},"type":"object","required":["id","text"],"title":"QuestionOption","description":"A single question option."},"QuestionResponse":{"properties":{"id":{"type":"integer","title":"Id"},"subject_id":{"type":"integer","title":"Subject Id"},"subject_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject Code"},"topic":{"type":"string","title":"Topic"},"subtopic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtopic"},"question_type":{"$ref":"#/components/schemas/QuestionType"},"difficulty":{"type":"integer","title":"Difficulty"},"difficulty_label":{"anyOf":[{"$ref":"#/components/schemas/DifficultyLevel"},{"type":"null"}]},"usage_contexts":{"items":{"type":"string"},"type":"array","title":"Usage Contexts"},"stem":{"type":"string","title":"Stem"},"passage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Passage"},"options":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Options"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"expected_time_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expected Time Seconds"}},"type":"object","required":["id","subject_id","topic","question_type","difficulty","usage_contexts","stem"],"title":"QuestionResponse","description":"Question without answer - for display during practice/assessment."},"QuestionType":{"type":"string","enum":["multiple_choice","grid_in","mcq","cloze","drag_order","free_text","audio_record","short_answer","essay"],"title":"QuestionType","description":"Question types across all supported exams.\n\nPhase 2 F0b extends the original SAT-only set (MULTIPLE_CHOICE, GRID_IN)\nwith 5 first-class types matching dmango's assessment engine. Legacy\nvalues stay valid (aliases for MCQ/CLOZE) so existing SAT content\ncontinues to render without a data migration."},"QuestionWithAnswer":{"properties":{"id":{"type":"integer","title":"Id"},"subject_id":{"type":"integer","title":"Subject Id"},"subject_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject Code"},"topic":{"type":"string","title":"Topic"},"subtopic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtopic"},"question_type":{"$ref":"#/components/schemas/QuestionType"},"difficulty":{"type":"integer","title":"Difficulty"},"difficulty_label":{"anyOf":[{"$ref":"#/components/schemas/DifficultyLevel"},{"type":"null"}]},"usage_contexts":{"items":{"type":"string"},"type":"array","title":"Usage Contexts"},"stem":{"type":"string","title":"Stem"},"passage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Passage"},"options":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Options"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"expected_time_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expected Time Seconds"},"correct_answer":{"type":"string","title":"Correct Answer"},"acceptable_answers":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Acceptable Answers"},"explanation":{"type":"string","title":"Explanation"},"clue_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Clue Text"}},"type":"object","required":["id","subject_id","topic","question_type","difficulty","usage_contexts","stem","correct_answer","explanation"],"title":"QuestionWithAnswer","description":"Full question with answer and explanation - shown after answering."},"QuestionsPublishRequest":{"properties":{"source_system":{"type":"string","title":"Source System"},"dry_run":{"type":"boolean","title":"Dry Run","default":false},"questions":{"items":{"$ref":"#/components/schemas/PublishQuestion"},"type":"array","maxItems":500,"minItems":1,"title":"Questions"}},"additionalProperties":false,"type":"object","required":["source_system","questions"],"title":"QuestionsPublishRequest"},"QuestionsPublishResponse":{"properties":{"dry_run":{"type":"boolean","title":"Dry Run"},"published":{"type":"integer","title":"Published"},"unchanged":{"type":"integer","title":"Unchanged"},"failed":{"type":"integer","title":"Failed"},"results":{"items":{"$ref":"#/components/schemas/PublishItemResult"},"type":"array","title":"Results"},"errors":{"items":{"$ref":"#/components/schemas/PublishItemError"},"type":"array","title":"Errors"}},"type":"object","required":["dry_run","published","unchanged","failed"],"title":"QuestionsPublishResponse"},"QuestionsUnpublishRequest":{"properties":{"source_system":{"type":"string","title":"Source System"},"source_ids":{"items":{"type":"string"},"type":"array","maxItems":500,"minItems":1,"title":"Source Ids"},"dry_run":{"type":"boolean","title":"Dry Run","default":false}},"additionalProperties":false,"type":"object","required":["source_system","source_ids"],"title":"QuestionsUnpublishRequest"},"QuestionsUnpublishResponse":{"properties":{"dry_run":{"type":"boolean","title":"Dry Run"},"unpublished":{"type":"integer","title":"Unpublished"},"results":{"items":{"$ref":"#/components/schemas/UnpublishItemResult"},"type":"array","title":"Results"}},"type":"object","required":["dry_run","unpublished"],"title":"QuestionsUnpublishResponse"},"RWMistakes":{"properties":{"missed_clue":{"items":{"$ref":"#/components/schemas/MistakeItem"},"type":"array","title":"Missed Clue","default":[]},"reading_lapse":{"items":{"$ref":"#/components/schemas/MistakeItem"},"type":"array","title":"Reading Lapse","default":[]},"fell_for_trap":{"items":{"$ref":"#/components/schemas/MistakeItem"},"type":"array","title":"Fell For Trap","default":[]},"missed_logic":{"items":{"$ref":"#/components/schemas/MistakeItem"},"type":"array","title":"Missed Logic","default":[]}},"type":"object","title":"RWMistakes","description":"Reading & Writing section mistake categories."},"RecentActivityItem":{"properties":{"kind":{"type":"string","title":"Kind"},"label":{"type":"string","title":"Label"},"ts":{"type":"string","format":"date-time","title":"Ts"}},"type":"object","required":["kind","label","ts"],"title":"RecentActivityItem","description":"One row in the Home's recent-activity feed (#1020d)."},"RecentActivityResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ActivityItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total","description":"Total items found across the queried sources (for future pagination)"}},"type":"object","required":["items","total"],"title":"RecentActivityResponse","description":"Mixed-source timeline of the user's recent activity."},"Recommendation":{"properties":{"priority":{"type":"integer","title":"Priority"},"type":{"type":"string","title":"Type"},"topic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topic"},"reason":{"type":"string","title":"Reason"},"action":{"type":"string","title":"Action"},"estimated_impact":{"type":"string","title":"Estimated Impact"}},"type":"object","required":["priority","type","reason","action","estimated_impact"],"title":"Recommendation","description":"Single prioritized recommendation."},"RecordingConfirmRequest":{"properties":{"response_id":{"type":"integer","title":"Response Id"},"object_name":{"type":"string","title":"Object Name"},"duration_secs":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Secs"}},"type":"object","required":["response_id","object_name"],"title":"RecordingConfirmRequest","description":"Frontend POSTs this AFTER the upload PUT succeeds."},"RecordingConfirmResponse":{"properties":{"message":{"type":"string","title":"Message"},"response_id":{"type":"integer","title":"Response Id"}},"type":"object","required":["message","response_id"],"title":"RecordingConfirmResponse"},"RecordingFinalizeRequest":{"properties":{"blob_path":{"type":"string","title":"Blob Path"}},"type":"object","required":["blob_path"],"title":"RecordingFinalizeRequest","description":"Record the uploaded object as the session's recording, after the\nclient has PUT it to the signed URL from RecordingUploadUrlResponse."},"ReferenceListResponse":{"properties":{"type":{"type":"string","title":"Type"},"count":{"type":"integer","title":"Count"},"values":{"items":{"$ref":"#/components/schemas/ReferenceValueResponse"},"type":"array","title":"Values"}},"type":"object","required":["type","count","values"],"title":"ReferenceListResponse","description":"Full (bounded) reference set for a type — client-cached by the\nBricks forms that render the dropdowns. Reference tables are small\ncanonical sets, so this is intentionally not paginated."},"ReferenceType":{"type":"string","enum":["countries","target_countries","target_degrees","target_exams","currencies"],"title":"ReferenceType","description":"Valid reference-data types — mirrors reference_data_service.REFERENCE_TYPES."},"ReferenceValueResponse":{"properties":{"canonical_name":{"type":"string","title":"Canonical Name"},"aliases":{"items":{"type":"string"},"type":"array","title":"Aliases","default":[]},"is_galvanize_active":{"type":"boolean","title":"Is Galvanize Active"},"sort_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sort Order"},"iso_alpha2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Iso Alpha2"},"iso_alpha3":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Iso Alpha3"},"phone_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Code"},"tier":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tier"},"symbol":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Symbol"}},"type":"object","required":["canonical_name","is_galvanize_active"],"title":"ReferenceValueResponse","description":"One reference row. Type-specific columns (iso/phone for countries,\ntier for target countries, symbol for currencies) are surfaced as\noptional fields — absent on models that don't define them, in which\ncase from_attributes falls back to the None default."},"ReflectionListResponse":{"properties":{"progress_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Progress Id"},"attempt_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Attempt Id"},"reflections":{"items":{"$ref":"#/components/schemas/ReflectionResponse"},"type":"array","title":"Reflections"}},"type":"object","required":["reflections"],"title":"ReflectionListResponse","description":"Wrapper for the GET list endpoint so the frontend can extend\nmetadata (counts, completion %) without breaking the contract.\n\n#584: either progress_id (plan-mode) or attempt_id (attempt-mode)\nwill be set, never both."},"ReflectionResponse":{"properties":{"id":{"type":"integer","title":"Id"},"progress_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Progress Id"},"attempt_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Attempt Id"},"question_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Question Id"},"module":{"type":"string","title":"Module"},"mistake_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mistake Category"},"reason_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason Text"},"soft_skipped":{"type":"boolean","title":"Soft Skipped"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","progress_id","attempt_id","question_id","module","mistake_category","reason_text","soft_skipped","created_at","updated_at"],"title":"ReflectionResponse","description":"Response shape for both POST upsert and GET list.\n\n#584: `progress_id` is now nullable (attempt-mode rows leave it\nNULL); `attempt_id` carries the plan-less anchor."},"ReflectionWriteRequest":{"properties":{"module":{"type":"string","maxLength":20,"title":"Module","description":"Module slug: 'rw_m1' / 'rw_m2' / 'math_m1' / 'math_m2'"},"mistake_category":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Mistake Category","description":"One of MistakeCategory values: calculation / conceptual / reading / careless / incomplete / wrong_approach / vocabulary / inference / trap. Null when soft_skipped=True."},"reason_text":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Reason Text","description":"Free-text reflection (max 2000 chars). Stored stripped of control chars."},"soft_skipped":{"type":"boolean","title":"Soft Skipped","description":"True when the student opted out of categorizing this question.","default":false}},"type":"object","required":["module"],"title":"ReflectionWriteRequest","description":"Body for the per-question reflection write endpoint.\n\n`question_id` is conveyed in the URL path; the body carries the\nstudent's category choice + free-text reason + (optional) skip\nflag. Section-level summary writes use the same shape minus the\nquestion_id (different endpoint will be added if 355b needs it)."},"RefreshTokenRequest":{"properties":{"refresh_token":{"type":"string","title":"Refresh Token"}},"type":"object","required":["refresh_token"],"title":"RefreshTokenRequest","description":"Request to refresh access token (HIGH-3)."},"RefundAttentionPage":{"properties":{"items":{"items":{"$ref":"#/components/schemas/RefundOrderView"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","minimum":1.0,"title":"Page"},"page_size":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Page Size"}},"type":"object","required":["items","total","page","page_size"],"title":"RefundAttentionPage","description":"Paginated hold queue: gateway refunded but revocation incomplete."},"RefundOrderView":{"properties":{"id":{"type":"integer","title":"Id"},"user_id":{"type":"integer","title":"User Id"},"status":{"type":"string","title":"Status"},"price":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Price"},"currency":{"type":"string","title":"Currency"},"gateway":{"type":"string","title":"Gateway"},"gateway_payment_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gateway Payment Id"},"item_type":{"type":"string","title":"Item Type"},"item_id":{"type":"integer","title":"Item Id"},"fulfillment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Fulfillment Id"},"refund":{"anyOf":[{"$ref":"#/components/schemas/RefundRecordView"},{"type":"null"}]}},"type":"object","required":["id","user_id","status","price","currency","gateway","gateway_payment_id","item_type","item_id","fulfillment_id"],"title":"RefundOrderView","description":"Order-with-refund-facts as shown to internal admins."},"RefundRecordView":{"properties":{"state":{"type":"string","title":"State"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"initiated_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Initiated By"},"amount":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Amount"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"gateway_refund_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gateway Refund Id"},"gateway_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gateway Status"},"gateway_refunded_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gateway Refunded At"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At"},"revocation":{"anyOf":[{"$ref":"#/components/schemas/RefundRevocationView"},{"type":"null"}]}},"type":"object","required":["state"],"title":"RefundRecordView","description":"The item_metadata['refund'] record. Extra keys (attempts log, version)\nare intentionally ignored — they're audit detail, not API surface."},"RefundRequest":{"properties":{"reason":{"type":"string","maxLength":500,"minLength":3,"title":"Reason"},"amount":{"anyOf":[{"type":"number","minimum":0.01},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Amount","description":"Partial refund amount. None = full refund (order.price)."}},"type":"object","required":["reason"],"title":"RefundRequest"},"RefundRevocationView":{"properties":{"mode":{"type":"string","title":"Mode"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"},"target_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Target Id"},"revoked_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Revoked At"}},"type":"object","required":["mode"],"title":"RefundRevocationView","description":"How access was revoked for the refunded order."},"ReportRunListItem":{"properties":{"id":{"type":"integer","title":"Id"},"report_type":{"type":"string","title":"Report Type"},"cohort_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cohort Id"},"user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Id"},"mock_attempt_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mock Attempt Id"},"reporting_week_start":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Reporting Week Start"},"recipient_email":{"type":"string","title":"Recipient Email"},"status":{"type":"string","title":"Status"},"attempts":{"type":"integer","title":"Attempts"},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sent At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"approved_by_internal_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Approved By Internal User Id"},"narrative_edited":{"type":"boolean","title":"Narrative Edited","default":false}},"type":"object","required":["id","report_type","cohort_id","user_id","mock_attempt_id","reporting_week_start","recipient_email","status","attempts","sent_at","created_at"],"title":"ReportRunListItem","description":"Compact list row for the cohort report-runs table."},"ReportRunListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ReportRunListItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["items","total","limit","offset"],"title":"ReportRunListResponse","description":"Paginated list of ReportRun rows for a cohort."},"RequestGradingResponse":{"properties":{"status":{"type":"string","enum":["queued","in_progress"],"title":"Status"},"attempt_id":{"type":"integer","title":"Attempt Id"}},"type":"object","required":["status","attempt_id"],"title":"RequestGradingResponse","description":"#1100. ``queued``: AI grading was queued for the attempt. ``in_progress``:\na grading run for it is already under way, so nothing new was queued."},"RequeueResponse":{"properties":{"queue_id":{"type":"integer","title":"Queue Id"},"source":{"type":"string","title":"Source"},"attempt_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Attempt Id"},"engine_attempt_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Engine Attempt Id"},"response_count":{"type":"integer","title":"Response Count"},"previous_error":{"type":"string","title":"Previous Error"},"previous_retry_count":{"type":"integer","title":"Previous Retry Count"}},"type":"object","required":["queue_id","source","response_count","previous_error","previous_retry_count"],"title":"RequeueResponse"},"ResendReportRunResponse":{"properties":{"id":{"type":"integer","title":"Id"},"status":{"type":"string","title":"Status"},"sent_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Sent At"},"attempts":{"type":"integer","title":"Attempts"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"}},"type":"object","required":["id","status","sent_at","attempts"],"title":"ResendReportRunResponse","description":"Returned after POST /reports/runs/{id}/resend.\n\nCarries the new status + sent_at so the admin UI can refresh\nwithout re-fetching the list."},"ResetPasswordRequest":{"properties":{"token":{"type":"string","title":"Token"},"new_password":{"type":"string","title":"New Password"}},"type":"object","required":["token","new_password"],"title":"ResetPasswordRequest","description":"Request to reset password with token."},"ResetPasswordResponse":{"properties":{"message":{"type":"string","title":"Message"},"success":{"type":"boolean","title":"Success"}},"type":"object","required":["message","success"],"title":"ResetPasswordResponse","description":"Response after successful password reset."},"ResultsOfferCellOut":{"properties":{"test_type":{"type":"string","title":"Test Type"},"variant":{"type":"string","title":"Variant"},"viewed":{"type":"integer","title":"Viewed"},"reached_offer":{"type":"integer","title":"Reached Offer"},"clicked":{"type":"integer","title":"Clicked"},"shortcut":{"type":"integer","title":"Shortcut"},"purchases":{"type":"integer","title":"Purchases"},"checkout_reach":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Checkout Reach"}},"type":"object","required":["test_type","variant","viewed","reached_offer","clicked","shortcut","purchases"],"title":"ResultsOfferCellOut","description":"#1443i: the SAT results-screen offer for one test type x A/B arm."},"ResultsOfferReadoutResponse":{"properties":{"cells":{"items":{"$ref":"#/components/schemas/ResultsOfferCellOut"},"type":"array","title":"Cells"}},"type":"object","required":["cells"],"title":"ResultsOfferReadoutResponse"},"RevenueResponse":{"properties":{"unlock":{"additionalProperties":{"type":"number"},"type":"object","title":"Unlock"},"subscription":{"additionalProperties":{"type":"number"},"type":"object","title":"Subscription"},"by_magnet":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"By Magnet"}},"type":"object","required":["unlock","subscription","by_magnet"],"title":"RevenueResponse"},"ReviewItem":{"properties":{"kind":{"type":"string","title":"Kind","description":"'question' | 'lesson' | 'skill_node'"},"row_id":{"type":"integer","title":"Row Id"},"validation_status":{"$ref":"#/components/schemas/ValidationStatus","description":"One of: approved, flagged, pending, rejected, valid"}},"type":"object","required":["kind","row_id","validation_status"],"title":"ReviewItem"},"ReviewRequest":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ReviewItem"},"type":"array","title":"Items"}},"type":"object","title":"ReviewRequest"},"ReviewResponse":{"properties":{"batch_id":{"type":"string","title":"Batch Id"},"updated":{"type":"integer","title":"Updated"},"skipped":{"type":"integer","title":"Skipped"},"errors":{"items":{"type":"string"},"type":"array","title":"Errors"}},"type":"object","required":["batch_id","updated","skipped"],"title":"ReviewResponse"},"RollbackRequest":{"properties":{"to_version":{"type":"integer","title":"To Version"}},"type":"object","required":["to_version"],"title":"RollbackRequest"},"RollbackResponse":{"properties":{"deleted_children":{"type":"integer","title":"Deleted Children"},"deleted_contacts":{"type":"integer","title":"Deleted Contacts"},"retained_contacts":{"type":"integer","title":"Retained Contacts"}},"type":"object","required":["deleted_children","deleted_contacts","retained_contacts"],"title":"RollbackResponse"},"RosterRow":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"first_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Last Name"},"phone":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Phone"},"parent_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Parent Name"},"parent_email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Parent Email"},"parent_phone":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Parent Phone"},"country":{"anyOf":[{"type":"string","maxLength":5},{"type":"null"}],"title":"Country"},"grade":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Grade"},"school_board":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"School Board"}},"type":"object","required":["email"],"title":"RosterRow","description":"One CSV row coming into bulk_enroll. Email is required; name\nparts are optional — the service falls back to email-local-part\nif first_name is missing (matches the existing #543 signup flow).\n\n#347g extends with contact + parent fields. parent_name and\nparent_email are required for new users created by this row (admin\nflow assumes under-18 SAT students). Validation lives in the\nservice so a roster row for an EXISTING user can omit them.\n\nStream 2a fix-bundle: also accept academic fields (country, grade,\nschool_board) so they land on UserProfile during enrollment. The\nDT results page reads them via hasCompleteProfile and skips the\n\"complete your profile to unlock results\" gate automatically."},"SATSampleTestInfoResponse":{"properties":{"email_masked":{"type":"string","title":"Email Masked"},"is_verified":{"type":"boolean","title":"Is Verified"},"user_id":{"type":"integer","title":"User Id"}},"type":"object","required":["email_masked","is_verified","user_id"],"title":"SATSampleTestInfoResponse","description":"Response schema for registration info (used on verify page)."},"SATSampleTestRegisterRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name","default":""},"utm_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Source"},"utm_medium":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Medium"},"utm_campaign":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Campaign"},"utm_term":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Term"},"utm_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Content"},"galv_client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Galv Client Id"},"landing_page":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Landing Page"},"gclid":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Gclid"},"partner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Partner"},"partner_intake":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Partner Intake"}},"type":"object","required":["email","first_name"],"title":"SATSampleTestRegisterRequest","description":"Request schema for SAT Sample Test registration."},"SATSampleTestRegisterResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"user_id":{"type":"integer","title":"User Id"},"message":{"type":"string","title":"Message","default":"Please check your email for the verification code"},"is_already_verified":{"type":"boolean","title":"Is Already Verified","default":false}},"type":"object","required":["success","user_id"],"title":"SATSampleTestRegisterResponse","description":"Response schema for SAT Sample Test registration.\n\n⛔ Carries NO tokens, for verified users or anyone else. Registration\nalways issues an OTP; a session comes only from /verify-otp against a\ncurrent code.\n\nThis schema previously declared `access_token` / `refresh_token`\n\"for immediate login without going through OTP verification again\" —\nthe bypass removed in v4.13.1. They were always None and the frontend\nnever read them (LeadMagnetRegisterPage consumes only `user_id`), so\nthey are deleted rather than left as a standing instruction to put the\nhole back."},"SATSampleTestResendRequest":{"properties":{"user_id":{"type":"integer","title":"User Id"}},"type":"object","required":["user_id"],"title":"SATSampleTestResendRequest","description":"Request schema for OTP resend."},"SATSampleTestResendResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","message"],"title":"SATSampleTestResendResponse","description":"Response schema for OTP resend."},"SATSampleTestVerifyRequest":{"properties":{"user_id":{"type":"integer","title":"User Id"},"otp":{"type":"string","title":"Otp"}},"type":"object","required":["user_id","otp"],"title":"SATSampleTestVerifyRequest","description":"Request schema for OTP verification."},"SATSampleTestVerifyResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"access_token":{"type":"string","title":"Access Token"},"refresh_token":{"type":"string","title":"Refresh Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"redirect_to":{"type":"string","title":"Redirect To","default":"/sat-free-resources/sample-test/start"}},"type":"object","required":["success","access_token","refresh_token"],"title":"SATSampleTestVerifyResponse","description":"Response schema for successful OTP verification."},"SatOlympiadConfigResponse":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"start_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start At"},"end_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End At"},"window_open":{"type":"boolean","title":"Window Open"},"require_entitlement":{"type":"boolean","title":"Require Entitlement","default":true},"available_tests":{"type":"integer","title":"Available Tests"},"results_published":{"type":"boolean","title":"Results Published"},"certificates_published":{"type":"boolean","title":"Certificates Published","default":false}},"type":"object","required":["enabled","start_at","end_at","window_open","available_tests","results_published"],"title":"SatOlympiadConfigResponse","description":"Current sitting config + a read-only view of what students would see."},"SatOlympiadConfigUpdate":{"properties":{"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"start_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start At"},"end_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End At"},"results_published":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Results Published"},"certificates_published":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Certificates Published"},"require_entitlement":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Require Entitlement"}},"type":"object","title":"SatOlympiadConfigUpdate"},"SatResultsKindSettings":{"properties":{"kind":{"type":"string","title":"Kind"},"label":{"type":"string","title":"Label"},"offer_enabled":{"type":"boolean","title":"Offer Enabled"},"offer_origin":{"type":"string","title":"Offer Origin"},"insights_source":{"type":"string","title":"Insights Source"},"insights_origin":{"type":"string","title":"Insights Origin"}},"type":"object","required":["kind","label","offer_enabled","offer_origin","insights_source","insights_origin"],"title":"SatResultsKindSettings"},"SatResultsSettingsResponse":{"properties":{"kinds":{"items":{"$ref":"#/components/schemas/SatResultsKindSettings"},"type":"array","title":"Kinds"},"valid_insights_sources":{"items":{"type":"string"},"type":"array","title":"Valid Insights Sources"}},"type":"object","required":["kinds","valid_insights_sources"],"title":"SatResultsSettingsResponse","description":"Effective switches per results kind (#1443b, #1443h)."},"SatResultsSettingsUpdate":{"properties":{"kind":{"type":"string","title":"Kind","description":"mock | diagnostic | sample | section_test"},"offer_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Offer Enabled","description":"Render the sequence + paid-pack offer for this kind"},"insights_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Insights Source","description":"Stage 3 source for this kind: skills | reflection"},"use_global":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Use Global","description":"Drop this kind's own row(s) so it follows the global setting again: any of offer_enabled, insights_source"}},"type":"object","required":["kind"],"title":"SatResultsSettingsUpdate"},"SaveResponseRequest":{"properties":{"question_id":{"type":"integer","title":"Question Id"},"selected_option_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Selected Option Id"},"text_response":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text Response"},"ordered_words":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Ordered Words"},"writing_response":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Writing Response"},"numeric_response":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Numeric Response"},"selected_option_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Selected Option Ids"},"question_evaluation":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Question Evaluation"},"clear_selection":{"type":"boolean","title":"Clear Selection","default":false}},"type":"object","required":["question_id"],"title":"SaveResponseRequest","description":"Payload for saving a single response (auto-save while answering).\n\nMatches dmango `SaveResponseSerializer`. L11 Bucket D adds\n`question_evaluation` — an optional accumulator blob (time spent,\nmarked-for-review flag, answer-change count) that the client pushes\non each save. Merged shallowly into the persisted column server-side\nso a partial update doesn't clobber prior fields."},"SaveResponseResponse":{"properties":{"message":{"type":"string","title":"Message"},"response_id":{"type":"integer","title":"Response Id"}},"type":"object","required":["message","response_id"],"title":"SaveResponseResponse"},"SaveResponsesRequest":{"properties":{"responses":{"items":{"$ref":"#/components/schemas/SaveResponseRequest"},"type":"array","title":"Responses"}},"type":"object","title":"SaveResponsesRequest","description":"Bulk autosave — a batch of responses persisted in ONE transaction. Same\nitem shape as save-response; used by the client's section-end / submit flush\nso N buffered answers cost one round-trip instead of N."},"SaveResponsesResponse":{"properties":{"message":{"type":"string","title":"Message"},"saved_count":{"type":"integer","title":"Saved Count"},"response_ids":{"items":{"type":"integer"},"type":"array","title":"Response Ids"}},"type":"object","required":["message","saved_count"],"title":"SaveResponsesResponse"},"SaveSectionTimeResponse":{"properties":{"message":{"type":"string","title":"Message"},"time_remaining_seconds":{"type":"integer","title":"Time Remaining Seconds"}},"type":"object","required":["message","time_remaining_seconds"],"title":"SaveSectionTimeResponse"},"SavedResponsePayload":{"properties":{"question_id":{"type":"integer","title":"Question Id"},"answered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Answered At"},"selected_option_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Selected Option Id"},"text_response":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text Response"},"ordered_words":{"anyOf":[{},{"type":"null"}],"title":"Ordered Words"},"writing_response":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Writing Response"},"recording_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recording Url"},"numeric_response":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Numeric Response"},"selected_option_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Selected Option Ids"}},"type":"object","required":["question_id"],"title":"SavedResponsePayload","description":"One entry in the `saved_responses` map returned by `StartSection`."},"ScoreHistoryItem":{"properties":{"id":{"type":"integer","title":"Id"},"date":{"type":"string","format":"date-time","title":"Date"},"predicted_score":{"type":"integer","title":"Predicted Score"},"math_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Math Score"},"rw_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rw Score"},"confidence_level":{"$ref":"#/components/schemas/ConfidenceLevel"},"trigger_type":{"$ref":"#/components/schemas/TriggerType"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["id","date","predicted_score","confidence_level","trigger_type"],"title":"ScoreHistoryItem","description":"Single item in score history.\n\nEpic3b (#541) — `math_score` / `rw_score` are nullable for non-SAT\nhistory rows (TOEFL/IELTS use `section_scores` JSON instead). The\nPydantic schema accepts None so a non-SAT row doesn't crash the\nhistory-list endpoint with a validation error."},"ScoreHistoryResponse":{"properties":{"history":{"items":{"$ref":"#/components/schemas/ScoreHistoryItem"},"type":"array","title":"History"},"trend":{"type":"string","title":"Trend","description":"Score trend: 'improving', 'declining', 'stable', 'insufficient_data'"},"change":{"type":"integer","title":"Change","description":"Score change over the period"},"period_days":{"type":"integer","title":"Period Days","description":"Number of days in the history period"}},"type":"object","required":["history","trend","change","period_days"],"title":"ScoreHistoryResponse","description":"Response with score history for trend analysis.","example":{"change":100,"history":[{"confidence_level":"low","date":"2025-12-01T10:00:00Z","id":1,"math_score":550,"note":"Initial diagnostic","predicted_score":1100,"rw_score":550,"trigger_type":"diagnostic_completed"},{"confidence_level":"medium","date":"2025-12-03T14:00:00Z","id":2,"math_score":600,"note":"After mock test 1","predicted_score":1200,"rw_score":600,"trigger_type":"mock_completed"}],"period_days":30,"trend":"improving"}},"SectionBreakdown":{"properties":{"subject_code":{"type":"string","title":"Subject Code"},"correct":{"type":"integer","title":"Correct"},"total":{"type":"integer","title":"Total"},"accuracy":{"type":"number","title":"Accuracy"}},"type":"object","required":["subject_code","correct","total","accuracy"],"title":"SectionBreakdown","description":"Accuracy breakdown by section/subject."},"SectionInfo":{"properties":{"id":{"type":"integer","title":"Id"},"title":{"type":"string","title":"Title"},"position":{"type":"integer","title":"Position"},"subject_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Subject Id"},"subject_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject Code"},"question_count":{"type":"integer","title":"Question Count"},"time_limit_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Time Limit Minutes"},"section_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section Type"}},"type":"object","required":["id","title","position","question_count"],"title":"SectionInfo","description":"Section information for multi-section assessments."},"SectionInput":{"properties":{"title":{"type":"string","title":"Title"},"subject_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Subject Id"},"instructions":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructions"},"time_limit_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Time Limit Seconds"},"question_ids":{"items":{"type":"integer"},"type":"array","title":"Question Ids"}},"type":"object","required":["title","question_ids"],"title":"SectionInput","description":"Section input for creating assessments with sections"},"SectionStartResponse":{"properties":{"message":{"type":"string","title":"Message"},"section_id":{"type":"integer","title":"Section Id"},"section_order":{"type":"integer","title":"Section Order"},"time_remaining_seconds":{"type":"integer","title":"Time Remaining Seconds"},"section":{"$ref":"#/components/schemas/EngineSectionDetailResponse"},"saved_responses":{"additionalProperties":{"$ref":"#/components/schemas/SavedResponsePayload"},"type":"object","title":"Saved Responses","default":{}}},"type":"object","required":["message","section_id","section_order","time_remaining_seconds","section"],"title":"SectionStartResponse"},"SectionStats":{"properties":{"questions_attempted":{"type":"integer","title":"Questions Attempted","default":0},"questions_correct":{"type":"integer","title":"Questions Correct","default":0},"accuracy":{"type":"number","maximum":100.0,"minimum":0.0,"title":"Accuracy","description":"Accuracy percentage","default":0.0},"avg_time_per_question":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Time Per Question"},"strongest_topic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Strongest Topic"},"weakest_topic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Weakest Topic"}},"type":"object","title":"SectionStats","description":"Statistics for a single section (Math or R&W)."},"SectionStatusEntry":{"properties":{"order":{"type":"integer","title":"Order"},"name":{"type":"string","title":"Name"},"section_type":{"type":"string","title":"Section Type"},"is_completed":{"type":"boolean","title":"Is Completed"},"is_current":{"type":"boolean","title":"Is Current"},"is_locked":{"type":"boolean","title":"Is Locked"}},"type":"object","required":["order","name","section_type","is_completed","is_current","is_locked"],"title":"SectionStatusEntry"},"SectionStatusResponse":{"properties":{"current_section_order":{"type":"integer","title":"Current Section Order"},"section_started":{"type":"boolean","title":"Section Started"},"time_remaining_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Time Remaining Seconds"},"sections":{"items":{"$ref":"#/components/schemas/SectionStatusEntry"},"type":"array","title":"Sections","default":[]}},"type":"object","required":["current_section_order","section_started"],"title":"SectionStatusResponse"},"SectionSummaryWriteRequest":{"properties":{"module":{"type":"string","maxLength":20,"title":"Module","description":"Section bucket: 'rw' or 'math'"},"mistake_category":{"type":"string","maxLength":20,"title":"Mistake Category","description":"Dominant pattern across the section's wrong answers. One of MistakeCategory values."},"reason_text":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Reason Text","description":"Free-text reflection on the dominant pattern (max 2000 chars)."}},"type":"object","required":["module","mistake_category"],"title":"SectionSummaryWriteRequest","description":"#584: body for the section-level summary write endpoint\n(attempt-mode). Section-level rows have question_id NULL on the\nunderlying table; the module field carries the section bucket."},"SectionVariance":{"properties":{"math_first_half":{"$ref":"#/components/schemas/HalfStats"},"math_second_half":{"$ref":"#/components/schemas/HalfStats"},"rw_first_half":{"$ref":"#/components/schemas/HalfStats"},"rw_second_half":{"$ref":"#/components/schemas/HalfStats"},"fatigue_detected":{"type":"boolean","title":"Fatigue Detected"},"fatigue_score":{"type":"number","title":"Fatigue Score"}},"type":"object","required":["math_first_half","math_second_half","rw_first_half","rw_second_half","fatigue_detected","fatigue_score"],"title":"SectionVariance","description":"Fatigue detection via section performance variance."},"SegmentPreview":{"properties":{"segment_number":{"type":"integer","title":"Segment Number"},"total_segments":{"type":"integer","title":"Total Segments"},"start_date":{"type":"string","format":"date","title":"Start Date"},"end_date":{"type":"string","format":"date","title":"End Date"},"task_count":{"type":"integer","title":"Task Count"},"focus_skills":{"items":{"type":"string"},"type":"array","title":"Focus Skills"},"is_final":{"type":"boolean","title":"Is Final"}},"type":"object","required":["segment_number","total_segments","start_date","end_date","task_count","focus_skills","is_final"],"title":"SegmentPreview","description":"Compact preview of a rebuilt segment for the reveal card."},"SegmentResponse":{"properties":{"id":{"type":"integer","title":"Id"},"segment_number":{"type":"integer","title":"Segment Number"},"start_date":{"type":"string","format":"date","title":"Start Date"},"end_date":{"type":"string","format":"date","title":"End Date"},"status":{"type":"string","title":"Status"},"target_mock_assessment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Target Mock Assessment Id"},"generated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Generated At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"}},"type":"object","required":["id","segment_number","start_date","end_date","status"],"title":"SegmentResponse","description":"One segment in a plan's lifecycle."},"SegmentTimelineItem":{"properties":{"segment_number":{"type":"integer","title":"Segment Number"},"status":{"type":"string","title":"Status"},"start_date":{"type":"string","format":"date","title":"Start Date"},"end_date":{"type":"string","format":"date","title":"End Date"},"task_count":{"type":"integer","title":"Task Count"},"completed_task_count":{"type":"integer","title":"Completed Task Count"},"focus_skills":{"items":{"type":"string"},"type":"array","title":"Focus Skills"},"mock_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mock Score"},"mock_attempt_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mock Attempt Id"},"mastery_delta":{"items":{"$ref":"#/components/schemas/MasteryDeltaItem"},"type":"array","title":"Mastery Delta"},"is_final":{"type":"boolean","title":"Is Final"}},"type":"object","required":["segment_number","status","start_date","end_date","task_count","completed_task_count","focus_skills","mock_score","mock_attempt_id","mastery_delta","is_final"],"title":"SegmentTimelineItem","description":"A single segment as it appears on the timeline rail.\n\nFor COMPLETED segments: full payload (task counts, focus skills,\nmock score, mastery delta vs next segment).\nFor ACTIVE segments: payload minus the mastery delta (no after state).\nFor FUTURE segments (placeholder, no DB row yet): just segment_number\n+ dates + status, all other fields empty/None. The frontend\nrenders these as outlined nodes with copy like \"Will be planned\nafter segment N's checkpoint\"."},"SegmentTimelineResponse":{"properties":{"plan_id":{"type":"integer","title":"Plan Id"},"current_segment_number":{"type":"integer","title":"Current Segment Number"},"total_segments":{"type":"integer","title":"Total Segments"},"exam_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Exam Date"},"days_to_exam":{"type":"integer","title":"Days To Exam"},"is_exam_past":{"type":"boolean","title":"Is Exam Past"},"predicted_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Predicted Score"},"diagnostic_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Diagnostic Score"},"score_delta":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Score Delta"},"plan_adherence_rate":{"type":"number","title":"Plan Adherence Rate"},"plan_completed_tasks":{"type":"integer","title":"Plan Completed Tasks"},"plan_expected_tasks":{"type":"integer","title":"Plan Expected Tasks"},"segments":{"items":{"$ref":"#/components/schemas/SegmentTimelineItem"},"type":"array","title":"Segments"}},"type":"object","required":["plan_id","current_segment_number","total_segments","exam_date","days_to_exam","is_exam_past","predicted_score","diagnostic_score","score_delta","plan_adherence_rate","plan_completed_tasks","plan_expected_tasks","segments"],"title":"SegmentTimelineResponse","description":"Response payload for GET /study-plan/segments.\n\nReturns every segment in the active plan — past, current, and\nfuture — in a single fetch. The frontend renders the timeline\nrail directly from this payload with no per-node lookups.\n\nIncludes the \"where do you stand\" status fields the timeline\nsurfaces in its header: days to exam, predicted score with\ndiagnostic delta, and plan adherence (completed / expected tasks)."},"SegmentWeek":{"properties":{"week_index":{"type":"integer","title":"Week Index"},"week_start":{"type":"string","format":"date","title":"Week Start"},"week_end":{"type":"string","format":"date","title":"Week End"},"sessions":{"items":{"$ref":"#/components/schemas/SessionResponse"},"type":"array","title":"Sessions"},"tasks":{"items":{"$ref":"#/components/schemas/ClassroomTaskResponse"},"type":"array","title":"Tasks"}},"type":"object","required":["week_index","week_start","week_end","sessions","tasks"],"title":"SegmentWeek","description":"One week in the 3-week segment view (#347e SegmentsPage)."},"SellableFlagUpdate":{"properties":{"sellable_in_nova":{"type":"boolean","title":"Sellable In Nova"}},"type":"object","required":["sellable_in_nova"],"title":"SellableFlagUpdate","description":"#855d launch gate: the one-field body keeps the flip deliberate."},"SendOTPRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},"type":"object","required":["email"],"title":"SendOTPRequest","description":"Request to send OTP to user's email."},"SendOTPResponse":{"properties":{"message":{"type":"string","title":"Message"},"email":{"type":"string","title":"Email"}},"type":"object","required":["message","email"],"title":"SendOTPResponse","description":"Response after OTP is sent."},"SendResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/SendResultRow"},"type":"array","title":"Results"}},"type":"object","required":["results"],"title":"SendResponse"},"SendResultRow":{"properties":{"target_id":{"type":"integer","title":"Target Id"},"runs":{"type":"integer","title":"Runs"},"ok":{"type":"boolean","title":"Ok"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"}},"type":"object","required":["target_id","runs","ok"],"title":"SendResultRow","description":"One target's outcome from an approve-and-send call."},"SendTestResponse":{"properties":{"sent":{"type":"boolean","title":"Sent"},"to_email":{"type":"string","title":"To Email"},"tested_version":{"type":"integer","title":"Tested Version"}},"type":"object","required":["sent","to_email","tested_version"],"title":"SendTestResponse"},"ServiceCard":{"properties":{"service_key":{"type":"string","enum":["profile_building","admissions_counselling"],"title":"Service Key"},"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description"},"cta_label":{"type":"string","title":"Cta Label","default":"Talk to Expert"},"program_page_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Program Page Url","description":"GTP website page describing the service (optional)"}},"type":"object","required":["service_key","title","description"],"title":"ServiceCard","description":"Profile Building or Admissions-counselling service card. Posts a\nZoho lead via POST /api/v1/me/service-leads when clicked (PR-3)."},"ServiceLeadCreate":{"properties":{"service_key":{"type":"string","enum":["profile_building","admissions_counselling"],"title":"Service Key","description":"Which service card the user clicked"},"source_surface":{"type":"string","enum":["dashboard_my_journey","dashboard_profile_building_section","dashboard_admissions_section"],"title":"Source Surface","description":"Which surface on the dashboard triggered the lead"},"message":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Message","description":"Optional free-text note the user typed before submitting"}},"type":"object","required":["service_key","source_surface"],"title":"ServiceLeadCreate","description":"Request body for `POST /api/v1/me/service-leads`."},"ServiceLeadResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message","description":"Human-readable status for the FE to surface"},"idempotent":{"type":"boolean","title":"Idempotent","description":"True when this exact lead was already submitted in the last 5min and we returned a no-op replay (no second Zoho call)","default":false},"dry_run":{"type":"boolean","title":"Dry Run","description":"True when ENVIRONMENT != production — payload was logged, not sent to Zoho. Safe to test in dev/staging.","default":false}},"type":"object","required":["success","message"],"title":"ServiceLeadResponse","description":"Response shape — same for fresh, idempotent-replay, and dry-run cases."},"SessionAttendanceMark":{"properties":{"user_id":{"type":"integer","title":"User Id"},"attendance_status":{"$ref":"#/components/schemas/AttendanceStatus"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"engagement_score":{"anyOf":[{"type":"integer","maximum":5.0,"minimum":1.0},{"type":"null"}],"title":"Engagement Score"},"engagement_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Engagement Reason"}},"type":"object","required":["user_id","attendance_status"],"title":"SessionAttendanceMark","description":"POST /api/internal/sessions/{id}/attendance — mark or update one\nstudent's status. The endpoint upserts on (session_id, user_id) per\nthe UNIQUE constraint."},"SessionAttendanceResponse":{"properties":{"id":{"type":"integer","title":"Id"},"session_id":{"type":"integer","title":"Session Id"},"user_id":{"type":"integer","title":"User Id"},"attendance_status":{"$ref":"#/components/schemas/AttendanceStatus"},"marked_at":{"type":"string","format":"date-time","title":"Marked At"},"marked_by_internal_user_id":{"type":"integer","title":"Marked By Internal User Id"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"engagement_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Engagement Score"},"engagement_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Engagement Reason"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","session_id","user_id","attendance_status","marked_at","marked_by_internal_user_id","notes","created_at","updated_at"],"title":"SessionAttendanceResponse"},"SessionCreate":{"properties":{"cohort_id":{"type":"integer","title":"Cohort Id"},"type":{"$ref":"#/components/schemas/SessionType"},"led_by_internal_user_id":{"type":"integer","title":"Led By Internal User Id"},"scheduled_at":{"type":"string","format":"date-time","title":"Scheduled At"},"duration_minutes":{"type":"integer","exclusiveMinimum":0.0,"title":"Duration Minutes"},"title":{"type":"string","maxLength":200,"minLength":1,"title":"Title"},"focus_scope":{"anyOf":[{"$ref":"#/components/schemas/SessionFocusScope"},{"type":"null"}]},"subject_skill_node_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Subject Skill Node Id"},"meeting_provider":{"$ref":"#/components/schemas/SessionMeetingProvider","default":"zoom"},"join_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Join Url"},"planned_topics":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Planned Topics"},"timezone":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Timezone"}},"type":"object","required":["cohort_id","type","led_by_internal_user_id","scheduled_at","duration_minutes","title"],"title":"SessionCreate","description":"POST /api/internal/cohorts/{id}/sessions — focus_scope auto-derives\nfrom type when not provided; timezone defaults from the cohort."},"SessionFocusScope":{"type":"string","enum":["subject","cohort_wide"],"title":"SessionFocusScope","description":"Whether a Session is scoped to a single subject or cohort-wide.\n\nAuto-derived from `type` by `session_service.create_session` (#347b)\nwhen the caller doesn't set it explicitly:\n  live_instruction / doubt_clarification -> 'subject' (subject required)\n  proctored_practice / mock_test_proctored -> 'cohort_wide' (subject null)"},"SessionMeetingProvider":{"type":"string","enum":["zoom","calcom","other"],"title":"SessionMeetingProvider","description":"Which platform hosts the meeting.\n\n`calcom` reserved for Stream 2's one-on-one auto-booking; Stream 1\nonly emits `zoom` / `other`."},"SessionResponse":{"properties":{"id":{"type":"integer","title":"Id"},"cohort_id":{"type":"integer","title":"Cohort Id"},"type":{"$ref":"#/components/schemas/SessionType"},"focus_scope":{"$ref":"#/components/schemas/SessionFocusScope"},"subject_skill_node_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Subject Skill Node Id"},"subject_skill_node_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject Skill Node Code"},"led_by_internal_user_id":{"type":"integer","title":"Led By Internal User Id"},"scheduled_at":{"type":"string","format":"date-time","title":"Scheduled At"},"duration_minutes":{"type":"integer","title":"Duration Minutes"},"timezone":{"type":"string","title":"Timezone"},"meeting_provider":{"$ref":"#/components/schemas/SessionMeetingProvider"},"join_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Join Url"},"title":{"type":"string","title":"Title"},"planned_topics":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Planned Topics"},"actual_topics_covered":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actual Topics Covered"},"recording_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recording Url"},"recording_uploaded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Recording Uploaded At"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"},"status":{"$ref":"#/components/schemas/SessionStatus"},"created_by_internal_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created By Internal User Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"tasks":{"items":{"$ref":"#/components/schemas/SessionTaskResponse"},"type":"array","title":"Tasks","default":[]}},"type":"object","required":["id","cohort_id","type","focus_scope","subject_skill_node_id","led_by_internal_user_id","scheduled_at","duration_minutes","timezone","meeting_provider","join_url","title","planned_topics","actual_topics_covered","recording_url","notes","status","created_by_internal_user_id","created_at","updated_at"],"title":"SessionResponse"},"SessionStatus":{"type":"string","enum":["planned","completed","cancelled"],"title":"SessionStatus","description":"Lifecycle of a Session.\n\n- planned: scheduled but not yet held\n- completed: held; recording_url + actual_topics_covered may be set\n- cancelled: held off / rescheduled away; attendance not collected"},"SessionStatusTransitionRequest":{"properties":{"target":{"$ref":"#/components/schemas/SessionStatus"},"actual_topics_covered":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actual Topics Covered"},"recording_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recording Url"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","required":["target"],"title":"SessionStatusTransitionRequest","description":"POST /api/internal/sessions/{id}/transition."},"SessionTaskCreate":{"properties":{"kind":{"$ref":"#/components/schemas/SessionTaskKind"},"task_type":{"$ref":"#/components/schemas/TaskType"},"lesson_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lesson Id"},"assessment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Assessment Id"},"skill_node_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Skill Node Id"},"drill_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Drill Config"},"display_order":{"type":"integer","minimum":0.0,"title":"Display Order","default":0},"due_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Due At"}},"type":"object","required":["kind","task_type"],"title":"SessionTaskCreate","description":"POST /api/internal/sessions/{id}/tasks. Shape validation per the\nCHECK constraint on session_tasks happens DB-side; the service\nraises a friendly ValueError if the combo is wrong."},"SessionTaskKind":{"type":"string","enum":["pre_work","mock_test","post_work"],"title":"SessionTaskKind","description":"Whether a SessionTask is pre-work, the mock itself, or post-work.\n\nPre-work surfaces before the session starts; post-work surfaces\nafter `completed` status is reached. `mock_test` is the proctored\nmock the student sits during a `mock_test_proctored` session — it\nhas neither the pre- nor post-work semantics (no unlock-after-session\ngating; it's time-gated to the session window in the UI instead).\n\nMember order is meaningful: SQLAlchemy builds the native `sessiontaskkind`\nPostgres enum in this declaration order, and the classroom home orders\ntasks by `kind` (native enums sort by label order), so pre -> mock -> post\nis the intended display sequence. The Alembic migration adds `mock_test`\nwith `BEFORE 'post_work'` to match this on already-migrated databases."},"SessionTaskResponse":{"properties":{"id":{"type":"integer","title":"Id"},"session_id":{"type":"integer","title":"Session Id"},"kind":{"$ref":"#/components/schemas/SessionTaskKind"},"task_type":{"$ref":"#/components/schemas/TaskType"},"lesson_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lesson Id"},"assessment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Assessment Id"},"skill_node_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Skill Node Id"},"drill_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Drill Config"},"display_order":{"type":"integer","title":"Display Order"},"due_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Due At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At"},"archived_by_internal_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Archived By Internal User Id"},"lesson_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lesson Title"},"lesson_content_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lesson Content Type"},"assessment_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assessment Title"},"skill_node_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Skill Node Title"}},"type":"object","required":["id","session_id","kind","task_type","lesson_id","assessment_id","skill_node_id","drill_config","display_order","due_at","created_at","updated_at"],"title":"SessionTaskResponse"},"SessionTaskUpdate":{"properties":{"kind":{"anyOf":[{"$ref":"#/components/schemas/SessionTaskKind"},{"type":"null"}]},"task_type":{"anyOf":[{"$ref":"#/components/schemas/TaskType"},{"type":"null"}]},"lesson_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lesson Id"},"assessment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Assessment Id"},"skill_node_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Skill Node Id"},"drill_config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Drill Config"},"display_order":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Display Order"},"due_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Due At"}},"type":"object","title":"SessionTaskUpdate","description":"PATCH /api/internal/sessions/{id}/tasks/{task_id} — all fields\noptional. session_task_service.update_task enforces the CHECK\nconstraint shape; mixing incompatible refs raises 422."},"SessionType":{"type":"string","enum":["live_instruction","proctored_practice","doubt_clarification","mock_test_proctored"],"title":"SessionType","description":"Kind of meeting a Session represents.\n\n`one_on_one_feedback` is intentionally absent — deferred to Stream 2\nwhen the Cal.com booking integration lands."},"SessionUpdate":{"properties":{"type":{"anyOf":[{"$ref":"#/components/schemas/SessionType"},{"type":"null"}]},"led_by_internal_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Led By Internal User Id"},"scheduled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled At"},"duration_minutes":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Duration Minutes"},"title":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Title"},"focus_scope":{"anyOf":[{"$ref":"#/components/schemas/SessionFocusScope"},{"type":"null"}]},"subject_skill_node_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Subject Skill Node Id"},"meeting_provider":{"anyOf":[{"$ref":"#/components/schemas/SessionMeetingProvider"},{"type":"null"}]},"join_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Join Url"},"planned_topics":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Planned Topics"},"actual_topics_covered":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actual Topics Covered"},"recording_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recording Url"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"SessionUpdate","description":"PATCH /api/internal/sessions/{id} — all fields optional."},"SetPredictedScoreRequest":{"properties":{"predicted_score":{"type":"integer","maximum":1600.0,"minimum":400.0,"title":"Predicted Score","description":"Total predicted score (400-1600)"},"math_score":{"type":"integer","maximum":800.0,"minimum":200.0,"title":"Math Score","description":"Math section score (200-800)"},"rw_score":{"type":"integer","maximum":800.0,"minimum":200.0,"title":"Rw Score","description":"R&W section score (200-800)"},"trigger_type":{"$ref":"#/components/schemas/TriggerType","description":"What triggered this score update"},"trigger_reference_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Trigger Reference Id","description":"ID of assessment that triggered this"},"confidence_level":{"$ref":"#/components/schemas/ConfidenceLevel","description":"Confidence level for this prediction","default":"low"},"note":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Note","description":"Optional note about this score"}},"type":"object","required":["predicted_score","math_score","rw_score","trigger_type"],"title":"SetPredictedScoreRequest","description":"Request to set/update predicted score.\nUsed after diagnostic or mock test completion.","example":{"confidence_level":"low","math_score":600,"note":"Based on diagnostic test","predicted_score":1200,"rw_score":600,"trigger_reference_id":1,"trigger_type":"diagnostic_completed"}},"SetScoreResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"predicted_score":{"type":"integer","title":"Predicted Score"},"math_score":{"type":"integer","title":"Math Score"},"rw_score":{"type":"integer","title":"Rw Score"},"confidence_level":{"$ref":"#/components/schemas/ConfidenceLevel"},"history_id":{"type":"integer","title":"History Id","description":"ID of the created history record"}},"type":"object","required":["success","predicted_score","math_score","rw_score","confidence_level","history_id"],"title":"SetScoreResponse","description":"Response after setting a predicted score.","example":{"confidence_level":"low","history_id":1,"math_score":600,"predicted_score":1200,"rw_score":600,"success":true}},"SetSkipAdminCopyRequest":{"properties":{"value":{"type":"boolean","title":"Value"}},"type":"object","required":["value"],"title":"SetSkipAdminCopyRequest","description":"PATCH /cohorts/{id}/reports/skip-admin-copy body."},"SimulateRequest":{"properties":{"user_id":{"type":"integer","title":"User Id"},"pace":{"type":"string","title":"Pace","default":"moderate"},"segment_duration_days":{"type":"integer","title":"Segment Duration Days","default":30}},"type":"object","required":["user_id"],"title":"SimulateRequest"},"SkillImpact":{"properties":{"external_id":{"type":"string","title":"External Id"},"found":{"type":"boolean","title":"Found"},"skill_node_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Skill Node Id"},"level":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Level"},"path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path"},"child_count":{"type":"integer","title":"Child Count","default":0},"question_count":{"type":"integer","title":"Question Count","default":0},"lesson_count":{"type":"integer","title":"Lesson Count","default":0},"mastery_count":{"type":"integer","title":"Mastery Count","default":0},"safe_to_delete":{"type":"boolean","title":"Safe To Delete","default":false}},"type":"object","required":["external_id","found"],"title":"SkillImpact"},"SkillNodeBase":{"properties":{"id":{"type":"integer","title":"Id"},"path":{"type":"string","title":"Path"},"code":{"type":"string","title":"Code"},"title":{"type":"string","title":"Title"},"level":{"type":"integer","title":"Level"},"exam":{"type":"string","title":"Exam"},"module":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Module"},"contribution_to_parent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Contribution To Parent"}},"type":"object","required":["id","path","code","title","level","exam","module","contribution_to_parent"],"title":"SkillNodeBase"},"SkillNodeFlatResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SkillNodeBase"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"SkillNodeFlatResponse"},"SkillNodeListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/SkillNodeResponse"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"SkillNodeListResponse"},"SkillNodePattern":{"properties":{"title":{"type":"string","title":"Title"},"domain":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Domain"},"total_wrong":{"type":"integer","title":"Total Wrong"},"mistake_categories":{"additionalProperties":{"type":"integer"},"type":"object","title":"Mistake Categories","default":{}},"common_errors":{"items":{"type":"integer"},"type":"array","title":"Common Errors","default":[]}},"type":"object","required":["title","total_wrong"],"title":"SkillNodePattern","description":"Mistake pattern aggregated by SkillNode (Task 4.14 data-driven)."},"SkillNodePublish":{"properties":{"external_id":{"type":"string","maxLength":50,"title":"External Id"},"parent_external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent External Id"},"level":{"type":"integer","maximum":3.0,"minimum":0.0,"title":"Level"},"title":{"type":"string","maxLength":200,"minLength":1,"title":"Title"},"code":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Code"},"module":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Module"},"position":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Position"},"is_active":{"type":"boolean","title":"Is Active","default":true}},"additionalProperties":false,"type":"object","required":["external_id","level","title"],"title":"SkillNodePublish"},"SkillNodeResponse":{"properties":{"id":{"type":"integer","title":"Id"},"path":{"type":"string","title":"Path"},"code":{"type":"string","title":"Code"},"title":{"type":"string","title":"Title"},"level":{"type":"integer","title":"Level"},"exam":{"type":"string","title":"Exam"},"module":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Module"},"parent_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Parent Id"},"num_children":{"type":"integer","title":"Num Children"},"is_leaf":{"type":"boolean","title":"Is Leaf"},"contribution_to_parent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Contribution To Parent"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"position":{"type":"integer","title":"Position"}},"type":"object","required":["id","path","code","title","level","exam","module","parent_id","num_children","is_leaf","contribution_to_parent","description","position"],"title":"SkillNodeResponse"},"SkillNodeUpdateRequest":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"position":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Position"},"contribution_to_parent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Contribution To Parent"}},"type":"object","title":"SkillNodeUpdateRequest","description":"Update editable fields only. Path/code/exam/module/structure are read-only."},"SkillPublishResult":{"properties":{"external_id":{"type":"string","title":"External Id"},"action":{"type":"string","enum":["created","updated","unchanged"],"title":"Action"},"skill_node_id":{"type":"integer","title":"Skill Node Id"},"path":{"type":"string","title":"Path"}},"type":"object","required":["external_id","action","skill_node_id","path"],"title":"SkillPublishResult"},"SkillsPublishRequest":{"properties":{"source_system":{"type":"string","title":"Source System"},"exam":{"type":"string","title":"Exam"},"dry_run":{"type":"boolean","title":"Dry Run","default":false},"skills":{"items":{"$ref":"#/components/schemas/SkillNodePublish"},"type":"array","maxItems":1000,"minItems":1,"title":"Skills"}},"additionalProperties":false,"type":"object","required":["source_system","exam","skills"],"title":"SkillsPublishRequest"},"SkillsPublishResponse":{"properties":{"dry_run":{"type":"boolean","title":"Dry Run"},"created":{"type":"integer","title":"Created"},"updated":{"type":"integer","title":"Updated"},"unchanged":{"type":"integer","title":"Unchanged"},"failed":{"type":"integer","title":"Failed"},"results":{"items":{"$ref":"#/components/schemas/SkillPublishResult"},"type":"array","title":"Results"},"errors":{"items":{"$ref":"#/components/schemas/PublishItemError"},"type":"array","title":"Errors"}},"type":"object","required":["dry_run","created","updated","unchanged","failed"],"title":"SkillsPublishResponse"},"SkipDataCollectionRequest":{"properties":{"field_type":{"type":"string","title":"Field Type"}},"type":"object","required":["field_type"],"title":"SkipDataCollectionRequest","description":"Request to skip a data collection modal."},"SkipDataCollectionResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"field_type":{"type":"string","title":"Field Type"},"skip_count":{"type":"integer","title":"Skip Count"},"can_skip_again":{"type":"boolean","title":"Can Skip Again"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","field_type","skip_count","can_skip_again","message"],"title":"SkipDataCollectionResponse","description":"Response after skipping data collection."},"SourcesResponse":{"properties":{"country":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Country"},"app_source":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"App Source"},"entry_page":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Entry Page"},"coverage":{"additionalProperties":{"type":"integer"},"type":"object","title":"Coverage"}},"type":"object","required":["country","app_source","entry_page","coverage"],"title":"SourcesResponse"},"SponsorInterestCreate":{"properties":{"partner_slug":{"type":"string","maxLength":50,"minLength":1,"title":"Partner Slug"},"partner_name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Partner Name"}},"type":"object","required":["partner_slug"],"title":"SponsorInterestCreate"},"SponsorInterestResponse":{"properties":{"status":{"type":"string","title":"Status"},"partner_slug":{"type":"string","title":"Partner Slug"}},"type":"object","required":["status","partner_slug"],"title":"SponsorInterestResponse"},"StaffFeedbackPackage":{"properties":{"package_id":{"type":"integer","title":"Package Id"},"granted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Granted At"},"state":{"type":"string","title":"State"},"user_id":{"type":"integer","title":"User Id"},"student_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Student Name"},"student_email":{"type":"string","title":"Student Email"},"mock_attempt_id":{"type":"integer","title":"Mock Attempt Id"},"mock_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mock Title"},"mock_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mock Score"},"mock_completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Mock Completed At"},"sessions":{"items":{"$ref":"#/components/schemas/StaffFeedbackSession"},"type":"array","title":"Sessions","default":[]}},"type":"object","required":["package_id","state","user_id","student_email","mock_attempt_id"],"title":"StaffFeedbackPackage","description":"A Structured Prep student's feedback package for one study-plan mock."},"StaffFeedbackPackageList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/StaffFeedbackPackage"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"page":{"type":"integer","title":"Page"},"page_size":{"type":"integer","title":"Page Size"},"state_counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"State Counts","default":{}}},"type":"object","required":["items","total","page","page_size"],"title":"StaffFeedbackPackageList"},"StaffFeedbackSession":{"properties":{"id":{"type":"integer","title":"Id"},"subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject"},"status":{"type":"string","title":"Status"},"scheduled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Scheduled At"},"instructor_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Instructor Id"},"instructor_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructor Name"},"meeting_link":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meeting Link"},"instructor_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Instructor Notes"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"}},"type":"object","required":["id","status"],"title":"StaffFeedbackSession","description":"One booked session, as teaching staff see it."},"StaffInstructorOverview":{"properties":{"math":{"$ref":"#/components/schemas/StaffSubjectInstructor"},"rw":{"$ref":"#/components/schemas/StaffSubjectInstructor"},"can_edit":{"type":"boolean","title":"Can Edit","default":false}},"type":"object","required":["math","rw"],"title":"StaffInstructorOverview"},"StaffInstructorRef":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"email":{"type":"string","title":"Email"}},"type":"object","required":["id","name","email"],"title":"StaffInstructorRef"},"StaffSetInstructorRequest":{"properties":{"internal_user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Internal User Id"}},"type":"object","title":"StaffSetInstructorRequest"},"StaffSubjectInstructor":{"properties":{"instructor":{"anyOf":[{"$ref":"#/components/schemas/StaffInstructorRef"},{"type":"null"}]},"bookable":{"type":"boolean","title":"Bookable","default":false},"candidates":{"items":{"$ref":"#/components/schemas/StaffInstructorRef"},"type":"array","title":"Candidates","default":[]}},"type":"object","title":"StaffSubjectInstructor","description":"Who takes one subject's sessions, and who could be assigned to it."},"StaffUpdateSessionRequest":{"properties":{"status":{"anyOf":[{"type":"string","enum":["scheduled","completed","no_show"]},{"type":"null"}],"title":"Status"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes"}},"type":"object","title":"StaffUpdateSessionRequest","description":"Set a session's status, its notes, or both. A field left out is not changed."},"StartDrillRequest":{"properties":{"subject_code":{"anyOf":[{"type":"string","pattern":"^(math|reading_writing)$"},{"type":"null"}],"title":"Subject Code","description":"Filter by subject: 'math' or 'reading_writing'"},"topic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topic","description":"Filter by specific topic (e.g., 'Algebra')"},"skill_node_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Skill Node Id","description":"Filter by skill node ID (#350). Selects questions whose skill_node_id is this node or any descendant in the taxonomy. Takes precedence over topic."},"difficulty":{"anyOf":[{"type":"string","pattern":"^(easy|medium|hard)$"},{"type":"null"}],"title":"Difficulty","description":"Filter by difficulty: 'easy', 'medium', or 'hard'"},"is_timed":{"type":"boolean","title":"Is Timed","description":"Whether the drill should be timed (15 min for 10 questions)","default":false},"question_count":{"anyOf":[{"type":"integer","maximum":10.0,"minimum":5.0},{"type":"null"}],"title":"Question Count","description":"Number of questions (5 or 10). Defaults to 10."},"session_task_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Session Task Id","description":"Classroom SessionTask id this drill was launched from. Stamped onto the resulting AssessmentAttempt so completion tracking for the task can find this drill via strong link."}},"type":"object","title":"StartDrillRequest","description":"Request to start a new drill session.\n\nAll filters are optional. If not provided, questions are selected\nrandomly from the entire FREE_PRACTICE pool."},"StartDrillResponse":{"properties":{"attempt_id":{"type":"integer","title":"Attempt Id"},"questions":{"items":{"$ref":"#/components/schemas/DrillQuestionResponse"},"type":"array","title":"Questions"},"question_count":{"type":"integer","title":"Question Count","default":10},"time_limit_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Time Limit Minutes","description":"Optional time limit for the drill"},"started_at":{"type":"string","format":"date-time","title":"Started At"}},"type":"object","required":["attempt_id","questions","started_at"],"title":"StartDrillResponse","description":"Response when starting a new drill."},"StartImpersonationRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Reason","description":"Optional justification, recorded on the audit row."}},"type":"object","required":["email"],"title":"StartImpersonationRequest"},"StartImpersonationResponse":{"properties":{"access_token":{"type":"string","title":"Access Token"},"token_type":{"type":"string","title":"Token Type"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"read_only":{"type":"boolean","title":"Read Only"},"session_id":{"type":"integer","title":"Session Id"},"user":{"$ref":"#/components/schemas/ImpersonatedUser"}},"type":"object","required":["access_token","token_type","expires_at","read_only","session_id","user"],"title":"StartImpersonationResponse"},"StatusRequest":{"properties":{"exams":{"items":{"type":"string"},"type":"array","title":"Exams"}},"type":"object","title":"StatusRequest"},"StreakShareRequest":{"properties":{"platform":{"type":"string","title":"Platform","description":"Share platform: whatsapp, twitter, copy, download"},"streak_at_share":{"type":"integer","title":"Streak At Share","description":"Streak count at time of share"}},"type":"object","required":["platform","streak_at_share"],"title":"StreakShareRequest","description":"Request to record a streak share event (#65)."},"StreakShareResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"share_count":{"type":"integer","title":"Share Count","description":"Total times user has shared"},"platform":{"type":"string","title":"Platform"},"streak_shared":{"type":"integer","title":"Streak Shared"}},"type":"object","required":["success","share_count","platform","streak_shared"],"title":"StreakShareResponse","description":"Response after recording streak share (#65)."},"StrictCountryPricing":{"properties":{"price":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Price","description":"Price in major units; a zero override would break checkout for that country"},"currency":{"type":"string","title":"Currency","description":"ISO 4217 currency code (normalized to uppercase)"}},"additionalProperties":false,"type":"object","required":["price","currency"],"title":"StrictCountryPricing","description":"Resolver-contract-strict override for the #855 catalog editor.\n\n`resolve_pricing_for_package` reads EXACT-case keys and the exact\n{price, currency} field names — a lowercase 'default' key or a legacy\n'amount' field would be silently ignored at checkout (wrong price sold).\nSo this schema rejects unknown fields loudly, and the catalog update\nschema below rejects non-uppercase keys loudly."},"StuckOrdersCount":{"properties":{"stuck_count":{"type":"integer","title":"Stuck Count"},"retry_threshold":{"type":"integer","title":"Retry Threshold"},"pending_grace_minutes":{"type":"integer","title":"Pending Grace Minutes"}},"type":"object","required":["stuck_count","retry_threshold","pending_grace_minutes"],"title":"StuckOrdersCount","description":"Pager-threshold query result — orders needing human attention."},"StudentAssignmentHistoryRow":{"properties":{"session_title":{"type":"string","title":"Session Title"},"prework":{"type":"string","title":"Prework"},"homework":{"type":"string","title":"Homework"}},"type":"object","required":["session_title","prework","homework"],"title":"StudentAssignmentHistoryRow"},"StudentAttention":{"properties":{"student_id":{"type":"integer","title":"Student Id"},"student_name":{"type":"string","title":"Student Name"},"outstanding":{"items":{"$ref":"#/components/schemas/OutstandingItem"},"type":"array","title":"Outstanding"}},"type":"object","required":["student_id","student_name","outstanding"],"title":"StudentAttention"},"StudentCreate":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"first_name":{"type":"string","maxLength":255,"minLength":1,"title":"First Name"},"last_name":{"type":"string","maxLength":255,"title":"Last Name","default":""},"phone":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Phone"},"parent_name":{"type":"string","maxLength":255,"minLength":1,"title":"Parent Name"},"parent_email":{"type":"string","format":"email","title":"Parent Email"},"parent_phone":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Parent Phone"},"country":{"anyOf":[{"type":"string","maxLength":5},{"type":"null"}],"title":"Country"},"grade":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Grade"},"school_board":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"School Board"}},"type":"object","required":["email","first_name","parent_name","parent_email"],"title":"StudentCreate","description":"Single-student create payload — #347g manual enrollment form.\nSame shape as RosterRow but parent_name + parent_email are required\nat the schema level (UI form enforces too)."},"StudentDrillAssignmentRow":{"properties":{"task_id":{"type":"integer","title":"Task Id"},"session_title":{"type":"string","title":"Session Title"},"kind":{"type":"string","title":"Kind"},"topic":{"type":"string","title":"Topic"},"is_timed":{"type":"boolean","title":"Is Timed"},"status":{"type":"string","title":"Status"},"score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Score"},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total"},"accuracy":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Accuracy"}},"type":"object","required":["task_id","session_title","kind","topic","is_timed","status","score","total","accuracy"],"title":"StudentDrillAssignmentRow","description":"A practice-drill assignment + this student's result (#856-P2c).\n\nEach student gets random questions from the topic, so the row links to a\nper-student question-wise review rather than a shared answer key."},"StudentDrillReviewResponse":{"properties":{"task_id":{"type":"integer","title":"Task Id"},"session_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Title"},"topic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topic"},"is_timed":{"type":"boolean","title":"Is Timed","default":false},"student_name":{"type":"string","title":"Student Name"},"results":{"$ref":"#/components/schemas/DrillResultsResponse"}},"type":"object","required":["task_id","student_name","results"],"title":"StudentDrillReviewResponse","description":"Instructor-facing question-wise review of a student's drill (#856-P2c).\n\nWraps the existing per-question DrillResultsResponse with the classroom\ncontext (which assignment / topic / student) so the internal Student View\ncan open a standalone review page from a SessionTask link."},"StudentMockRow":{"properties":{"attempt_id":{"type":"integer","title":"Attempt Id"},"label":{"type":"string","title":"Label"},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total"},"math":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Math"},"rw":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rw"},"improvement_vs_previous":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Improvement Vs Previous"},"improvement_vs_baseline":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Improvement Vs Baseline"}},"type":"object","required":["attempt_id","label","total","math","rw","improvement_vs_previous","improvement_vs_baseline"],"title":"StudentMockRow"},"StudentOutstandingItem":{"properties":{"type":{"type":"string","title":"Type"},"session_title":{"type":"string","title":"Session Title"},"status":{"type":"string","title":"Status","default":"overdue"}},"type":"object","required":["type","session_title"],"title":"StudentOutstandingItem"},"StudentParticipation":{"properties":{"batch_class_attendance_pct":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Batch Class Attendance Pct"},"hw_proctoring_attendance_pct":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Hw Proctoring Attendance Pct"},"mock_proctoring_attendance_pct":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mock Proctoring Attendance Pct"},"doubt_attendance_pct":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Doubt Attendance Pct"},"avg_engagement":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Engagement"}},"type":"object","required":["batch_class_attendance_pct","hw_proctoring_attendance_pct","mock_proctoring_attendance_pct","doubt_attendance_pct","avg_engagement"],"title":"StudentParticipation"},"StudentTimelineEvent":{"properties":{"date":{"type":"string","title":"Date"},"activity":{"type":"string","title":"Activity"},"status":{"type":"string","title":"Status"},"remark":{"type":"string","title":"Remark"}},"type":"object","required":["date","activity","status","remark"],"title":"StudentTimelineEvent"},"StudentViewResponse":{"properties":{"student_id":{"type":"integer","title":"Student Id"},"student_name":{"type":"string","title":"Student Name"},"outstanding_work":{"items":{"$ref":"#/components/schemas/StudentOutstandingItem"},"type":"array","title":"Outstanding Work"},"mock_performance":{"items":{"$ref":"#/components/schemas/StudentMockRow"},"type":"array","title":"Mock Performance"},"participation":{"$ref":"#/components/schemas/StudentParticipation"},"assignment_history":{"items":{"$ref":"#/components/schemas/StudentAssignmentHistoryRow"},"type":"array","title":"Assignment History"},"drill_assignments":{"items":{"$ref":"#/components/schemas/StudentDrillAssignmentRow"},"type":"array","title":"Drill Assignments","default":[]},"activity_timeline":{"items":{"$ref":"#/components/schemas/StudentTimelineEvent"},"type":"array","title":"Activity Timeline"}},"type":"object","required":["student_id","student_name","outstanding_work","mock_performance","participation","assignment_history","activity_timeline"],"title":"StudentViewResponse"},"StudyCorrelation":{"properties":{"studied_topics":{"$ref":"#/components/schemas/TopicStats"},"unstudied_topics":{"$ref":"#/components/schemas/TopicStats"},"study_impact":{"type":"number","title":"Study Impact"}},"type":"object","required":["studied_topics","unstudied_topics","study_impact"],"title":"StudyCorrelation","description":"Correlation between study plan completion and performance."},"StudyPlanCreate":{"properties":{"target_date":{"type":"string","format":"date-time","title":"Target Date","description":"Target exam date"},"pace":{"$ref":"#/components/schemas/PlanPaceEnum","description":"Study intensity","default":"moderate"},"study_days_of_week":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Study Days Of Week","description":"Days of the week the student is available (0=Mon..6=Sun). Defaults to all 7 days if not specified."},"diagnostic_attempt_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Diagnostic Attempt Id","description":"Optional diagnostic attempt that seeded mastery"}},"type":"object","required":["target_date"],"title":"StudyPlanCreate","description":"Request schema for creating a new study plan."},"StudyPlanReplanRequest":{"properties":{"pace":{"anyOf":[{"$ref":"#/components/schemas/PlanPaceEnum"},{"type":"null"}],"description":"New pace (optional)"},"target_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Target Date","description":"New target exam date (optional)"},"study_days_of_week":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Study Days Of Week","description":"New study days preference (optional)"}},"type":"object","title":"StudyPlanReplanRequest","description":"Request schema for replanning the current segment with new settings."},"StudyPlanResponse":{"properties":{"id":{"type":"integer","title":"Id"},"user_id":{"type":"integer","title":"User Id"},"target_date":{"type":"string","format":"date-time","title":"Target Date"},"pace":{"type":"string","title":"Pace"},"total_days":{"type":"integer","title":"Total Days"},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date"},"source":{"type":"string","title":"Source"},"is_active":{"type":"boolean","title":"Is Active"},"diagnostic_attempt_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Diagnostic Attempt Id"},"study_days_of_week":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Study Days Of Week"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"current_segment_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Current Segment Number"},"total_segments":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Segments"},"active_segment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Active Segment Id"},"scheduled_task_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Scheduled Task Count"},"adjust_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Adjust Limit"},"adjustments_used":{"type":"integer","title":"Adjustments Used","default":0},"adjust_limit_exhausted":{"type":"boolean","title":"Adjust Limit Exhausted","default":false}},"type":"object","required":["id","user_id","target_date","pace","total_days","source","is_active","created_at"],"title":"StudyPlanResponse","description":"Full study plan details, segment-aware."},"StudyPlanSummaryResponse":{"properties":{"total_tasks":{"type":"integer","title":"Total Tasks"},"completed_tasks":{"type":"integer","title":"Completed Tasks"},"skipped_tasks":{"type":"integer","title":"Skipped Tasks"},"in_progress_tasks":{"type":"integer","title":"In Progress Tasks"},"pace":{"type":"string","title":"Pace"},"target_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Date"},"study_days_of_week":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Study Days Of Week"},"streak_days":{"type":"integer","title":"Streak Days","default":0},"longest_streak_days":{"type":"integer","title":"Longest Streak Days","default":0},"adherence_rate":{"type":"number","title":"Adherence Rate","default":1.0},"expected_tasks_by_today":{"type":"integer","title":"Expected Tasks By Today","default":0},"overdue_tasks":{"type":"integer","title":"Overdue Tasks","default":0}},"type":"object","required":["total_tasks","completed_tasks","skipped_tasks","in_progress_tasks","pace","target_date"],"title":"StudyPlanSummaryResponse","description":"Summary statistics for a study plan across all segments."},"StudyPlanWithSummary":{"properties":{"id":{"type":"integer","title":"Id"},"user_id":{"type":"integer","title":"User Id"},"target_date":{"type":"string","format":"date-time","title":"Target Date"},"pace":{"type":"string","title":"Pace"},"total_days":{"type":"integer","title":"Total Days"},"start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start Date"},"source":{"type":"string","title":"Source"},"is_active":{"type":"boolean","title":"Is Active"},"diagnostic_attempt_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Diagnostic Attempt Id"},"study_days_of_week":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Study Days Of Week"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"current_segment_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Current Segment Number"},"total_segments":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Segments"},"active_segment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Active Segment Id"},"scheduled_task_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Scheduled Task Count"},"adjust_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Adjust Limit"},"adjustments_used":{"type":"integer","title":"Adjustments Used","default":0},"adjust_limit_exhausted":{"type":"boolean","title":"Adjust Limit Exhausted","default":false},"summary":{"$ref":"#/components/schemas/StudyPlanSummaryResponse"},"is_trial":{"type":"boolean","title":"Is Trial","default":false},"visible_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Visible Days"},"upgrade_cta":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Upgrade Cta"}},"type":"object","required":["id","user_id","target_date","pace","total_days","source","is_active","created_at","summary"],"title":"StudyPlanWithSummary","description":"Study plan with summary statistics + trial visibility flags."},"SubjectBookingOptions":{"properties":{"booked":{"type":"boolean","title":"Booked"},"auto":{"anyOf":[{"$ref":"#/components/schemas/InstructorOption"},{"type":"null"}]},"instructors":{"items":{"$ref":"#/components/schemas/InstructorOption"},"type":"array","title":"Instructors","default":[]}},"type":"object","required":["booked"],"title":"SubjectBookingOptions","description":"Booking state for one subject (math/rw) within a package."},"SubmitAssessmentRequest":{"properties":{"responses":{"items":{"$ref":"#/components/schemas/SaveResponseRequest"},"type":"array","title":"Responses"}},"type":"object","title":"SubmitAssessmentRequest","description":"Optional `responses` array — same shape as save-response. dmango\naccepts an empty body, so all fields default."},"SubmitResponse":{"properties":{"is_correct":{"type":"boolean","title":"Is Correct"},"correct_answer":{"type":"string","title":"Correct Answer"},"explanation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Explanation"},"attempt_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Attempt Id"}},"type":"object","required":["is_correct","correct_answer"],"title":"SubmitResponse","description":"Response after submitting an answer."},"SubtopicCount":{"properties":{"name":{"type":"string","title":"Name"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["name","count"],"title":"SubtopicCount","description":"Subtopic with question count."},"TaskProgressResponse":{"properties":{"id":{"type":"integer","title":"Id"},"progress_id":{"type":"integer","title":"Progress Id"},"task_type":{"type":"string","title":"Task Type"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"calendar_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Calendar Date"},"sequence_in_day":{"type":"integer","title":"Sequence In Day"},"estimated_duration_minutes":{"type":"integer","title":"Estimated Duration Minutes"},"status":{"type":"string","title":"Status"},"topic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topic"},"subtopic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtopic"},"skill_node_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Skill Node Id"},"lesson_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lesson Id"},"assessment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Assessment Id"},"segment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Segment Id"},"module":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Module"},"score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Score"},"time_spent_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Time Spent Minutes"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"lesson_available":{"type":"boolean","title":"Lesson Available","default":true},"is_overdue":{"type":"boolean","title":"Is Overdue","default":false},"completed_attempt_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Completed Attempt Id"},"mock_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mock Number"}},"type":"object","required":["id","progress_id","task_type","title","sequence_in_day","estimated_duration_minutes","status"],"title":"TaskProgressResponse","description":"Task with progress status and calendar placement."},"TaskSkipResponse":{"properties":{"progress_id":{"type":"integer","title":"Progress Id"},"status":{"type":"string","title":"Status"}},"type":"object","required":["progress_id","status"],"title":"TaskSkipResponse","description":"Response when skipping a task."},"TaskStartResponse":{"properties":{"progress_id":{"type":"integer","title":"Progress Id"},"task_id":{"type":"integer","title":"Task Id"},"status":{"type":"string","title":"Status"},"started_at":{"type":"string","format":"date-time","title":"Started At"}},"type":"object","required":["progress_id","task_id","status","started_at"],"title":"TaskStartResponse","description":"Response when starting a task."},"TaskType":{"type":"string","enum":["lesson","practice","timed_practice","section_test","mock_test","mock_review","review","weekly_recap","warm_up","confidence_test"],"title":"TaskType","description":"Types of study tasks in a plan (#224 Redesign, extended #355).\n\nTask types and their purpose:\n- LESSON: HTML slide lesson at subskill level\n- PRACTICE: Untimed drill at skill level\n- TIMED_PRACTICE: Timed drill at skill level\n- SECTION_TEST: Multi-skill assessment (periodic)\n- MOCK_TEST: Full SAT simulation (at milestones)\n- MOCK_REVIEW: Reflection-driven review of a completed mock (#355)\n- REVIEW: Spaced repetition of a skill\n- WEEKLY_RECAP: Progress summary with nudges"},"TelemetryEventRequest":{"properties":{"event":{"type":"string","title":"Event"},"props":{"additionalProperties":true,"type":"object","title":"Props"}},"type":"object","required":["event"],"title":"TelemetryEventRequest","description":"Fire-and-forget client event (section_started, question_viewed, etc.).\n\nLoose schema — we capture event + props and log structured. No\nstorage table for now (matches cux's Mixpanel-equivalent pattern);\nwe only persist these to stdout/Cloud Logging so the ops + analytics\nteams can ingest from there."},"TelemetryEventResponse":{"properties":{"accepted":{"type":"boolean","title":"Accepted"}},"type":"object","required":["accepted"],"title":"TelemetryEventResponse"},"TestimonialCreate":{"properties":{"student_name":{"type":"string","maxLength":100,"minLength":1,"title":"Student Name"},"score_improvement":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Score Improvement"},"quote":{"type":"string","maxLength":500,"minLength":10,"title":"Quote"},"avatar_url":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Avatar Url"},"university":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"University"},"year":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Year"},"featured":{"type":"boolean","title":"Featured","default":false},"display_order":{"type":"integer","title":"Display Order","default":0}},"type":"object","required":["student_name","quote"],"title":"TestimonialCreate"},"TestimonialImportItem":{"properties":{"student_name":{"type":"string","title":"Student Name"},"score_improvement":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Score Improvement"},"quote":{"type":"string","title":"Quote"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"university":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"University"},"year":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Year"},"featured":{"type":"boolean","title":"Featured","default":false},"display_order":{"type":"integer","title":"Display Order","default":0}},"type":"object","required":["student_name","quote"],"title":"TestimonialImportItem"},"TestimonialImportRequest":{"properties":{"testimonials":{"items":{"$ref":"#/components/schemas/TestimonialImportItem"},"type":"array","title":"Testimonials"}},"type":"object","required":["testimonials"],"title":"TestimonialImportRequest"},"TestimonialImportResponse":{"properties":{"total":{"type":"integer","title":"Total"},"imported":{"type":"integer","title":"Imported"},"errors":{"items":{"type":"string"},"type":"array","title":"Errors"}},"type":"object","required":["total","imported","errors"],"title":"TestimonialImportResponse"},"TestimonialResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"student_name":{"type":"string","title":"Student Name"},"score_improvement":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Score Improvement"},"quote":{"type":"string","title":"Quote"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Avatar Url"},"university":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"University"},"year":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Year"},"featured":{"type":"boolean","title":"Featured"},"display_order":{"type":"integer","title":"Display Order"},"is_active":{"type":"boolean","title":"Is Active"}},"type":"object","required":["id","student_name","score_improvement","quote","avatar_url","university","year","featured","display_order","is_active"],"title":"TestimonialResponse"},"TestimonialUpdate":{"properties":{"student_name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Student Name"},"score_improvement":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Score Improvement"},"quote":{"anyOf":[{"type":"string","maxLength":500,"minLength":10},{"type":"null"}],"title":"Quote"},"avatar_url":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Avatar Url"},"university":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"University"},"year":{"anyOf":[{"type":"string","maxLength":10},{"type":"null"}],"title":"Year"},"featured":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Featured"},"display_order":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Display Order"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"TestimonialUpdate"},"TierConfig":{"properties":{"tier":{"$ref":"#/components/schemas/UserTier"},"practice_questions_per_section":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Practice Questions Per Section","description":"None means unlimited"},"lessons_available":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lessons Available","description":"None means all"},"mock_tests_available":{"type":"integer","title":"Mock Tests Available"},"has_study_plan":{"type":"boolean","title":"Has Study Plan"},"feedback_sessions":{"type":"integer","title":"Feedback Sessions","default":0},"tutoring_hours":{"type":"integer","title":"Tutoring Hours","default":0},"is_paid":{"type":"boolean","title":"Is Paid","default":false}},"type":"object","required":["tier","mock_tests_available","has_study_plan"],"title":"TierConfig","description":"User's tier configuration and limits."},"TierInfo":{"properties":{"tier":{"$ref":"#/components/schemas/UserTier"},"trial_started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Trial Started At"},"trial_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Trial Expires At"},"trial_days_remaining":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Trial Days Remaining"},"is_trial_expired":{"type":"boolean","title":"Is Trial Expired","default":false},"features":{"additionalProperties":{"type":"boolean"},"type":"object","title":"Features"},"limits":{"additionalProperties":{"anyOf":[{"type":"integer"},{"type":"null"}]},"type":"object","title":"Limits"}},"type":"object","required":["tier","features","limits"],"title":"TierInfo","description":"Complete tier information for a user.\n\nIncludes:\n- Current tier\n- Trial status (if applicable)\n- Feature access map\n- Usage limits"},"TimeInsights":{"properties":{"avg_time_per_question":{"type":"number","title":"Avg Time Per Question"},"rushed_questions":{"items":{"type":"integer"},"type":"array","title":"Rushed Questions"},"overtime_questions":{"items":{"type":"integer"},"type":"array","title":"Overtime Questions"},"time_by_section":{"additionalProperties":{"type":"integer"},"type":"object","title":"Time By Section"},"time_vs_benchmark":{"additionalProperties":{"type":"number"},"type":"object","title":"Time Vs Benchmark"}},"type":"object","required":["avg_time_per_question","rushed_questions","overtime_questions","time_by_section","time_vs_benchmark"],"title":"TimeInsights","description":"Time management analysis data."},"TimeseriesResponse":{"properties":{"items":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Items"},"date_from":{"type":"string","title":"Date From"},"date_to":{"type":"string","title":"Date To"},"tz":{"type":"string","title":"Tz"}},"type":"object","required":["items","date_from","date_to","tz"],"title":"TimeseriesResponse"},"ToeflBestScore":{"properties":{"total":{"type":"integer","title":"Total"},"max_total":{"type":"integer","title":"Max Total","default":120},"source_name":{"type":"string","title":"Source Name","description":"Where this score came from, e.g. 'Mock 1'"},"source_assessment_engine_id":{"type":"integer","title":"Source Assessment Engine Id"},"attempted_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Attempted At"},"skill_bands":{"items":{"$ref":"#/components/schemas/ToeflSkillBand"},"type":"array","title":"Skill Bands"}},"type":"object","required":["total","source_name","source_assessment_engine_id"],"title":"ToeflBestScore","description":"Hero card — user's best iBT across completed Mocks + Diagnostic."},"ToeflDiagnostic":{"properties":{"assessment_engine_id":{"type":"integer","title":"Assessment Engine Id"},"name":{"type":"string","title":"Name"},"attempted":{"type":"boolean","title":"Attempted"},"best_total_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Best Total Score","description":"Best iBT total (0-120)"},"max_total_score":{"type":"integer","title":"Max Total Score","default":120},"last_attempt_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Attempt At"},"best_attempt_engine_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Best Attempt Engine Id","description":"engine_attempts.id of the best-scoring attempt; null if not attempted"}},"type":"object","required":["assessment_engine_id","name","attempted"],"title":"ToeflDiagnostic","description":"Diagnostic test state. `attempted` flips after the first completed\nattempt; the page then unlocks Mocks + Section tests."},"ToeflGuestCatalogResponse":{"properties":{"diagnostic":{"anyOf":[{"$ref":"#/components/schemas/ToeflGuestDiagnostic"},{"type":"null"}],"description":"null when no active TOEFL diagnostic is published"},"free_plan":{"$ref":"#/components/schemas/ToeflGuestFreePlan"},"mocks":{"items":{"type":"string"},"type":"array","title":"Mocks","description":"Full-mock display names, in unlock order"},"section_tests":{"items":{"$ref":"#/components/schemas/ToeflGuestSectionTestGroup"},"type":"array","title":"Section Tests"},"lessons":{"items":{"$ref":"#/components/schemas/ToeflGuestLessonGroup"},"type":"array","title":"Lessons"}},"type":"object","title":"ToeflGuestCatalogResponse","description":"What a paying TOEFL user gets, by name only — no ids, no content.\n\nA guest needs to know what exists to decide whether to sign up; anything\nbeyond names is what the paid tiers sell. Keeping ids out is also what\nmakes the response identical for every anonymous visitor, hence cacheable."},"ToeflGuestDiagnostic":{"properties":{"name":{"type":"string","title":"Name"},"duration_mins":{"type":"integer","title":"Duration Mins","description":"Total assessment time in minutes; 0 when unset on the assessment","default":0}},"type":"object","required":["name"],"title":"ToeflGuestDiagnostic"},"ToeflGuestFreePlan":{"properties":{"mocks":{"type":"integer","title":"Mocks","default":0},"section_tests":{"type":"integer","title":"Section Tests","default":0},"lessons":{"type":"integer","title":"Lessons","default":0}},"type":"object","title":"ToeflGuestFreePlan","description":"Free-tier allowances, read live off the seeded Free TOEFL package.\n\nClients must render these rather than hardcoding a tier table — the\nallowances are server-seeded and change without an app release."},"ToeflGuestLesson":{"properties":{"name":{"type":"string","title":"Name"},"minutes":{"type":"integer","title":"Minutes","default":0}},"type":"object","required":["name"],"title":"ToeflGuestLesson"},"ToeflGuestLessonGroup":{"properties":{"skill":{"type":"string","title":"Skill","description":"listening | reading | speaking | writing"},"label":{"type":"string","title":"Label"},"lessons":{"items":{"$ref":"#/components/schemas/ToeflGuestLesson"},"type":"array","title":"Lessons"}},"type":"object","required":["skill","label"],"title":"ToeflGuestLessonGroup"},"ToeflGuestSectionTestGroup":{"properties":{"skill":{"type":"string","title":"Skill","description":"listening | reading | speaking | writing"},"label":{"type":"string","title":"Label"},"tests":{"items":{"type":"string"},"type":"array","title":"Tests","description":"Section-test display names, in unlock order"}},"type":"object","required":["skill","label"],"title":"ToeflGuestSectionTestGroup"},"ToeflHomeResponse":{"properties":{"tier":{"type":"string","title":"Tier"},"package_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Package Name"},"upgrade_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Upgrade Url"},"subscription_active_from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription Active From","description":"ISO date the user's TOEFL subscription started (null for guests / no sub)"},"subscription_expires_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subscription Expires At","description":"ISO date the TOEFL subscription expires (null for non-expiring or no sub)"},"has_taken_diagnostic":{"type":"boolean","title":"Has Taken Diagnostic"},"diagnostic":{"anyOf":[{"$ref":"#/components/schemas/ToeflDiagnostic"},{"type":"null"}]},"sample_test":{"anyOf":[{"$ref":"#/components/schemas/ToeflSampleTest"},{"type":"null"}]},"best_score":{"anyOf":[{"$ref":"#/components/schemas/ToeflBestScore"},{"type":"null"}]},"mocks":{"$ref":"#/components/schemas/ToeflMocksBlock"},"section_groups":{"$ref":"#/components/schemas/ToeflSectionGroupsBlock"},"lessons":{"anyOf":[{"$ref":"#/components/schemas/ToeflLessonsBlock"},{"type":"null"}]},"sample_results":{"items":{"$ref":"#/components/schemas/ToeflSampleResult"},"type":"array","title":"Sample Results","default":[]},"completed_count":{"type":"integer","title":"Completed Count","default":0},"recommended_next":{"anyOf":[{"$ref":"#/components/schemas/ToeflRecommendedNext"},{"type":"null"}]},"targets":{"$ref":"#/components/schemas/ToeflTargets"}},"type":"object","required":["tier","has_taken_diagnostic","mocks","section_groups"],"title":"ToeflHomeResponse","description":"Top-level payload for the TOEFL home page.\n\nTwo render states driven by `has_taken_diagnostic`:\n- False: gated layout — Diagnostic startable, Mocks + Sections locked\n- True: full layout — best score hero + tier-gated Mocks + Sections"},"ToeflLessonItem":{"properties":{"lesson_id":{"type":"integer","title":"Lesson Id"},"name":{"type":"string","title":"Name"},"skill":{"type":"string","title":"Skill","description":"listening|reading|speaking|writing"},"unlocked":{"type":"boolean","title":"Unlocked"},"gated_pre_diagnostic":{"type":"boolean","title":"Gated Pre Diagnostic"},"completed":{"type":"boolean","title":"Completed","default":false},"duration_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Minutes"},"lock_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lock Reason"}},"type":"object","required":["lesson_id","name","skill","unlocked","gated_pre_diagnostic"],"title":"ToeflLessonItem","description":"One interactive lesson on the TOEFL home. Gated like section tests:\nlocked until the diagnostic is taken, then tier-gated (Practice = all,\nFree = first N round-robin across skills)."},"ToeflLessonSkillGroup":{"properties":{"skill":{"type":"string","title":"Skill","description":"listening|reading|speaking|writing"},"label":{"type":"string","title":"Label"},"lessons":{"items":{"$ref":"#/components/schemas/ToeflLessonItem"},"type":"array","title":"Lessons"}},"type":"object","required":["skill","label","lessons"],"title":"ToeflLessonSkillGroup"},"ToeflLessonsBlock":{"properties":{"limit_label":{"type":"string","title":"Limit Label"},"available_after_diagnostic":{"type":"boolean","title":"Available After Diagnostic","default":true},"skills":{"items":{"$ref":"#/components/schemas/ToeflLessonSkillGroup"},"type":"array","title":"Skills"}},"type":"object","required":["limit_label","skills"],"title":"ToeflLessonsBlock"},"ToeflMockItem":{"properties":{"assessment_engine_id":{"type":"integer","title":"Assessment Engine Id"},"name":{"type":"string","title":"Name"},"unlocked":{"type":"boolean","title":"Unlocked"},"gated_pre_diagnostic":{"type":"boolean","title":"Gated Pre Diagnostic","description":"True until the user completes the Diagnostic"},"attempted":{"type":"boolean","title":"Attempted"},"best_total_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Best Total Score","description":"iBT 0-120"},"max_total_score":{"type":"integer","title":"Max Total Score","default":120},"lock_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lock Kind","description":"Why this mock is locked: null (unlocked) | 'diagnostic' | 'linear' | 'tier' (#905)"},"unlock_after_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Unlock After Name","description":"For lock_kind='linear': the mock the user must finish first"},"lock_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lock Reason"},"last_attempt_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Attempt At"},"best_attempt_engine_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Best Attempt Engine Id","description":"engine_attempts.id of the best-scoring attempt; null if not attempted"}},"type":"object","required":["assessment_engine_id","name","unlocked","gated_pre_diagnostic","attempted"],"title":"ToeflMockItem"},"ToeflMocksBlock":{"properties":{"limit_label":{"type":"string","title":"Limit Label"},"available_after_diagnostic":{"type":"boolean","title":"Available After Diagnostic","default":true},"assessments":{"items":{"$ref":"#/components/schemas/ToeflMockItem"},"type":"array","title":"Assessments"}},"type":"object","required":["limit_label","assessments"],"title":"ToeflMocksBlock"},"ToeflRecommendedNext":{"properties":{"assessment_engine_id":{"type":"integer","title":"Assessment Engine Id"},"name":{"type":"string","title":"Name"},"skill":{"type":"string","title":"Skill","description":"listening|reading|speaking|writing"},"reason":{"type":"string","title":"Reason"}},"type":"object","required":["assessment_engine_id","name","skill","reason"],"title":"ToeflRecommendedNext","description":"Suggested next test for the returning view's hero card."},"ToeflSampleResult":{"properties":{"assessment_engine_id":{"type":"integer","title":"Assessment Engine Id"},"name":{"type":"string","title":"Name"},"score_total":{"type":"integer","title":"Score Total"},"max_total":{"type":"integer","title":"Max Total","default":120},"attempted_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Attempted At"}},"type":"object","required":["assessment_engine_id","name","score_total"],"title":"ToeflSampleResult","description":"A completed sample-test result. Display-only — sample tests are\nNOT startable from this page; only shown if the user has attempts."},"ToeflSampleTest":{"properties":{"assessment_engine_id":{"type":"integer","title":"Assessment Engine Id"},"name":{"type":"string","title":"Name"},"attempted":{"type":"boolean","title":"Attempted"},"best_total_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Best Total Score","description":"Best iBT total (0-120); null if never attempted"},"max_total_score":{"type":"integer","title":"Max Total Score","default":120},"last_attempt_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Attempt At"},"best_attempt_engine_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Best Attempt Engine Id","description":"engine_attempts.id of the best-scoring attempt; null if not attempted"}},"type":"object","required":["assessment_engine_id","name","attempted"],"title":"ToeflSampleTest","description":"The SAMPLE_TEST assessment, shaped exactly like `ToeflDiagnostic`.\n\n#1289 slice f. Intentionally a separate model rather than reusing\n`ToeflDiagnostic`: renaming that schema to something neutral would change\nthe generated OpenAPI type name that shipped clients already reference.\nThe duplication is the cheaper of the two costs.\n\n`sample_results` remains the per-attempt list; this is the assessment-level\nentry, so a client can render a Sample Test card with a best score before\nthe user has taken one."},"ToeflSectionGroupsBlock":{"properties":{"limit_label":{"type":"string","title":"Limit Label"},"available_after_diagnostic":{"type":"boolean","title":"Available After Diagnostic","default":true},"skills":{"items":{"$ref":"#/components/schemas/ToeflSkillGroup"},"type":"array","title":"Skills"}},"type":"object","required":["limit_label","skills"],"title":"ToeflSectionGroupsBlock"},"ToeflSectionTestItem":{"properties":{"assessment_engine_id":{"type":"integer","title":"Assessment Engine Id"},"name":{"type":"string","title":"Name"},"unlocked":{"type":"boolean","title":"Unlocked"},"gated_pre_diagnostic":{"type":"boolean","title":"Gated Pre Diagnostic"},"attempted":{"type":"boolean","title":"Attempted"},"best_section_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Best Section Score","description":"iBT 0-30 for this skill"},"max_section_score":{"type":"integer","title":"Max Section Score","default":30},"lock_kind":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lock Kind","description":"Why this section test is locked: null (unlocked) | 'diagnostic' | 'tier'"},"lock_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lock Reason"},"last_attempt_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Attempt At"},"best_attempt_engine_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Best Attempt Engine Id","description":"engine_attempts.id of the best-scoring attempt; null if not attempted"}},"type":"object","required":["assessment_engine_id","name","unlocked","gated_pre_diagnostic","attempted"],"title":"ToeflSectionTestItem"},"ToeflSkillBand":{"properties":{"skill":{"type":"string","title":"Skill","description":"listening | reading | speaking | writing"},"label":{"type":"string","title":"Label"},"band":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Band","description":"0-6 band; null when the section was never graded"},"max_band":{"type":"number","title":"Max Band","default":6.0},"ibt":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Ibt","description":"0-30 iBT for the section; null when never graded"},"max_ibt":{"type":"integer","title":"Max Ibt","default":30}},"type":"object","required":["skill","label"],"title":"ToeflSkillBand","description":"One Home skill tile for the best attempt (#1289 slice g).\n\n`band` / `ibt` are null when the skill's section was never graded — the\nsame rule the attempt result uses, so a free user's ungraded Speaking\ndoesn't read as a zero here either."},"ToeflSkillGroup":{"properties":{"skill":{"type":"string","title":"Skill","description":"listening|reading|speaking|writing"},"label":{"type":"string","title":"Label"},"assessments":{"items":{"$ref":"#/components/schemas/ToeflSectionTestItem"},"type":"array","title":"Assessments"}},"type":"object","required":["skill","label","assessments"],"title":"ToeflSkillGroup"},"ToeflTargets":{"properties":{"test_date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Test Date","description":"ISO date (YYYY-MM-DD), or null if not set"},"target_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Target Score","description":"Target band (0-6, 0.5 steps), or null if not set"},"max_score":{"type":"number","title":"Max Score","default":6},"intake_season":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intake Season","description":"Spring | Summer | Fall | Winter, or null"},"intake_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Intake Year"}},"type":"object","title":"ToeflTargets","description":"User's per-exam goals: test date, target score, intake term."},"Token":{"properties":{"access_token":{"type":"string","title":"Access Token"},"refresh_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"expires_in":{"type":"integer","title":"Expires In","default":900}},"type":"object","required":["access_token"],"title":"Token","description":"Token response with access and refresh tokens (HIGH-3)."},"TopicAccuracy":{"properties":{"correct":{"type":"integer","title":"Correct"},"total":{"type":"integer","title":"Total"},"accuracy":{"type":"number","title":"Accuracy"},"trend":{"type":"string","title":"Trend"}},"type":"object","required":["correct","total","accuracy","trend"],"title":"TopicAccuracy","description":"Accuracy data for a single topic."},"TopicBreakdown":{"properties":{"topic":{"type":"string","title":"Topic"},"correct":{"type":"integer","title":"Correct"},"total":{"type":"integer","title":"Total"},"accuracy":{"type":"number","title":"Accuracy"}},"type":"object","required":["topic","correct","total","accuracy"],"title":"TopicBreakdown","description":"Accuracy breakdown by topic."},"TopicCompletionRate":{"properties":{"completed":{"type":"integer","title":"Completed"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["completed","total"],"title":"TopicCompletionRate"},"TopicCompletionRow":{"properties":{"title":{"type":"string","title":"Title"},"kind_label":{"type":"string","title":"Kind Label"},"students_assigned":{"type":"integer","title":"Students Assigned"},"prework_completion":{"$ref":"#/components/schemas/TopicCompletionRate"},"homework_completion":{"$ref":"#/components/schemas/TopicCompletionRate"},"matrix":{"items":{"$ref":"#/components/schemas/TopicMatrixRow"},"type":"array","title":"Matrix"}},"type":"object","required":["title","kind_label","students_assigned","prework_completion","homework_completion","matrix"],"title":"TopicCompletionRow"},"TopicCount":{"properties":{"subject_id":{"type":"integer","title":"Subject Id"},"subject_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject Code"},"topic":{"type":"string","title":"Topic"},"count":{"type":"integer","title":"Count"},"subtopics":{"items":{"$ref":"#/components/schemas/SubtopicCount"},"type":"array","title":"Subtopics"}},"type":"object","required":["subject_id","topic","count","subtopics"],"title":"TopicCount","description":"Topic with question count and subtopics."},"TopicMatrixRow":{"properties":{"student_id":{"type":"integer","title":"Student Id"},"student_name":{"type":"string","title":"Student Name"},"prework":{"type":"string","title":"Prework"},"homework":{"type":"string","title":"Homework"}},"type":"object","required":["student_id","student_name","prework","homework"],"title":"TopicMatrixRow"},"TopicProgress":{"properties":{"topic":{"type":"string","title":"Topic"},"total_lessons":{"type":"integer","title":"Total Lessons"},"completed":{"type":"integer","title":"Completed"},"percent":{"type":"integer","title":"Percent"}},"type":"object","required":["topic","total_lessons","completed","percent"],"title":"TopicProgress","description":"Completion progress for a topic."},"TopicResponse":{"properties":{"topic":{"type":"string","title":"Topic"},"subject_code":{"type":"string","title":"Subject Code"},"question_count":{"type":"integer","title":"Question Count"}},"type":"object","required":["topic","subject_code","question_count"],"title":"TopicResponse","description":"Topic with question count."},"TopicStats":{"properties":{"correct":{"type":"integer","title":"Correct"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["correct","total"],"title":"TopicStats","description":"Statistics for studied/unstudied topics."},"TopicStatsResponse":{"properties":{"topic":{"type":"string","title":"Topic"},"subject_code":{"type":"string","title":"Subject Code"},"total":{"type":"integer","title":"Total"},"correct":{"type":"integer","title":"Correct"},"accuracy":{"type":"number","title":"Accuracy"}},"type":"object","required":["topic","subject_code","total","correct","accuracy"],"title":"TopicStatsResponse","description":"User's stats for a specific topic."},"TrendAnalysis":{"properties":{"has_history":{"type":"boolean","title":"Has History"},"previous_attempts_count":{"type":"integer","title":"Previous Attempts Count","default":0},"score_delta":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Score Delta"},"math_delta":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Math Delta"},"rw_delta":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rw Delta"},"improved_topics":{"items":{"type":"string"},"type":"array","title":"Improved Topics","default":[]},"declined_topics":{"items":{"type":"string"},"type":"array","title":"Declined Topics","default":[]},"stable_topics":{"items":{"type":"string"},"type":"array","title":"Stable Topics","default":[]},"overall_trend":{"type":"string","title":"Overall Trend","default":"insufficient_data"},"trend_confidence":{"type":"number","title":"Trend Confidence","default":0.0},"comparison_attempt_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Comparison Attempt Id"},"comparison_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Comparison Date"}},"type":"object","required":["has_history"],"title":"TrendAnalysis","description":"Trend comparison to previous attempts."},"TrialActivateResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"trial_started_at":{"type":"string","format":"date-time","title":"Trial Started At"},"trial_expires_at":{"type":"string","format":"date-time","title":"Trial Expires At"},"days_remaining":{"type":"integer","title":"Days Remaining"},"tier":{"$ref":"#/components/schemas/UserTier"},"subscription_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Subscription Id"}},"type":"object","required":["success","message","trial_started_at","trial_expires_at","days_remaining","tier"],"title":"TrialActivateResponse","description":"Response after successful trial activation."},"TrialEligibilityResponse":{"properties":{"eligible":{"type":"boolean","title":"Eligible"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason"},"current_tier":{"$ref":"#/components/schemas/UserTier"}},"type":"object","required":["eligible","current_tier"],"title":"TrialEligibilityResponse","description":"Response indicating if user can activate trial."},"TrialInfo":{"properties":{"is_trial":{"type":"boolean","title":"Is Trial","default":false},"trial_started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Trial Started At"},"trial_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Trial Expires At"},"days_remaining":{"type":"integer","title":"Days Remaining","default":0},"is_expired":{"type":"boolean","title":"Is Expired","default":false}},"type":"object","title":"TrialInfo","description":"Trial status information."},"TrialStatusResponse":{"properties":{"has_used_trial":{"type":"boolean","title":"Has Used Trial"},"is_trial_active":{"type":"boolean","title":"Is Trial Active"},"trial_started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Trial Started At"},"trial_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Trial Expires At"},"days_remaining":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days Remaining"},"current_tier":{"$ref":"#/components/schemas/UserTier"}},"type":"object","required":["has_used_trial","is_trial_active","current_tier"],"title":"TrialStatusResponse","description":"Response with current trial status."},"TriggerCronRequest":{"properties":{"type":{"type":"string","enum":["weekly_cohort","per_mock_sweep","per_mock_attempt"],"title":"Type"},"cohort_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Cohort Id"},"mock_attempt_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mock Attempt Id"},"lookback_hours":{"anyOf":[{"type":"integer","maximum":72.0,"minimum":1.0},{"type":"null"}],"title":"Lookback Hours"}},"type":"object","required":["type"],"title":"TriggerCronRequest","description":"POST /test/trigger-classroom-reports-cron body.\n\nTargets:\n- weekly_cohort: triggers run_weekly_cohort_reports, optionally\n  scoped to a single cohort.\n- per_mock_sweep: triggers run_per_mock_report_sweep over the last\n  N hours (lookback_hours; defaults to 2).\n- per_mock_attempt: triggers generate_per_mock_reports for one\n  mock_attempt_id (most useful for E2E specs)."},"TriggerCronResponse":{"properties":{"type":{"type":"string","title":"Type"},"considered":{"type":"integer","title":"Considered","default":0},"fired":{"type":"integer","title":"Fired","default":0},"runs":{"type":"integer","title":"Runs","default":0}},"type":"object","required":["type"],"title":"TriggerCronResponse","description":"Per-trigger counts surfaced for ops smoke tests + E2E asserts."},"TriggerType":{"type":"string","enum":["diagnostic_completed","mock_completed","assessment_completed","question_answered","daily_recalc","dashboard_load","manual"],"title":"TriggerType","description":"What triggered the predicted score calculation.\n\n- diagnostic_completed: After diagnostic test submission\n- mock_completed: After mock test submission\n- assessment_completed: After any assessment (topic/module)\n- question_answered: After practice question (Task 3.15)\n- daily_recalc: Scheduled daily recalculation (Task 3.15)\n- dashboard_load: Lazy calculation when user views dashboard\n- manual: User or admin triggered recalculation"},"UnpublishItemResult":{"properties":{"source_id":{"type":"string","title":"Source Id"},"action":{"type":"string","enum":["unpublished","already_unpublished","not_found"],"title":"Action"},"question_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Question Id"}},"type":"object","required":["source_id","action"],"title":"UnpublishItemResult"},"UpdateAcademicInfoRequest":{"properties":{"grade":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grade"},"school_board":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"School Board"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"target_exam_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Target Exam Date"}},"type":"object","title":"UpdateAcademicInfoRequest","description":"Request to update academic information."},"UpdateAssessmentRequest":{"properties":{"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"display_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"time_limit_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Time Limit Minutes"},"is_timed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Timed"},"subject_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Subject Id"},"topic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topic"},"question_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Question Ids"},"sections":{"anyOf":[{"items":{"$ref":"#/components/schemas/SectionInput"},"type":"array"},{"type":"null"}],"title":"Sections"},"proctoring_config":{"anyOf":[{"$ref":"#/components/schemas/ProctoringConfig"},{"type":"null"}]}},"type":"object","title":"UpdateAssessmentRequest","description":"Request for updating an assessment - all fields optional"},"UpdateParentInfoRequest":{"properties":{"name":{"type":"string","title":"Name"},"email":{"type":"string","format":"email","title":"Email"},"phone_country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Country Code"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"}},"type":"object","required":["name","email"],"title":"UpdateParentInfoRequest","description":"Request to update parent information."},"UpdatePhoneRequest":{"properties":{"country_code":{"type":"string","title":"Country Code"},"number":{"type":"string","title":"Number"}},"type":"object","required":["country_code","number"],"title":"UpdatePhoneRequest","description":"Request to update phone number."},"UpdateProfileRequest":{"properties":{"phone":{"anyOf":[{"$ref":"#/components/schemas/PhoneInfo"},{"type":"null"}]},"academic":{"anyOf":[{"$ref":"#/components/schemas/AcademicInfo"},{"type":"null"}]},"parent":{"anyOf":[{"$ref":"#/components/schemas/ParentInfo"},{"type":"null"}]},"target_degree":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Degree"},"target_intake_season":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Intake Season"},"target_intake_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Target Intake Year"}},"type":"object","title":"UpdateProfileRequest","description":"Request to update entire profile (partial updates allowed)."},"UpdateQuestionRequest":{"properties":{"source_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Id"},"topic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topic"},"subtopic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtopic"},"difficulty":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Difficulty"},"difficulty_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Difficulty Label"},"content":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Content"},"answer_insights":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Answer Insights"},"usage_contexts":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Usage Contexts"},"tags":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Tags"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"is_validated":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Validated"}},"type":"object","title":"UpdateQuestionRequest","description":"Request model for updating question properties"},"UpdateRolesRequest":{"properties":{"roles":{"items":{"type":"string"},"type":"array","title":"Roles"}},"type":"object","required":["roles"],"title":"UpdateRolesRequest"},"UpdateUsageContextsRequest":{"properties":{"usage_contexts":{"items":{"type":"string"},"type":"array","title":"Usage Contexts"}},"type":"object","required":["usage_contexts"],"title":"UpdateUsageContextsRequest"},"UpdateUserRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"calcom_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Calcom Username"},"calcom_math_event_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Calcom Math Event Slug"},"calcom_rw_event_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Calcom Rw Event Slug"},"subjects":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Subjects"}},"type":"object","title":"UpdateUserRequest"},"UpgradeInterestCreate":{"properties":{"product":{"type":"string","maxLength":32,"minLength":1,"title":"Product","description":"Product the user wants to upgrade to, e.g. 'toefl'.","examples":["toefl"]},"source":{"type":"string","maxLength":64,"minLength":1,"title":"Source","description":"Where in the app the tap happened, e.g. 'results' | 'review' | 'practice'. Free-form on purpose: apps ship on their own cadence and a new placement must not need a Nova release to be reportable.","examples":["results"]}},"type":"object","required":["product","source"],"title":"UpgradeInterestCreate","description":"A tap on an upgrade / \"get my responses evaluated\" affordance."},"UpgradeInterestResponse":{"properties":{"id":{"type":"integer","title":"Id"},"product":{"type":"string","title":"Product"},"source":{"type":"string","title":"Source"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","product","source","created_at"],"title":"UpgradeInterestResponse","description":"Echo of the stored row. The app ignores the body and treats any 2xx as\nsuccess, but returning the row keeps the endpoint debuggable by hand."},"UpgradeOption":{"properties":{"slug":{"type":"string","title":"Slug"},"name":{"type":"string","title":"Name"},"price_display":{"type":"string","title":"Price Display"},"duration_display":{"type":"string","title":"Duration Display"},"highlight_features":{"items":{"type":"string"},"type":"array","title":"Highlight Features"}},"type":"object","required":["slug","name","price_display","duration_display","highlight_features"],"title":"UpgradeOption","description":"One upgrade package the user can purchase."},"UsageLimitResponse":{"properties":{"feature_key":{"type":"string","title":"Feature Key"},"feature_label":{"type":"string","title":"Feature Label"},"used":{"type":"integer","title":"Used"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"},"limit_type":{"type":"string","title":"Limit Type"}},"type":"object","required":["feature_key","feature_label","used","limit","limit_type"],"title":"UsageLimitResponse","description":"Usage vs limit for a feature."},"UserCreate":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"target_degree":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Degree"},"app_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App Source"},"utm_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Source"},"utm_medium":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Medium"},"utm_campaign":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Campaign"},"utm_term":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Term"},"utm_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Utm Content"},"signup_page":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signup Page"},"guest_session_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guest Session Id"},"guest_questions_attempted":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Guest Questions Attempted"},"guest_math_questions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Guest Math Questions"},"guest_rw_questions":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Guest Rw Questions"},"guest_is_iq":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Guest Is Iq"},"guest_iq_signal":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Guest Iq Signal"},"guest_lessons_viewed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Guest Lessons Viewed"}},"type":"object","required":["email","password","first_name","last_name"],"title":"UserCreate"},"UserLessonStats":{"properties":{"total_started":{"type":"integer","title":"Total Started"},"total_completed":{"type":"integer","title":"Total Completed"},"topics_with_progress":{"items":{"type":"string"},"type":"array","title":"Topics With Progress"}},"type":"object","required":["total_started","total_completed","topics_with_progress"],"title":"UserLessonStats","description":"Overall lesson stats for a user."},"UserLogin":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"},"app_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App Source","default":"web"}},"type":"object","required":["email","password"],"title":"UserLogin"},"UserProfileResponse":{"properties":{"id":{"type":"integer","title":"Id"},"user_id":{"type":"integer","title":"User Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name"},"account_type":{"anyOf":[{"$ref":"#/components/schemas/AccountType"},{"type":"null"}]},"tier":{"anyOf":[{"$ref":"#/components/schemas/UserTier"},{"type":"null"}]},"phone_country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Country Code"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"},"grade":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grade"},"school_board":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"School Board"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"target_exam_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Target Exam Date"},"parent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Name"},"parent_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Email"},"parent_phone_country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Phone Country Code"},"parent_phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Phone Number"},"phone_skip_count":{"type":"integer","title":"Phone Skip Count","default":0},"academic_info_skip_count":{"type":"integer","title":"Academic Info Skip Count","default":0},"parent_info_skip_count":{"type":"integer","title":"Parent Info Skip Count","default":0},"has_phone":{"type":"boolean","title":"Has Phone","default":false},"has_academic_info":{"type":"boolean","title":"Has Academic Info","default":false},"has_parent_info":{"type":"boolean","title":"Has Parent Info","default":false},"can_skip_phone":{"type":"boolean","title":"Can Skip Phone","default":false},"can_skip_academic":{"type":"boolean","title":"Can Skip Academic","default":true},"can_skip_parent":{"type":"boolean","title":"Can Skip Parent","default":false},"qualification_status":{"type":"string","title":"Qualification Status","default":"unqualified"},"iq_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Iq At"},"dq_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Dq At"},"dq_trigger":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dq Trigger"},"show_decision_paths":{"type":"boolean","title":"Show Decision Paths","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","user_id","created_at","updated_at"],"title":"UserProfileResponse","description":"Full user profile response."},"UserResponse":{"properties":{"id":{"type":"integer","title":"Id"},"email":{"type":"string","title":"Email"},"first_name":{"type":"string","title":"First Name"},"last_name":{"type":"string","title":"Last Name"},"tier":{"$ref":"#/components/schemas/UserTier"},"account_type":{"$ref":"#/components/schemas/AccountType"},"auth_provider":{"$ref":"#/components/schemas/AuthProvider"},"is_email_verified":{"type":"boolean","title":"Is Email Verified"},"trial_started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Trial Started At"},"trial_expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Trial Expires At"},"trial_expiry_dismissed":{"type":"boolean","title":"Trial Expiry Dismissed","default":false},"predicted_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Predicted Score"},"predicted_score_confidence":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Predicted Score Confidence"},"predicted_score_effort_math":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Predicted Score Effort Math"},"predicted_score_effort_rw":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Predicted Score Effort Rw"},"predicted_math_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Predicted Math Score"},"predicted_rw_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Predicted Rw Score"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"target_degree":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Degree"},"target_intake_season":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Intake Season"},"target_intake_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Target Intake Year"},"phone_country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Country Code"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"},"grade":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grade"},"school_board":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"School Board"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"parent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Name"},"parent_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Email"},"parent_phone_country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Phone Country Code"},"parent_phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Parent Phone Number"},"academic_info_skip_count":{"type":"integer","title":"Academic Info Skip Count","default":0},"has_phone":{"type":"boolean","title":"Has Phone","default":false},"has_academic_info":{"type":"boolean","title":"Has Academic Info","default":false},"has_parent_info":{"type":"boolean","title":"Has Parent Info","default":false},"has_password":{"type":"boolean","title":"Has Password","default":false},"qualification_status":{"type":"string","title":"Qualification Status","default":"unqualified"},"iq_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Iq At"},"dq_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Dq At"},"dq_trigger":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Dq Trigger"},"show_decision_paths":{"type":"boolean","title":"Show Decision Paths","default":false},"has_taken_diagnostic":{"type":"boolean","title":"Has Taken Diagnostic","default":false},"diagnostic_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Diagnostic Score"},"diagnostic_results":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Diagnostic Results"},"has_taken_sample_test":{"type":"boolean","title":"Has Taken Sample Test","default":false},"sample_test_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sample Test Score"},"sample_test_results":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Sample Test Results"},"mock_tests_completed":{"type":"integer","title":"Mock Tests Completed","default":0},"mock_test_history":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Mock Test History","default":[]},"partner":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Partner"}},"type":"object","required":["id","email","first_name","last_name","tier","account_type","auth_provider","is_email_verified","trial_started_at","trial_expires_at","predicted_score","predicted_score_confidence","predicted_math_score","predicted_rw_score","created_at"],"title":"UserResponse"},"UserStatsResponse":{"properties":{"total_questions_attempted":{"type":"integer","title":"Total Questions Attempted","default":0},"total_questions_correct":{"type":"integer","title":"Total Questions Correct","default":0},"overall_accuracy":{"type":"number","maximum":100.0,"minimum":0.0,"title":"Overall Accuracy","default":0.0},"math_stats":{"$ref":"#/components/schemas/SectionStats"},"rw_stats":{"$ref":"#/components/schemas/SectionStats"},"diagnostic_completed":{"type":"boolean","title":"Diagnostic Completed","default":false},"diagnostic_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Diagnostic Score"},"mock_tests_completed":{"type":"integer","title":"Mock Tests Completed","default":0},"mock_tests_available":{"type":"integer","title":"Mock Tests Available","default":0},"study_streak":{"type":"integer","title":"Study Streak","default":0},"qotd_streak":{"type":"integer","title":"Qotd Streak","default":0},"longest_streak":{"type":"integer","title":"Longest Streak","default":0},"share_count":{"type":"integer","title":"Share Count","default":0},"total_study_time_minutes":{"type":"integer","title":"Total Study Time Minutes","default":0},"lessons_completed":{"type":"integer","title":"Lessons Completed","default":0},"questions_this_week":{"type":"integer","title":"Questions This Week","default":0},"questions_last_week":{"type":"integer","title":"Questions Last Week","default":0},"week_over_week_change":{"type":"integer","title":"Week Over Week Change","default":0}},"type":"object","required":["math_stats","rw_stats"],"title":"UserStatsResponse","description":"Response for user statistics endpoint.","example":{"diagnostic_completed":true,"diagnostic_score":1180,"lessons_completed":12,"longest_streak":7,"math_stats":{"accuracy":75.3,"avg_time_per_question":65.5,"questions_attempted":85,"questions_correct":64,"strongest_topic":"Data Analysis","weakest_topic":"Algebra"},"mock_tests_available":5,"mock_tests_completed":2,"overall_accuracy":75.2,"qotd_streak":3,"questions_last_week":32,"questions_this_week":45,"rw_stats":{"accuracy":75.0,"avg_time_per_question":55.2,"questions_attempted":72,"questions_correct":54,"strongest_topic":"Reading Comprehension","weakest_topic":"Grammar"},"share_count":2,"study_streak":5,"total_questions_attempted":157,"total_questions_correct":118,"total_study_time_minutes":420,"week_over_week_change":13}},"UserTier":{"type":"string","enum":["guest","free","practice","guided_trial","guided","classroom"],"title":"UserTier","description":"Entitlement tier for the platform.\n\nTier hierarchy (lowest to highest), canonical ordering in\n`app.entitlements.constants.TIER_HIERARCHY`:\n- guest (level 0): Anonymous user, limited preview access\n- free (level 1): Registered user, limited content, no study plan\n- practice (level 2): Full practice access, no study plan (90 days validity)\n- guided_trial (level 3): Full guided features, 14 days trial\n- guided (level 4): Full structured learning (182 days validity)\n- classroom (level 5): Cohort program access, granted via partner-school\n  enrollment (#347 Classroom). Higher precedence than any B2C tier\n  while the cohort is active; expiration reverts the user to whatever\n  B2C subscription is still valid (or Guest if none).\n\nSee GitHub Issues #234, #235, #236 for the original Feb 23 tiers and\n#347 for the Classroom addition."},"V25FlagResponse":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"source":{"type":"string","title":"Source"}},"type":"object","required":["enabled","source"],"title":"V25FlagResponse","description":"Current value of the v25_reflection_gate_enabled flag."},"V25FlagUpdate":{"properties":{"enabled":{"type":"boolean","title":"Enabled"}},"type":"object","required":["enabled"],"title":"V25FlagUpdate"},"ValidateResetTokenRequest":{"properties":{"token":{"type":"string","title":"Token"}},"type":"object","required":["token"],"title":"ValidateResetTokenRequest","description":"Request to validate a reset token (without changing password)."},"ValidateResetTokenResponse":{"properties":{"valid":{"type":"boolean","title":"Valid"},"message":{"type":"string","title":"Message"}},"type":"object","required":["valid","message"],"title":"ValidateResetTokenResponse","description":"Response for token validation."},"ValidateResponse":{"properties":{"valid":{"type":"boolean","title":"Valid"},"errors":{"items":{"type":"string"},"type":"array","title":"Errors"}},"type":"object","required":["valid","errors"],"title":"ValidateResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"ValidationStatus":{"type":"string","enum":["pending","valid","flagged","rejected","approved"],"title":"ValidationStatus","description":"Allowed values for `validation_status` on provenance rows."},"VerifyOTPRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"code":{"type":"string","title":"Code"},"app_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"App Source","default":"web"}},"type":"object","required":["email","code"],"title":"VerifyOTPRequest","description":"Request to verify OTP code."},"VerifyOTPResponse":{"properties":{"message":{"type":"string","title":"Message"},"verified":{"type":"boolean","title":"Verified"},"access_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Access Token"},"refresh_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Token"},"token_type":{"type":"string","title":"Token Type","default":"bearer"},"expires_in":{"type":"integer","title":"Expires In","default":900},"needs_password_setup_prompt":{"type":"boolean","title":"Needs Password Setup Prompt","default":false}},"type":"object","required":["message","verified"],"title":"VerifyOTPResponse","description":"Response after successful OTP verification."},"VerifyRequest":{"properties":{"gateway_order_id":{"type":"string","title":"Gateway Order Id"},"callback_data":{"additionalProperties":true,"type":"object","title":"Callback Data"}},"type":"object","required":["gateway_order_id"],"title":"VerifyRequest","description":"Frontend -> backend verify call.\n\n`gateway_order_id` identifies the order; `callback_data` is the raw\ngateway-signed payload (Razorpay: razorpay_payment_id + razorpay_signature;\nEasebuzz: full form-callback dict; Mock: {signature: ...})."},"VocabDeleteMeResponse":{"properties":{"deleted":{"type":"boolean","title":"Deleted","default":true},"counts":{"additionalProperties":{"type":"integer"},"type":"object","title":"Counts"}},"type":"object","required":["counts"],"title":"VocabDeleteMeResponse"},"VocabLtmEventCreate":{"properties":{"event_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Event Id"},"word_id":{"type":"integer","title":"Word Id"},"set_id":{"type":"integer","title":"Set Id"},"list_level":{"type":"integer","maximum":6.0,"minimum":0.0,"title":"List Level"},"action":{"type":"string","title":"Action"},"action_data":{"additionalProperties":true,"type":"object","title":"Action Data"},"utc_event":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Utc Event"},"device_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Device Id"},"os":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Os"},"online":{"type":"boolean","title":"Online","default":true}},"additionalProperties":true,"type":"object","required":["word_id","set_id","list_level","action"],"title":"VocabLtmEventCreate"},"VocabLtmEventResponse":{"properties":{"id":{"type":"integer","title":"Id"},"event_id":{"type":"string","title":"Event Id"},"user_id":{"type":"integer","title":"User Id"},"word_id":{"type":"integer","title":"Word Id"},"set_id":{"type":"integer","title":"Set Id"},"list_level":{"type":"integer","title":"List Level"},"action":{"type":"string","title":"Action"},"utc_event":{"type":"string","format":"date-time","title":"Utc Event"},"newly_unlocked_achievements":{"items":{"type":"string"},"type":"array","title":"Newly Unlocked Achievements"}},"type":"object","required":["id","event_id","user_id","word_id","set_id","list_level","action","utc_event"],"title":"VocabLtmEventResponse"},"VocabSetDetail":{"properties":{"id":{"type":"integer","title":"Id"},"set_order":{"type":"integer","title":"Set Order"},"title":{"type":"string","title":"Title"},"uuid":{"type":"string","title":"Uuid"},"word_count":{"type":"integer","title":"Word Count"},"difficulty_level":{"type":"string","title":"Difficulty Level"},"zip_url":{"type":"string","title":"Zip Url"},"json_url":{"type":"string","title":"Json Url"}},"type":"object","required":["id","set_order","title","uuid","word_count","difficulty_level","zip_url","json_url"],"title":"VocabSetDetail"},"VocabSetStateOut":{"properties":{"user_id":{"type":"integer","title":"User Id"},"set_id":{"type":"integer","title":"Set Id"},"state":{"type":"string","title":"State"},"utc_event":{"type":"string","format":"date-time","title":"Utc Event"}},"type":"object","required":["user_id","set_id","state","utc_event"],"title":"VocabSetStateOut"},"VocabSetStatePatch":{"properties":{"state":{"type":"string","pattern":"^(LOCKED|UNLOCKED|PLAYED)$","title":"State"},"utc_event":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Utc Event"}},"type":"object","required":["state"],"title":"VocabSetStatePatch"},"VocabSetSummary":{"properties":{"id":{"type":"integer","title":"Id"},"set_order":{"type":"integer","title":"Set Order"},"title":{"type":"string","title":"Title"},"uuid":{"type":"string","title":"Uuid"},"word_count":{"type":"integer","title":"Word Count"},"difficulty_level":{"type":"string","title":"Difficulty Level"},"zip_url":{"type":"string","title":"Zip Url"}},"type":"object","required":["id","set_order","title","uuid","word_count","difficulty_level","zip_url"],"title":"VocabSetSummary","description":"Lightweight set metadata for the list view."},"VocabStatsResponse":{"properties":{"sets_played":{"type":"integer","title":"Sets Played"},"words_played":{"type":"integer","title":"Words Played"},"mastery_percentage":{"type":"number","title":"Mastery Percentage"}},"type":"object","required":["sets_played","words_played","mastery_percentage"],"title":"VocabStatsResponse"},"VocabUserStateResponse":{"properties":{"sets":{"items":{"$ref":"#/components/schemas/VocabSetStateOut"},"type":"array","title":"Sets"},"words":{"items":{"$ref":"#/components/schemas/VocabWordStateOut"},"type":"array","title":"Words"},"bookmarked_word_ids":{"items":{"type":"integer"},"type":"array","title":"Bookmarked Word Ids"},"streaks":{"additionalProperties":true,"type":"object","title":"Streaks"},"achievements":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Achievements"},"recent_ltm":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Recent Ltm"}},"type":"object","required":["sets","words","bookmarked_word_ids","streaks","achievements","recent_ltm"],"title":"VocabUserStateResponse","description":"Aggregate state for the home/dashboard surfaces."},"VocabWordDetail":{"properties":{"id":{"type":"integer","title":"Id"},"set_id":{"type":"integer","title":"Set Id"},"position_in_set":{"type":"integer","title":"Position In Set"},"word":{"type":"string","title":"Word"},"details":{"additionalProperties":true,"type":"object","title":"Details"},"questions":{"additionalProperties":true,"type":"object","title":"Questions"}},"type":"object","required":["id","set_id","position_in_set","word","details","questions"],"title":"VocabWordDetail"},"VocabWordStateOut":{"properties":{"user_id":{"type":"integer","title":"User Id"},"word_id":{"type":"integer","title":"Word Id"},"set_id":{"type":"integer","title":"Set Id"},"list_level":{"type":"integer","title":"List Level"},"bookmarked":{"type":"boolean","title":"Bookmarked"},"question_attempted":{"type":"integer","title":"Question Attempted"},"utc_event":{"type":"string","format":"date-time","title":"Utc Event"}},"type":"object","required":["user_id","word_id","set_id","list_level","bookmarked","question_attempted","utc_event"],"title":"VocabWordStateOut"},"VocabWordStatePatch":{"properties":{"list_level":{"anyOf":[{"type":"integer","maximum":6.0,"minimum":0.0},{"type":"null"}],"title":"List Level"},"bookmarked":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Bookmarked"},"utc_event":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Utc Event"}},"type":"object","title":"VocabWordStatePatch"},"WeeklyAssignmentCompletion":{"properties":{"prework":{"$ref":"#/components/schemas/WeeklyCompletionBlock"},"homework":{"$ref":"#/components/schemas/WeeklyCompletionBlock"}},"type":"object","required":["prework","homework"],"title":"WeeklyAssignmentCompletion"},"WeeklyAttendanceEngagement":{"properties":{"classes_attended":{"type":"integer","title":"Classes Attended"},"classes_conducted":{"type":"integer","title":"Classes Conducted"},"attendance_pct":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Attendance Pct"},"math_engagement":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Math Engagement"},"rw_engagement":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rw Engagement"}},"type":"object","required":["classes_attended","classes_conducted","attendance_pct","math_engagement","rw_engagement"],"title":"WeeklyAttendanceEngagement"},"WeeklyCompletionBlock":{"properties":{"assigned":{"type":"integer","title":"Assigned"},"completed":{"type":"integer","title":"Completed"},"pct":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pct"}},"type":"object","required":["assigned","completed","pct"],"title":"WeeklyCompletionBlock"},"WeeklyEmailPreviewRequest":{"properties":{"week_start":{"type":"string","format":"date","title":"Week Start"},"narrative":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Narrative"}},"type":"object","required":["week_start"],"title":"WeeklyEmailPreviewRequest","description":"POST body for the weekly email preview.\n\n`narrative` (when present) previews unsaved edits to the Learning\nProgress summary without persisting anything."},"WeeklyLearningProgress":{"properties":{"topics_covered":{"$ref":"#/components/schemas/WeeklyTopicsCovered"},"topic_performance":{"items":{"$ref":"#/components/schemas/WeeklyTopicPerformance"},"type":"array","title":"Topic Performance"},"summary":{"type":"string","title":"Summary"}},"type":"object","required":["topics_covered","topic_performance","summary"],"title":"WeeklyLearningProgress"},"WeeklyNarrativeEditRequest":{"properties":{"week_start":{"type":"string","format":"date","title":"Week Start"},"narrative":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Narrative"},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["week_start"],"title":"WeeklyNarrativeEditRequest"},"WeeklyOptionalSupport":{"properties":{"hw_support":{"$ref":"#/components/schemas/WeeklySupportUtil"},"doubt_clinics":{"$ref":"#/components/schemas/WeeklySupportUtil"}},"type":"object","required":["hw_support","doubt_clinics"],"title":"WeeklyOptionalSupport"},"WeeklyReportResponse":{"properties":{"week_start":{"type":"string","title":"Week Start"},"available_week_starts":{"items":{"type":"string"},"type":"array","title":"Available Week Starts","default":[]},"cohort_id":{"type":"integer","title":"Cohort Id"},"cohort_name":{"type":"string","title":"Cohort Name"},"student_name":{"type":"string","title":"Student Name"},"attendance_engagement":{"$ref":"#/components/schemas/WeeklyAttendanceEngagement"},"assignment_completion":{"$ref":"#/components/schemas/WeeklyAssignmentCompletion"},"optional_support":{"$ref":"#/components/schemas/WeeklyOptionalSupport"},"learning_progress":{"$ref":"#/components/schemas/WeeklyLearningProgress"}},"type":"object","required":["week_start","cohort_id","cohort_name","student_name","attendance_engagement","assignment_completion","optional_support","learning_progress"],"title":"WeeklyReportResponse"},"WeeklyReviewListResponse":{"properties":{"week_start":{"type":"string","format":"date","title":"Week Start"},"rows":{"items":{"$ref":"#/components/schemas/WeeklyReviewRow"},"type":"array","title":"Rows"}},"type":"object","required":["week_start","rows"],"title":"WeeklyReviewListResponse"},"WeeklyReviewRow":{"properties":{"user_id":{"type":"integer","title":"User Id"},"student_name":{"type":"string","title":"Student Name"},"has_parent_email":{"type":"boolean","title":"Has Parent Email"},"edited":{"type":"boolean","title":"Edited"},"sent":{"type":"boolean","title":"Sent"}},"type":"object","required":["user_id","student_name","has_parent_email","edited","sent"],"title":"WeeklyReviewRow"},"WeeklySendRequest":{"properties":{"week_start":{"type":"string","format":"date","title":"Week Start"},"user_ids":{"items":{"type":"integer"},"type":"array","minItems":1,"title":"User Ids"}},"type":"object","required":["week_start","user_ids"],"title":"WeeklySendRequest"},"WeeklySupportUtil":{"properties":{"available":{"type":"integer","title":"Available"},"attended":{"type":"integer","title":"Attended"}},"type":"object","required":["available","attended"],"title":"WeeklySupportUtil"},"WeeklyTopicPerformance":{"properties":{"topic":{"type":"string","title":"Topic"},"section":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section"},"assigned":{"type":"integer","title":"Assigned"},"completed":{"type":"integer","title":"Completed"},"accuracy":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Accuracy"},"mastery":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mastery"}},"type":"object","required":["topic","section","assigned","completed","accuracy","mastery"],"title":"WeeklyTopicPerformance"},"WeeklyTopicsCovered":{"properties":{"math":{"items":{"type":"string"},"type":"array","title":"Math"},"rw":{"items":{"type":"string"},"type":"array","title":"Rw"}},"type":"object","required":["math","rw"],"title":"WeeklyTopicsCovered"},"WotdSaveRequest":{"properties":{"word_id":{"type":"integer","title":"Word Id"}},"type":"object","required":["word_id"],"title":"WotdSaveRequest"},"WotdSavedListResponse":{"properties":{"exam":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exam","description":"Echoes the filter; null when all exams were returned"},"count":{"type":"integer","title":"Count","default":0},"words":{"items":{"$ref":"#/components/schemas/WotdWordOut"},"type":"array","title":"Words"}},"type":"object","title":"WotdSavedListResponse"},"WotdWordOut":{"properties":{"id":{"type":"integer","title":"Id"},"uuid":{"type":"string","format":"uuid","title":"Uuid"},"exam_type":{"type":"string","title":"Exam Type","description":"gre | sat | toefl"},"word":{"type":"string","title":"Word"},"definition":{"type":"string","title":"Definition"},"phonetics":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phonetics","description":"e.g. '/əˈpɒkrɪf(ə)l/ • adjective' — includes part of speech"},"example_usage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Example Usage"},"synonyms":{"items":{"type":"string"},"type":"array","title":"Synonyms"},"usage_tip":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Usage Tip"},"audio_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Audio Url"},"scheduled_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Scheduled Date","description":"Null on saved-word listings, which aren't date-bound"},"is_saved":{"type":"boolean","title":"Is Saved","description":"Whether the requesting user has bookmarked this word","default":false}},"type":"object","required":["id","uuid","exam_type","word","definition"],"title":"WotdWordOut"},"WrongAnswerAnalysis":{"properties":{"mode":{"type":"string","title":"Mode"},"total_wrong":{"type":"integer","title":"Total Wrong"},"by_category":{"anyOf":[{"additionalProperties":{"$ref":"#/components/schemas/WrongAnswerCategory"},"type":"object"},{"type":"null"}],"title":"By Category"},"primary_issue":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Primary Issue"},"questions":{"anyOf":[{"items":{"$ref":"#/components/schemas/WrongAnswerQuestion"},"type":"array"},{"type":"null"}],"title":"Questions"},"data_driven_patterns":{"anyOf":[{"$ref":"#/components/schemas/DataDrivenPatterns"},{"type":"null"}]},"has_question_level_data":{"type":"boolean","title":"Has Question Level Data","default":false}},"type":"object","required":["mode","total_wrong"],"title":"WrongAnswerAnalysis","description":"Adaptive wrong answer analysis."},"WrongAnswerCategory":{"properties":{"count":{"type":"integer","title":"Count"},"remediation":{"type":"string","title":"Remediation"}},"type":"object","required":["count","remediation"],"title":"WrongAnswerCategory","description":"Wrong answer category with count and remediation."},"WrongAnswerQuestion":{"properties":{"question_id":{"type":"integer","title":"Question Id"},"topic":{"type":"string","title":"Topic"},"your_answer":{"type":"string","title":"Your Answer"},"correct_answer":{"type":"string","title":"Correct Answer"},"mistake_type":{"type":"string","title":"Mistake Type"},"remediation":{"type":"string","title":"Remediation"}},"type":"object","required":["question_id","topic","your_answer","correct_answer","mistake_type","remediation"],"title":"WrongAnswerQuestion","description":"Specific wrong answer details."},"ZmaElevationRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email","description":"Email of the now-ZMA-eligible contact"}},"type":"object","required":["email"],"title":"ZmaElevationRequest","description":"Inbound payload from the Zoho workflow-rule webhook. Carries the\neligible contact's email (the universal identity key). The target\nCampaigns list is server-side config (``zma_list_key``), not per-request —\nthe webhook only signals \"this contact is now eligible\"."},"ZmaElevationResponse":{"properties":{"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"ZmaElevationResponse","description":"Beacon response. ``status`` is ``enqueued`` (a zoho_zma row was queued)\nor ``no_contact`` (no crm_contact for that email — logged anomaly).\n\nCarries no internal id. NOTE: the binary ``enqueued`` vs ``no_contact``\nstatus DOES disclose whether the email has a crm_contact row — a mild\nenumeration oracle. Acceptable because the only key holder is the trusted\nZoho workflow engine; do NOT grant ``zma_webhook_api_key`` to untrusted\ncallers."},"_VerifyIdTokenError":{"properties":{"error":{"type":"string","title":"Error"},"message":{"type":"string","title":"Message"}},"type":"object","required":["error","message"],"title":"_VerifyIdTokenError","description":"Documents the {error, message} envelope every non-200 path uses on\nthis endpoint. Distinct from the §6.10 form_errors envelope."},"_VerifyIdTokenSuccess":{"properties":{"jwt":{"type":"string","title":"Jwt"},"access_token":{"type":"string","title":"Access Token"},"sessid":{"type":"string","title":"Sessid"},"session_name":{"type":"string","title":"Session Name"},"user":{"additionalProperties":true,"type":"object","title":"User"}},"additionalProperties":true,"type":"object","required":["jwt","access_token","sessid","session_name","user"],"title":"_VerifyIdTokenSuccess","description":"Documents the 200 success body so the OpenAPI snapshot (and any\nconsumer regenerating from it) sees the real contract.\n\n#724: the body is the SAME Drupal-shaped envelope the email/password\nlogin path returns (`payload.build_login_envelope`) — `user` is the\nfrozen Drupal user object the legacy Cordova client's `sanitizeUserData`\nexpects, plus `sessid` / `session_name` / `access_token` for parity. The\n`jwt` key stays top-level because this endpoint's Cordova client reads\n`resp.jwt` (stored as `vocab_jwt`). `user` is modeled as a free-form\nobject to avoid duplicating the frozen shape (see\npayload.build_drupal_user_object — the single source of truth)."},"app__api__internal__assessments__AssessmentListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AssessmentListItem"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["items","total"],"title":"AssessmentListResponse"},"app__api__internal__auth__InternalUserResponse":{"properties":{"id":{"type":"integer","title":"Id"},"email":{"type":"string","title":"Email"},"name":{"type":"string","title":"Name"},"roles":{"items":{"type":"string"},"type":"array","title":"Roles"}},"type":"object","required":["id","email","name","roles"],"title":"InternalUserResponse"},"app__api__internal__knowledge_graph__SkillNodeTreeItem":{"properties":{"id":{"type":"integer","title":"Id"},"path":{"type":"string","title":"Path"},"code":{"type":"string","title":"Code"},"title":{"type":"string","title":"Title"},"level":{"type":"integer","title":"Level"},"module":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Module"},"num_children":{"type":"integer","title":"Num Children","default":0},"is_leaf":{"type":"boolean","title":"Is Leaf","default":false},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"lesson_count":{"type":"integer","title":"Lesson Count","default":0},"question_count":{"type":"integer","title":"Question Count","default":0},"prereq_count":{"type":"integer","title":"Prereq Count","default":0},"descendant_lesson_count":{"type":"integer","title":"Descendant Lesson Count","default":0},"descendant_question_count":{"type":"integer","title":"Descendant Question Count","default":0},"descendant_prereq_count":{"type":"integer","title":"Descendant Prereq Count","default":0},"children":{"items":{"$ref":"#/components/schemas/app__api__internal__knowledge_graph__SkillNodeTreeItem"},"type":"array","title":"Children","default":[]}},"type":"object","required":["id","path","code","title","level","module"],"title":"SkillNodeTreeItem"},"app__api__internal__knowledge_graph__SkillTreeResponse":{"properties":{"exam":{"type":"string","title":"Exam"},"total_nodes":{"type":"integer","title":"Total Nodes"},"counts_by_level":{"items":{"$ref":"#/components/schemas/LevelStat"},"type":"array","title":"Counts By Level","default":[]},"total_lessons_linked":{"type":"integer","title":"Total Lessons Linked","default":0},"total_questions_linked":{"type":"integer","title":"Total Questions Linked","default":0},"total_prereq_edges":{"type":"integer","title":"Total Prereq Edges","default":0},"tree":{"items":{"$ref":"#/components/schemas/app__api__internal__knowledge_graph__SkillNodeTreeItem"},"type":"array","title":"Tree"}},"type":"object","required":["exam","total_nodes","tree"],"title":"SkillTreeResponse"},"app__api__internal__marketing_csv_imports__DryRunRequest":{"properties":{"mapping_id":{"type":"integer","title":"Mapping Id"},"email_column":{"type":"string","title":"Email Column"},"conflict_policy":{"type":"string","title":"Conflict Policy","default":"update_existing"}},"type":"object","required":["mapping_id","email_column"],"title":"DryRunRequest"},"app__api__internal__marketing_csv_imports__DryRunResponse":{"properties":{"create":{"type":"integer","title":"Create"},"update":{"type":"integer","title":"Update"},"collision":{"type":"integer","title":"Collision","default":0},"skip":{"type":"integer","title":"Skip"},"error":{"type":"integer","title":"Error"},"samples":{"additionalProperties":{"items":{"additionalProperties":true,"type":"object"},"type":"array"},"type":"object","title":"Samples"}},"type":"object","required":["create","update","skip","error","samples"],"title":"DryRunResponse"},"app__api__internal__users__InternalUserResponse":{"properties":{"id":{"type":"integer","title":"Id"},"email":{"type":"string","title":"Email"},"name":{"type":"string","title":"Name"},"roles":{"items":{"type":"string"},"type":"array","title":"Roles"},"is_active":{"type":"boolean","title":"Is Active"},"calcom_username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Calcom Username"},"calcom_math_event_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Calcom Math Event Slug"},"calcom_rw_event_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Calcom Rw Event Slug"},"subjects":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Subjects"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_login_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Login At"}},"type":"object","required":["id","email","name","roles","is_active","calcom_username","calcom_math_event_slug","calcom_rw_event_slug","subjects","created_at","last_login_at"],"title":"InternalUserResponse"},"app__api__knowledge_graph__SkillNodeTreeItem":{"properties":{"id":{"type":"integer","title":"Id"},"path":{"type":"string","title":"Path"},"code":{"type":"string","title":"Code"},"title":{"type":"string","title":"Title"},"level":{"type":"integer","title":"Level"},"module":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Module"},"contribution_to_parent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Contribution To Parent"},"children":{"items":{"$ref":"#/components/schemas/app__api__knowledge_graph__SkillNodeTreeItem"},"type":"array","title":"Children","default":[]}},"type":"object","required":["id","path","code","title","level","module","contribution_to_parent"],"title":"SkillNodeTreeItem"},"app__api__knowledge_graph__SkillTreeResponse":{"properties":{"exam":{"type":"string","title":"Exam"},"total_nodes":{"type":"integer","title":"Total Nodes"},"tree":{"items":{"$ref":"#/components/schemas/app__api__knowledge_graph__SkillNodeTreeItem"},"type":"array","title":"Tree"}},"type":"object","required":["exam","total_nodes","tree"],"title":"SkillTreeResponse"},"app__api__me_classroom__TaskCompleteResponse":{"properties":{"task_id":{"type":"integer","title":"Task Id"},"completed":{"type":"boolean","title":"Completed"}},"type":"object","required":["task_id","completed"],"title":"TaskCompleteResponse"},"app__api__sat_olympiad__OlympiadStatusResponse":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"start_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Start At"},"end_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"End At"},"window_open":{"type":"boolean","title":"Window Open"},"can_start":{"type":"boolean","title":"Can Start"},"eligible":{"type":"boolean","title":"Eligible","default":true},"is_registrant":{"type":"boolean","title":"Is Registrant","default":false},"has_practice_pack":{"type":"boolean","title":"Has Practice Pack","default":false},"attempt_state":{"type":"string","title":"Attempt State"},"attempt_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Attempt Id"},"assessment_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Assessment Id"},"submitted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Submitted At"},"available_tests":{"type":"integer","title":"Available Tests"},"results_published":{"type":"boolean","title":"Results Published","default":false},"test_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Test Minutes"},"proctored":{"type":"boolean","title":"Proctored","default":false},"certificate_available":{"type":"boolean","title":"Certificate Available","default":false}},"type":"object","required":["enabled","start_at","end_at","window_open","can_start","attempt_state","attempt_id","assessment_id","submitted_at","available_tests"],"title":"OlympiadStatusResponse"},"app__assessment_engine__schemas__attempt__OlympiadStatusResponse":{"properties":{"toefl":{"$ref":"#/components/schemas/OlympiadExamStatus"},"firstname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Firstname"},"lastname":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lastname"}},"type":"object","required":["toefl"],"title":"OlympiadStatusResponse"},"app__assessment_engine__schemas__attempt__StartAssessmentResponse":{"properties":{"message":{"type":"string","title":"Message"},"attempt":{"$ref":"#/components/schemas/AttemptResponse"}},"type":"object","required":["message","attempt"],"title":"StartAssessmentResponse"},"app__assessment_engine__schemas__attempt__SubmitAssessmentResponse":{"properties":{"message":{"type":"string","title":"Message"},"auto_score":{"type":"integer","title":"Auto Score"},"max_score":{"type":"integer","title":"Max Score"},"percentage":{"type":"number","title":"Percentage"},"has_manual_grading_pending":{"type":"boolean","title":"Has Manual Grading Pending"}},"type":"object","required":["message","auto_score","max_score","percentage","has_manual_grading_pending"],"title":"SubmitAssessmentResponse"},"app__assessment_engine__schemas__response__RecordingUploadUrlRequest":{"properties":{"question_id":{"type":"integer","title":"Question Id"},"content_type":{"type":"string","maxLength":80,"minLength":1,"title":"Content Type"}},"type":"object","required":["question_id","content_type"],"title":"RecordingUploadUrlRequest","description":"Frontend asks for a destination to PUT an audio blob to."},"app__assessment_engine__schemas__response__RecordingUploadUrlResponse":{"properties":{"upload_url":{"type":"string","title":"Upload Url"},"object_name":{"type":"string","title":"Object Name"},"response_id":{"type":"integer","title":"Response Id"},"storage":{"type":"string","title":"Storage"},"content_type":{"type":"string","title":"Content Type"}},"type":"object","required":["upload_url","object_name","response_id","storage","content_type"],"title":"RecordingUploadUrlResponse","description":"Production: signed PUT URL straight to GCS. Local-dev fallback:\na URL to our own backend endpoint that accepts the same PUT and\nsaves to disk. The frontend uses one code path either way."},"app__schemas__assessment__AnswerSubmit":{"properties":{"question_id":{"type":"integer","title":"Question Id"},"answer":{"type":"string","title":"Answer","description":"Selected answer (A/B/C/D for MC, numeric string for grid-in). Empty string to clear/deselect.","default":""},"time_spent_seconds":{"type":"integer","minimum":0.0,"title":"Time Spent Seconds","description":"Time spent on this question"},"flagged_for_review":{"type":"boolean","title":"Flagged For Review","description":"Question marked for review","default":false},"answer_changed":{"type":"boolean","title":"Answer Changed","description":"Answer was changed from previous","default":false},"position":{"type":"integer","minimum":1.0,"title":"Position","description":"Question position in assessment (1-indexed)"},"section_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Section Number","description":"Section number for mock tests (1-4)"},"section_time_remaining":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Section Time Remaining","description":"Remaining seconds for current section (for pause/resume)"}},"type":"object","required":["question_id","time_spent_seconds","position"],"title":"AnswerSubmit","description":"Schema for submitting a single answer during assessment."},"app__schemas__assessment__AssessmentListResponse":{"properties":{"id":{"type":"integer","title":"Id"},"assessment_type":{"type":"string","title":"Assessment Type"},"title":{"type":"string","title":"Title"},"display_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Title"},"question_count":{"type":"integer","title":"Question Count"},"time_limit_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Time Limit Minutes"},"is_timed":{"type":"boolean","title":"Is Timed"},"subject_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Subject Id"},"subject_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subject Code"},"topic":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topic"},"total_attempts":{"type":"integer","title":"Total Attempts","default":0},"avg_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Score"}},"type":"object","required":["id","assessment_type","title","question_count","time_limit_minutes","is_timed","topic","avg_score"],"title":"AssessmentListResponse","description":"Compact assessment info for listing."},"app__schemas__assessment__StartAssessmentResponse":{"properties":{"attempt_id":{"type":"integer","title":"Attempt Id"},"assessment":{"$ref":"#/components/schemas/AssessmentResponse"},"questions":{"items":{"$ref":"#/components/schemas/QuestionForAssessment"},"type":"array","title":"Questions"},"sections":{"items":{"$ref":"#/components/schemas/SectionInfo"},"type":"array","title":"Sections","default":[]},"time_limit_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Time Limit Minutes"},"section_time_limits":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Section Time Limits"},"started_at":{"type":"string","format":"date-time","title":"Started At"}},"type":"object","required":["attempt_id","assessment","questions","time_limit_minutes","started_at"],"title":"StartAssessmentResponse","description":"Response when starting an assessment attempt."},"app__schemas__assessment__SubmitAssessmentResponse":{"properties":{"attempt_id":{"type":"integer","title":"Attempt Id"},"score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Score"},"section_scores":{"anyOf":[{"additionalProperties":{"type":"integer"},"type":"object"},{"type":"null"}],"title":"Section Scores"},"raw_score":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Raw Score"},"completed_at":{"type":"string","format":"date-time","title":"Completed At"},"qualification":{"anyOf":[{"$ref":"#/components/schemas/AssessmentQualificationResult"},{"type":"null"}]}},"type":"object","required":["attempt_id","score","section_scores","raw_score","completed_at"],"title":"SubmitAssessmentResponse","description":"Response after submitting an assessment."},"app__schemas__dashboard__DashboardResponse":{"properties":{"user_name":{"type":"string","title":"User Name"},"is_first_login":{"type":"boolean","title":"Is First Login","description":"True if the user has zero completed attempts of any kind","default":false},"target_degree":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Degree","description":"User's program track. Passed through for client hints; NOT authoritative"},"current_exam_slug":{"type":"string","title":"Current Exam Slug","description":"The 'selected' exam tab — defaults to the first subscribed exam. Falls back to 'sat' when the user has no active subscriptions."},"exams":{"items":{"$ref":"#/components/schemas/DashboardExamSlice"},"type":"array","title":"Exams","description":"(legacy) One entry per exam the user has an active subscription for"},"cross_sell":{"items":{"$ref":"#/components/schemas/DashboardCrossSellExam"},"type":"array","title":"Cross Sell","description":"(legacy) Other exams the user could try (free or paid)"},"checklist":{"anyOf":[{"$ref":"#/components/schemas/ChecklistSummary"},{"type":"null"}],"description":"(legacy) Only populated when is_first_login=True"},"blocking":{"items":{"$ref":"#/components/schemas/BlockingReason"},"type":"array","title":"Blocking","description":"Reasons the dashboard is gated. Frontend renders a modal/inline call per item before rendering the rest. Empty list = no gating."},"journey_overview":{"anyOf":[{"$ref":"#/components/schemas/JourneyOverview"},{"type":"null"}],"description":"Cross-product 'what's next' card. 1-3 hub-level recommendations. Sole next-action surface per D2 (Pass 2 RC-1 resolution)."},"products":{"items":{"$ref":"#/components/schemas/ProductAccessSlice"},"type":"array","title":"Products","description":"Filtered product access map. Already filtered by target_degree relevance per Pass 4 PC-2 — frontend renders only what's here."},"service_cards":{"items":{"$ref":"#/components/schemas/ServiceCard"},"type":"array","title":"Service Cards","description":"Profile Building + Admissions-counselling service cards, rendered conditionally based on target_degree + enrollment state."},"nearest_test_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Nearest Test Date","description":"Soonest future target_test_date across the user's products. Drives the identity hero countdown ('SAT on Mar 14 · 87 days')."}},"type":"object","required":["user_name","current_exam_slug"],"title":"DashboardResponse","description":"Aggregated dashboard payload — one round-trip per page load.\n\nPR-2 ADDITIVE: new fields below default to empty/None. Legacy fields\n(`exams[]`, `cross_sell[]`, `checklist`) stay until the new\n`/dashboard` page replaces `UserDashboardPage` (PR-5/PR-6). A later\ncleanup PR drops the legacy fields."},"app__schemas__dashboard__StudyPlanSummary":{"properties":{"current_day":{"type":"integer","title":"Current Day"},"total_days":{"type":"integer","title":"Total Days"},"streak_days":{"type":"integer","title":"Streak Days"},"target_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Target Date"}},"type":"object","required":["current_day","total_days","streak_days"],"title":"StudyPlanSummary","description":"Hero card: study plan progress."},"app__schemas__event_mapping__DryRunRequest":{"properties":{"mapping":{"$ref":"#/components/schemas/EventMappingCreate"},"sample_source":{"additionalProperties":true,"type":"object","title":"Sample Source"}},"type":"object","required":["mapping","sample_source"],"title":"DryRunRequest","description":"Mapping payload + a sample source row (the dispatcher's flattened\nshape) — renders the would-be sink payloads without enqueueing."},"app__schemas__event_mapping__DryRunResponse":{"properties":{"contact_upsert":{"additionalProperties":true,"type":"object","title":"Contact Upsert"},"child_record":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Child Record"},"ga4_event":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Ga4 Event"},"intent_tier_projection":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Intent Tier Projection"}},"type":"object","required":["contact_upsert","child_record","ga4_event","intent_tier_projection"],"title":"DryRunResponse"},"app__schemas__practice__AnswerSubmit":{"properties":{"question_id":{"type":"integer","title":"Question Id"},"answer":{"type":"string","maxLength":50,"minLength":1,"title":"Answer"},"time_spent_seconds":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Time Spent Seconds"}},"type":"object","required":["question_id","answer"],"title":"AnswerSubmit","description":"Request body for submitting an answer."},"app__schemas__sat_home__DashboardResponse":{"properties":{"user_id":{"type":"integer","title":"User Id"},"first_name":{"type":"string","title":"First Name"},"account_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Type"},"tier_config":{"$ref":"#/components/schemas/TierConfig"},"trial_info":{"$ref":"#/components/schemas/TrialInfo"},"predicted_score":{"$ref":"#/components/schemas/PredictedScoreInfo"},"user_stats":{"$ref":"#/components/schemas/UserStatsResponse"},"study_plan":{"$ref":"#/components/schemas/app__schemas__sat_home__StudyPlanSummary"},"mock_tests":{"$ref":"#/components/schemas/MockTestSummary"},"qotd":{"anyOf":[{"$ref":"#/components/schemas/QotdResponse"},{"type":"null"}]},"needs_account_type":{"type":"boolean","title":"Needs Account Type","default":false},"needs_diagnostic":{"type":"boolean","title":"Needs Diagnostic","default":false},"show_trial_activation":{"type":"boolean","title":"Show Trial Activation","default":false},"show_trial_expiry_warning":{"type":"boolean","title":"Show Trial Expiry Warning","default":false},"mock_2_burn_warning":{"type":"boolean","title":"Mock 2 Burn Warning","default":false}},"type":"object","required":["user_id","first_name","tier_config","trial_info","predicted_score","user_stats","study_plan","mock_tests"],"title":"DashboardResponse","description":"Aggregated dashboard data response.\n\nProvides all data needed for the SAT Home dashboard in a single request.\nFrontend should cache this and only refresh when needed.","example":{"account_type":"student","first_name":"Demo","mock_tests":{"has_pending_feedback":false,"tests_available":1,"tests_completed":0},"needs_account_type":false,"needs_diagnostic":false,"predicted_score":{"confidence_level":"medium","has_score":true,"last_updated":"2025-12-03T10:00:00Z","math_score":600,"rw_score":600,"total_score":1200},"show_trial_activation":false,"show_trial_expiry_warning":false,"study_plan":{"completed_days":2,"current_day":3,"has_plan":true,"next_milestone":"Complete Week 1","streak":3,"tasks_completed_today":2,"tasks_today":5,"total_days":14},"tier_config":{"feedback_sessions":0,"has_study_plan":true,"is_paid":false,"mock_tests_available":1,"tier":"trial","tutoring_hours":0},"trial_info":{"days_remaining":12,"is_expired":false,"is_trial":true,"trial_expires_at":"2025-12-15T10:00:00Z","trial_started_at":"2025-12-01T10:00:00Z"},"user_id":1}},"app__schemas__sat_home__StudyPlanSummary":{"properties":{"has_plan":{"type":"boolean","title":"Has Plan","default":false},"current_day":{"type":"integer","title":"Current Day","default":0},"total_days":{"type":"integer","title":"Total Days","default":0},"completed_days":{"type":"integer","title":"Completed Days","default":0},"tasks_today":{"type":"integer","title":"Tasks Today","default":0},"tasks_completed_today":{"type":"integer","title":"Tasks Completed Today","default":0},"streak":{"type":"integer","title":"Streak","default":0},"next_milestone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Milestone"}},"type":"object","title":"StudyPlanSummary","description":"Study plan summary for dashboard."},"app__schemas__session__RecordingUploadUrlRequest":{"properties":{"content_type":{"type":"string","title":"Content Type"},"filename":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Filename"}},"type":"object","required":["content_type"],"title":"RecordingUploadUrlRequest","description":"Ask the backend for a one-time URL to upload a recording straight to\nstorage, bypassing the API server (Cloud Run caps request bodies at\n~32 MiB, so 100 MB+ recordings can't be POSTed through it — #915)."},"app__schemas__session__RecordingUploadUrlResponse":{"properties":{"upload_url":{"type":"string","title":"Upload Url"},"blob_path":{"type":"string","title":"Blob Path"},"method":{"type":"string","title":"Method","default":"PUT"},"content_type":{"type":"string","title":"Content Type"},"max_bytes":{"type":"integer","title":"Max Bytes"},"expires_in_seconds":{"type":"integer","title":"Expires In Seconds"},"is_dev":{"type":"boolean","title":"Is Dev","default":false}},"type":"object","required":["upload_url","blob_path","content_type","max_bytes","expires_in_seconds"],"title":"RecordingUploadUrlResponse"},"app__schemas__study_plan__TaskCompleteResponse":{"properties":{"progress_id":{"type":"integer","title":"Progress Id"},"task_id":{"type":"integer","title":"Task Id"},"status":{"type":"string","title":"Status"},"score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Score"},"completed_at":{"type":"string","format":"date-time","title":"Completed At"},"segment_advanced":{"type":"boolean","title":"Segment Advanced","default":false},"next_segment":{"anyOf":[{"$ref":"#/components/schemas/SegmentResponse"},{"type":"null"}]},"events":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Events","default":[]}},"type":"object","required":["progress_id","task_id","status","completed_at"],"title":"TaskCompleteResponse","description":"Response when completing a task."}},"securitySchemes":{"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"/api/v1/auth/login"}}},"HTTPBearer":{"type":"http","scheme":"bearer"}}}}