-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.json
More file actions
1 lines (1 loc) · 577 KB
/
openapi.json
File metadata and controls
1 lines (1 loc) · 577 KB
1
{"openapi":"3.1.0","info":{"title":"MFBT Backend API","description":"Move Fast and Build Things - Collaborative AI-Assisted Development Platform","version":"0.1.0"},"paths":{"/api/v1/auth/register":{"post":{"tags":["authentication"],"summary":"Register","description":"Register a new user.\n\nCreates a new user account with the provided email and password.\nThe password is automatically hashed before storage.\nAlso automatically creates a personal organization for the user.\n\nEmail verification is required before the user can log in.\nA verification email is sent after registration.\n\nArgs:\n user_data: User registration data (email, password, optional display_name)\n db: Sync database session\n async_db: Async database session (for email service)\n\nReturns:\n RegistrationResponse with verification status\n\nRaises:\n HTTPException: 400 Bad Request if a user with the email already exists\n HTTPException: 400 Bad Request if the email domain is not permitted","operationId":"register_api_v1_auth_register_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegistrationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/login":{"post":{"tags":["authentication"],"summary":"Login","description":"Login and obtain an access token.\n\nAuthenticates a user with email and password, returning a JWT access token\nif the credentials are valid and email is verified.\n\nArgs:\n form_data: OAuth2 form data (username=email, password)\n db: Database session\n\nReturns:\n TokenResponse containing the JWT access token\n\nRaises:\n HTTPException: 401 Unauthorized if credentials are invalid\n HTTPException: 403 Forbidden if email is not verified","operationId":"login_api_v1_auth_login_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_login_api_v1_auth_login_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/me":{"get":{"tags":["authentication"],"summary":"Get Current User Info","description":"Get current authenticated user information.\n\nThis is a protected endpoint that requires a valid JWT token.\nReturns information about the currently authenticated user, including their current org_id.\n\nThe org_id is determined by:\n1. User's current_org_id if set and user is still a member\n2. Otherwise, the first organization in user's memberships\n\nArgs:\n current_user: Current authenticated user (injected by dependency)\n db: Database session\n\nReturns:\n UserResponse containing the current user's information","operationId":"get_current_user_info_api_v1_auth_me_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"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/me/token":{"get":{"tags":["authentication"],"summary":"Get Session Token","description":"Return the session token for cookie-authenticated users.\n\nThis endpoint is specifically for OAuth flows where the token is set\nin an HTTP-only cookie but needs to be stored in localStorage for\nWebSocket connections.\n\nOnly accepts cookie authentication, not bearer tokens.\nThis ensures the endpoint is only useful for the OAuth→localStorage sync case.\n\nArgs:\n session_cookie: JWT token from the session cookie (injected by FastAPI)\n db: Database session\n\nReturns:\n TokenResponse containing the access token\n\nRaises:\n HTTPException: 401 if no session cookie or invalid token","operationId":"get_session_token_api_v1_auth_me_token_get","parameters":[{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/me/orgs":{"get":{"tags":["authentication"],"summary":"Get Current User Orgs","description":"Get all organizations the current user is a member of.\n\nReturns a list of organizations with the user's role in each.\nThis is used by the org switcher to display available organizations.\n\nArgs:\n current_user: Current authenticated user (injected by dependency)\n db: Database session\n\nReturns:\n List of OrgMembershipResponse with org details and user's role","operationId":"get_current_user_orgs_api_v1_auth_me_orgs_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/app__schemas__auth__OrgMembershipResponse"},"title":"Response Get Current User Orgs Api V1 Auth Me Orgs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/me/current-org":{"put":{"tags":["authentication"],"summary":"Switch Current Org","description":"Switch the user's current organization.\n\nUpdates the user's current_org_id to the specified organization.\nThe user must be a member of the target organization.\n\nArgs:\n request: Request body with the target org_id\n current_user: Current authenticated user (injected by dependency)\n db: Database session\n\nReturns:\n Updated UserResponse with the new org_id\n\nRaises:\n HTTPException: 404 if user is not a member of the target organization","operationId":"switch_current_org_api_v1_auth_me_current_org_put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SwitchOrgRequest"}}}},"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/me/trial-status":{"get":{"tags":["authentication"],"summary":"Get Trial Status","description":"Get the current user's trial and plan status.\n\nReturns information about the user's trial period and organization plan,\nincluding token usage and limits.\n\nArgs:\n current_user: Current authenticated user (injected by dependency)\n db: Database session\n\nReturns:\n Dict with trial and plan status information:\n - is_exempt: Whether user has perpetual access (grandfathered or exempted)\n - is_strictly_exempt: Whether user matches email/domain allowlists (strict)\n - days_remaining: Days left in trial (null if exempt)\n - trial_started_at: When trial began (null if exempt/grandfathered)\n - trial_expires_at: When trial expires (null if exempt)\n - plan: Organization plan status (null if no org)","operationId":"get_trial_status_api_v1_auth_me_trial_status_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Trial Status Api V1 Auth Me Trial Status Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/logout":{"post":{"tags":["authentication"],"summary":"Logout","description":"Logout the current user.\n\nClears the session cookie and provides Scalekit logout URL if user\nlogged in via Scalekit SSO.\n\nThis is a protected endpoint that requires a valid JWT token.\n\nArgs:\n request: FastAPI Request object to access cookies\n response: FastAPI Response object to clear cookie on\n current_user: Current authenticated user (validates user is logged in)\n db: Database session to check user's identity provider\n scalekit_service: Scalekit service for logout URL generation\n\nReturns:\n Success message with optional redirect_url for SSO logout","operationId":"logout_api_v1_auth_logout_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Logout Api V1 Auth Logout Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/verify-email":{"post":{"tags":["authentication"],"summary":"Verify Email","description":"Verify email address and obtain an access token.\n\nValidates the verification token from the email link, marks the email\nas verified, and returns a JWT access token.\n\nArgs:\n token: Verification token from email link\n response: FastAPI Response object to set cookie on\n db: Database session\n\nReturns:\n TokenResponse containing the JWT access token\n\nRaises:\n HTTPException: 400 Bad Request if token is invalid or expired","operationId":"verify_email_api_v1_auth_verify_email_post","parameters":[{"name":"token","in":"query","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/resend-verification":{"post":{"tags":["authentication"],"summary":"Resend Verification","description":"Resend verification email for an unverified user.\n\nGenerates a new verification token and sends a new email.\nReturns a generic success message to avoid revealing whether\nthe email exists in the system.\n\nArgs:\n request: Request containing the email address\n db: Sync database session\n async_db: Async database session (for email service)\n\nReturns:\n ResendVerificationResponse with generic message","operationId":"resend_verification_api_v1_auth_resend_verification_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendVerificationRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResendVerificationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/providers":{"get":{"tags":["authentication"],"summary":"List Oauth Providers","description":"List available OAuth providers.\n\nReturns a list of configured and available OAuth providers that users\ncan use to authenticate. Only providers with valid client credentials\nare included.\n\nReturns:\n List of OAuthProviderInfo with provider slug, name, and icon","operationId":"list_oauth_providers_api_v1_auth_providers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/OAuthProviderInfo"},"type":"array","title":"Response List Oauth Providers Api V1 Auth Providers Get"}}}}}}},"/api/v1/auth/health":{"get":{"tags":["authentication"],"summary":"Auth Health","description":"Check auth system health and provider configuration status.\n\nReturns information about configured OAuth providers and whether\nthe auth system is properly set up. This is a public endpoint\nfor monitoring purposes.\n\nReturns:\n Dict with configured status and list of enabled providers","operationId":"auth_health_api_v1_auth_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Auth Health Api V1 Auth Health Get"}}}}}}},"/api/v1/auth/login/{provider_slug}":{"get":{"tags":["authentication"],"summary":"Oauth Login","description":"Initiate OAuth login flow.\n\nValidates the provider and redirects the user to the OAuth provider's\nauthorization page. The provider will redirect back to our callback\nendpoint after the user authenticates.\n\nArgs:\n request: FastAPI request object (needed by Authlib for state/session)\n provider_slug: Provider identifier (e.g., 'google', 'github')\n next: Optional URL path to redirect to after successful authentication.\n Must be a relative path starting with '/' (e.g., '/invites/abc123').\n Stored in session and used by the callback endpoint.\n\nReturns:\n RedirectResponse to the OAuth provider's authorization URL\n\nRaises:\n HTTPException: 400 if provider is unknown or not configured","operationId":"oauth_login_api_v1_auth_login__provider_slug__get","parameters":[{"name":"provider_slug","in":"path","required":true,"schema":{"type":"string","title":"Provider Slug"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/signup/{provider_slug}":{"get":{"tags":["authentication"],"summary":"Oauth Signup","description":"Initiate OAuth signup flow.\n\nSame as login but adds prompt=create to direct users to the signup page.\nOnly applicable for Scalekit provider.\n\nArgs:\n request: FastAPI request object (needed by Authlib for state/session)\n provider_slug: Provider identifier (e.g., 'scalekit')\n next: Optional URL path to redirect to after successful authentication.\n\nReturns:\n RedirectResponse to the OAuth provider's signup URL\n\nRaises:\n HTTPException: 400 if provider is unknown or not configured","operationId":"oauth_signup_api_v1_auth_signup__provider_slug__get","parameters":[{"name":"provider_slug","in":"path","required":true,"schema":{"type":"string","title":"Provider Slug"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/login/init/{provider_slug}":{"get":{"tags":["authentication"],"summary":"Oauth Login Init","description":"Initiate OAuth login flow.\n\nValidates the provider and redirects the user to the OAuth provider's\nauthorization page. The provider will redirect back to our callback\nendpoint after the user authenticates.\n\nArgs:\n request: FastAPI request object (needed by Authlib for state/session)\n provider_slug: Provider identifier (e.g., 'google', 'github')\n next: Optional URL path to redirect to after successful authentication.\n Must be a relative path starting with '/' (e.g., '/invites/abc123').\n Stored in session and used by the callback endpoint.\n\nReturns:\n RedirectResponse to the OAuth provider's authorization URL\n\nRaises:\n HTTPException: 400 if provider is unknown or not configured","operationId":"oauth_login_init_api_v1_auth_login_init__provider_slug__get","parameters":[{"name":"provider_slug","in":"path","required":true,"schema":{"type":"string","title":"Provider Slug"}},{"name":"next","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/callback/{provider_slug}":{"get":{"tags":["authentication"],"summary":"Oauth Callback","description":"Handle OAuth callback from provider.\n\nThis endpoint is called by the OAuth provider after the user authenticates.\nIt exchanges the authorization code for tokens, fetches user info,\ncreates or updates the user, and redirects to the frontend with a session cookie.\n\nArgs:\n request: FastAPI request object\n provider_slug: Provider identifier\n db: Database session\n code: Authorization code from provider\n state: State parameter for CSRF protection\n error: Error code if authentication failed\n error_description: Human-readable error description\n\nReturns:\n RedirectResponse to frontend with session cookie set\n\nRaises:\n HTTPException: 400 for various OAuth errors","operationId":"oauth_callback_api_v1_auth_callback__provider_slug__get","parameters":[{"name":"provider_slug","in":"path","required":true,"schema":{"type":"string","title":"Provider Slug"}},{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"error_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Description"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/users/me/api-keys":{"post":{"tags":["API Keys"],"summary":"Create Api Key","description":"Create a new API key for the authenticated user.\n\nThe full API key is returned ONLY ONCE. Make sure to copy it immediately.\nAPI keys can be used to authenticate MCP requests to any project\nthe user has access to.","operationId":"create_api_key_api_v1_users_me_api_keys_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["API Keys"],"summary":"List Api Keys","description":"List all API keys for the authenticated user.","operationId":"list_api_keys_api_v1_users_me_api_keys_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/users/me/api-keys/{key_id}":{"delete":{"tags":["API Keys"],"summary":"Revoke Api Key","description":"Revoke an API key (soft delete).\n\nThe key will no longer be usable for authentication.","operationId":"revoke_api_key_api_v1_users_me_api_keys__key_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/users/me/api-keys/{key_id}/permanent":{"delete":{"tags":["API Keys"],"summary":"Delete Api Key","description":"Permanently delete a revoked API key.\n\nThe key must be revoked before it can be permanently deleted.\nThis action cannot be undone.","operationId":"delete_api_key_api_v1_users_me_api_keys__key_id__permanent_delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/mcp-config":{"get":{"tags":["MCP Configuration"],"summary":"Get Mcp Config","description":"Get MCP connection configuration for the project.\n\nReturns the MCP server URL and project details needed to configure an MCP client.\n\nRequires project membership (checked via ProjectContext).","operationId":"get_mcp_config_api_v1_projects__project_id__mcp_config_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPConnectionConfig"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/.well-known/oauth-authorization-server":{"get":{"tags":["OAuth Discovery"],"summary":"Oauth Authorization Server Metadata","description":"OAuth Authorization Server Metadata (RFC 8414).\n\nReturns metadata about the OAuth authorization server endpoints.","operationId":"oauth_authorization_server_metadata__well_known_oauth_authorization_server_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/oauth-protected-resource":{"get":{"tags":["OAuth Discovery"],"summary":"Oauth Protected Resource Metadata","description":"OAuth Protected Resource Metadata (RFC 9728).\n\nReturns 404 to force clients to use resource-level discovery.\nThe actual protected resource metadata is at:\n/api/v1/projects/{project_id}/mcp/.well-known/oauth-protected-resource","operationId":"oauth_protected_resource_metadata__well_known_oauth_protected_resource_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/openid-configuration":{"get":{"tags":["OAuth Discovery"],"summary":"Openid Configuration","description":"OpenID Connect Discovery.\n\nReturns OIDC-compatible metadata for Claude Code compatibility.","operationId":"openid_configuration__well_known_openid_configuration_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/.well-known/jwks.json":{"get":{"tags":["OAuth Discovery"],"summary":"Jwks Endpoint","description":"JSON Web Key Set endpoint.\n\nReturns an empty key set since we use HS256 with shared secrets.\nThis endpoint exists to satisfy OIDC discovery requirements.","operationId":"jwks_endpoint__well_known_jwks_json_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/oauth/authorize":{"get":{"tags":["OAuth Discovery"],"summary":"Oauth Authorize","description":"OAuth Authorization Endpoint (RFC 6749).\n\nRedirects to frontend authorization page where user can approve/deny.\nThe frontend handles authentication and consent UI.\n\nNote: resource parameter is optional because Claude Code doesn't implement\nRFC 8707 resource indicators. If missing, frontend will show project selector.","operationId":"oauth_authorize_oauth_authorize_get","parameters":[{"name":"client_id","in":"query","required":true,"schema":{"type":"string","title":"Client Id"}},{"name":"redirect_uri","in":"query","required":true,"schema":{"type":"string","title":"Redirect Uri"}},{"name":"code_challenge","in":"query","required":true,"schema":{"type":"string","title":"Code Challenge"}},{"name":"code_challenge_method","in":"query","required":false,"schema":{"type":"string","default":"S256","title":"Code Challenge Method"}},{"name":"response_type","in":"query","required":false,"schema":{"type":"string","default":"code","title":"Response Type"}},{"name":"resource","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Resource"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"scope","in":"query","required":false,"schema":{"type":"string","default":"mcp:read mcp:write","title":"Scope"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/token":{"post":{"tags":["OAuth Discovery"],"summary":"Oauth Token","description":"OAuth Token Endpoint (RFC 6749).\n\nHandles:\n- grant_type=authorization_code: Exchange code for tokens\n- grant_type=refresh_token: Refresh access token","operationId":"oauth_token_oauth_token_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_oauth_token_oauth_token_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/oauth/register":{"post":{"tags":["OAuth Discovery"],"summary":"Oauth Register","description":"OAuth Dynamic Client Registration (RFC 7591).\n\nAllows MCP clients to register dynamically.","operationId":"oauth_register_oauth_register_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/oauth/revoke":{"post":{"tags":["OAuth Discovery"],"summary":"Oauth Revoke","description":"OAuth Token Revocation (RFC 7009).\n\nRevokes an access or refresh token.","operationId":"oauth_revoke_oauth_revoke_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_oauth_revoke_oauth_revoke_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/testing/load-fake-users":{"post":{"tags":["testing"],"summary":"Load Fake Users","description":"Load 20 fake users into the organization for @mention testing.\n\nCreates 20 fake users with display names and adds them as MEMBER to the\ncurrent organization. If fake users already exist in the organization,\nreturns 409 Conflict.\n\nArgs:\n org_id: Organization ID (from URL path)\n org_context: Organization context (ensures user is member of org)\n db: Database session\n\nReturns:\n LoadFakeUsersResponse with summary and list of created users\n\nRaises:\n HTTPException: 409 Conflict if fake users already exist in this org","operationId":"load_fake_users_api_v1_orgs__org_id__testing_load_fake_users_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoadFakeUsersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/is-admin":{"get":{"tags":["platform-settings"],"summary":"Check Platform Admin","description":"Check if the current user is a platform admin.\n\nThis endpoint does NOT require admin privileges - it's used by the\nfrontend to determine whether to show the Platform Settings menu.","operationId":"check_platform_admin_api_v1_platform_is_admin_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformAdminCheckResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/connectors":{"get":{"tags":["platform-settings"],"summary":"List Platform Connectors","description":"List all platform connectors.\n\nRequires platform admin privileges.","operationId":"list_platform_connectors_api_v1_platform_connectors_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"connector_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by connector type (llm, email, object_storage)","title":"Connector Type"},"description":"Filter by connector type (llm, email, object_storage)"},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PlatformConnectorResponse"},"title":"Response List Platform Connectors Api V1 Platform Connectors Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["platform-settings"],"summary":"Create Platform Connector","description":"Create a new platform connector.\n\nRequires platform admin privileges.","operationId":"create_platform_connector_api_v1_platform_connectors_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformConnectorCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformConnectorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/connectors/{connector_id}":{"get":{"tags":["platform-settings"],"summary":"Get Platform Connector","description":"Get a platform connector by ID.\n\nRequires platform admin privileges.","operationId":"get_platform_connector_api_v1_platform_connectors__connector_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"connector_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connector Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformConnectorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["platform-settings"],"summary":"Update Platform Connector","description":"Update a platform connector.\n\nRequires platform admin privileges.","operationId":"update_platform_connector_api_v1_platform_connectors__connector_id__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"connector_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connector Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformConnectorUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformConnectorResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["platform-settings"],"summary":"Delete Platform Connector","description":"Delete a platform connector.\n\nRequires platform admin privileges.\nCannot delete a connector that is currently in use in platform settings.","operationId":"delete_platform_connector_api_v1_platform_connectors__connector_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"connector_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Connector Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/connectors/test":{"post":{"tags":["platform-settings"],"summary":"Test Platform Connector","description":"Test a connector configuration before creating.\n\nRequires platform admin privileges.","operationId":"test_platform_connector_api_v1_platform_connectors_test_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformConnectorTest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformConnectorTestResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/settings":{"get":{"tags":["platform-settings"],"summary":"Get Platform Settings","description":"Get platform settings.\n\nRequires platform admin privileges.","operationId":"get_platform_settings_api_v1_platform_settings_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["platform-settings"],"summary":"Update Platform Settings","description":"Update platform settings.\n\nRequires platform admin privileges.","operationId":"update_platform_settings_api_v1_platform_settings_put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformSettingsUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/settings/freemium":{"get":{"tags":["platform-settings"],"summary":"Get Freemium Settings","description":"Get freemium plan configuration.\n\nRequires platform admin privileges.","operationId":"get_freemium_settings_api_v1_platform_settings_freemium_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FreemiumSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["platform-settings"],"summary":"Update Freemium Settings","description":"Update freemium plan configuration.\n\nRequires platform admin privileges.","operationId":"update_freemium_settings_api_v1_platform_settings_freemium_put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FreemiumSettingsUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FreemiumSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/send-test-email":{"post":{"tags":["platform-settings"],"summary":"Send Test Email","description":"Send a test email using the configured email connector.\n\nRequires platform admin privileges.","operationId":"send_test_email_api_v1_platform_send_test_email_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendTestEmailRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendTestEmailResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/email-env-config":{"get":{"tags":["platform-settings"],"summary":"Check Email Env Config","description":"Check if email environment variables are configured.\n\nReturns whether EMAILCONF_* env vars have non-empty values.\nUsed by frontend to show info panel when env vars provide fallback.\n\nRequires platform admin privileges.","operationId":"check_email_env_config_api_v1_platform_email_env_config_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailEnvConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/web-search-env-config":{"get":{"tags":["platform-settings"],"summary":"Check Web Search Env Config","description":"Check if web search environment variables are configured.\n\nReturns whether TAVILY_API_KEY env var has a non-empty value.\nUsed by frontend to show info panel when env vars provide fallback.\n\nRequires platform admin privileges.","operationId":"check_web_search_env_config_api_v1_platform_web_search_env_config_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebSearchEnvConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/github-oauth-env-config":{"get":{"tags":["platform-settings"],"summary":"Check Github Oauth Env Config","description":"Check if GitHub OAuth environment variables are configured.\n\nReturns whether GITHUB_INTEGRATION_OAUTH_CLIENT_ID and\nGITHUB_INTEGRATION_OAUTH_CLIENT_SECRET env vars have non-empty values.\nUsed by frontend to show info panel when env vars provide fallback.\n\nRequires platform admin privileges.","operationId":"check_github_oauth_env_config_api_v1_platform_github_oauth_env_config_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitHubOAuthEnvConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/settings/github-oauth":{"get":{"tags":["platform-settings"],"summary":"Get Github Oauth Settings","description":"Get GitHub OAuth settings status.\n\nReturns whether client ID and secret are configured (from UI or ENV).\nDoes not return actual credentials.\n\nRequires platform admin privileges.","operationId":"get_github_oauth_settings_api_v1_platform_settings_github_oauth_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitHubOAuthSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["platform-settings"],"summary":"Update Github Oauth Settings","description":"Update GitHub OAuth settings.\n\nSet client_id and client_secret to configure OAuth via UI.\nSet clear_credentials=true to remove UI configuration (falls back to ENV).\n\nRequires platform admin privileges.","operationId":"update_github_oauth_settings_api_v1_platform_settings_github_oauth_put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitHubOAuthSettingsUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitHubOAuthSettingsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/users/search":{"get":{"tags":["platform-settings"],"summary":"Search Users","description":"Search users by email across the entire platform.\n\nRequires platform admin privileges.","operationId":"search_users_api_v1_platform_users_search_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"email","in":"query","required":true,"schema":{"type":"string","minLength":1,"description":"Email substring to search","title":"Email"},"description":"Email substring to search"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserPlanSearchResult"},"title":"Response Search Users Api V1 Platform Users Search Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/users/{user_id}/plan":{"get":{"tags":["platform-settings"],"summary":"Get User Plan Details","description":"Get comprehensive plan details for a user and their primary org.\n\nRequires platform admin privileges.","operationId":"get_user_plan_details_api_v1_platform_users__user_id__plan_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPlanDetailsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["platform-settings"],"summary":"Update User Plan","description":"Update plan values for a user's primary organization.\n\nRequires platform admin privileges.","operationId":"update_user_plan_api_v1_platform_users__user_id__plan_put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPlanUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserPlanUpdateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/projects":{"get":{"tags":["platform-settings"],"summary":"List Platform Projects","description":"List all projects across all organizations.\n\nRequires platform admin privileges.\n\nArgs:\n include_archived: If True, include archived projects\n search: Optional search string to filter by project name\n user_id: Optional user ID to filter projects by access\n limit: Maximum number of projects to return (default 100, max 500)\n\nReturns:\n List of projects with org info","operationId":"list_platform_projects_api_v1_platform_projects_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","description":"Include archived projects","default":false,"title":"Include Archived"},"description":"Include archived projects"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by project name","title":"Search"},"description":"Search by project name"},{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter to projects accessible by this user","title":"User Id"},"description":"Filter to projects accessible by this user"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Maximum number of projects to return","default":100,"title":"Limit"},"description":"Maximum number of projects to return"},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformProjectListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/email-templates":{"get":{"tags":["email-templates"],"summary":"List Email Templates","description":"List all email templates.\n\nRequires platform admin privileges.","operationId":"list_email_templates_api_v1_platform_email_templates_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"include_inactive","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Inactive"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EmailTemplateListResponse"},"title":"Response List Email Templates Api V1 Platform Email Templates Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/email-templates/{template_id}":{"get":{"tags":["email-templates"],"summary":"Get Email Template","description":"Get an email template by ID.\n\nRequires platform admin privileges.","operationId":"get_email_template_api_v1_platform_email_templates__template_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["email-templates"],"summary":"Update Email Template","description":"Update an email template.\n\nValidates that all mandatory variables are present in the template.\n\nRequires platform admin privileges.","operationId":"update_email_template_api_v1_platform_email_templates__template_id__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/email-templates/{template_id}/tiptap":{"get":{"tags":["email-templates"],"summary":"Get Email Template Tiptap","description":"Get an email template with body converted to TipTap JSON.\n\nRequires platform admin privileges.","operationId":"get_email_template_tiptap_api_v1_platform_email_templates__template_id__tiptap_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"template_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Template Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateTipTapResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/email-templates/validate":{"post":{"tags":["email-templates"],"summary":"Validate Email Template","description":"Validate that mandatory variables are present in template.\n\nRequires platform admin privileges.","operationId":"validate_email_template_api_v1_platform_email_templates_validate_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateValidateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplateValidationResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/email-templates/preview":{"post":{"tags":["email-templates"],"summary":"Preview Email Template","description":"Preview a rendered template with sample variables.\n\nRequires platform admin privileges.","operationId":"preview_email_template_api_v1_platform_email_templates_preview_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplatePreviewRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailTemplatePreviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/analytics/flush-cache":{"post":{"tags":["analytics"],"summary":"Flush Analytics Cache","description":"Flush the analytics Redis cache.\n\nThis forces a recalculation of analytics data from the database\non the next request. Platform admins only.","operationId":"flush_analytics_cache_api_v1_analytics_flush_cache_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Flush Analytics Cache Api V1 Analytics Flush Cache Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/analytics/top-users":{"get":{"tags":["analytics"],"summary":"Get Top Users","description":"Get top users by token usage.\n\nReturns a ranked list of users sorted by total token consumption\nwithin the specified time range. Platform admins only.\n\nCombines historical data from pre-aggregated daily summaries with\nreal-time data for the current day.","operationId":"get_top_users_api_v1_analytics_top_users_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"time_range","in":"query","required":false,"schema":{"$ref":"#/components/schemas/TimeRange","description":"Time range for the query","default":"monthly"},"description":"Time range for the query"},{"name":"org_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by organization (null for platform-wide)","title":"Org Id"},"description":"Filter by organization (null for platform-wide)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of users to return","default":20,"title":"Limit"},"description":"Maximum number of users to return"},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopUsersResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/analytics/top-projects":{"get":{"tags":["analytics"],"summary":"Get Top Projects","description":"Get top projects by token usage.\n\nReturns a ranked list of projects sorted by total token consumption\nwithin the specified time range. Platform admins only.\n\nCombines historical data from pre-aggregated daily summaries with\nreal-time data for the current day.","operationId":"get_top_projects_api_v1_analytics_top_projects_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"time_range","in":"query","required":false,"schema":{"$ref":"#/components/schemas/TimeRange","description":"Time range for the query","default":"monthly"},"description":"Time range for the query"},{"name":"org_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by organization (null for platform-wide)","title":"Org Id"},"description":"Filter by organization (null for platform-wide)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of projects to return","default":20,"title":"Limit"},"description":"Maximum number of projects to return"},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopProjectsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/analytics/efficiency-overview":{"get":{"tags":["analytics"],"summary":"Get Efficiency Overview","description":"Get efficiency metrics overview.\n\nReturns aggregate metrics including average tokens per call,\naverage cost per call, and totals for the time range. Platform admins only.\n\nCombines historical data from pre-aggregated daily summaries with\nreal-time data for the current day.","operationId":"get_efficiency_overview_api_v1_analytics_efficiency_overview_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"time_range","in":"query","required":false,"schema":{"$ref":"#/components/schemas/TimeRange","description":"Time range for the query","default":"monthly"},"description":"Time range for the query"},{"name":"org_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by organization (null for platform-wide)","title":"Org Id"},"description":"Filter by organization (null for platform-wide)"},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EfficiencyOverviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/analytics/orgs/{org_id}/plan-efficiency":{"get":{"tags":["analytics"],"summary":"Get Org Plan Efficiency","description":"Get plan efficiency metrics for a specific organization.\n\nCalculates usage efficiency as a percentage of plan limits:\n- Monthly plans: Current calendar month usage vs plan_llm_tokens_per_month\n- Lifetime plans: Total usage vs plan_llm_tokens_total\n- Unlimited plans: Returns efficiency_percent=None\n\nPlatform admins only.","operationId":"get_org_plan_efficiency_api_v1_analytics_orgs__org_id__plan_efficiency_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanEfficiencyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/analytics/org-efficiency":{"get":{"tags":["analytics"],"summary":"Get Org Efficiency Overview","description":"Get efficiency metrics overview for all organizations.\n\nReturns color-coded efficiency thresholds:\n- RED (>90%): Consider upgrading to a higher tier\n- YELLOW (75-90%): Approaching plan limit, monitor usage\n- GREEN (25-75%): Healthy usage\n- BLUE (<25%): Consider downgrading to optimize costs\n\nIncludes top users and projects per organization.\nPlatform admins only.","operationId":"get_org_efficiency_overview_api_v1_analytics_org_efficiency_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"time_range","in":"query","required":false,"schema":{"$ref":"#/components/schemas/TimeRange","description":"Time range for the query","default":"monthly"},"description":"Time range for the query"},{"name":"org_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by organization (null for all orgs)","title":"Org Id"},"description":"Filter by organization (null for all orgs)"},{"name":"limit_users","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Max users per org","default":10,"title":"Limit Users"},"description":"Max users per org"},{"name":"limit_projects","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"description":"Max projects per org","default":10,"title":"Limit Projects"},"description":"Max projects per org"},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgEfficiencyResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/plan-recommendations/org/{org_id}":{"get":{"tags":["plan-recommendations"],"summary":"Get Active Recommendation","description":"Get the active plan recommendation for an organization.\n\nReturns the current active recommendation if one exists,\nor null if there is no active recommendation.\n\nPlatform admins only.","operationId":"get_active_recommendation_api_v1_plan_recommendations_org__org_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PlanRecommendationResponse"},{"type":"null"}],"title":"Response Get Active Recommendation Api V1 Plan Recommendations Org Org Id Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/plan-recommendations/org/{org_id}/efficiency":{"get":{"tags":["plan-recommendations"],"summary":"Get Efficiency Streak","description":"Get efficiency streak analysis for an organization.\n\nAnalyzes recent usage patterns to identify qualifying streaks\nfor upgrade or downgrade recommendations.\n\nPlatform admins only.","operationId":"get_efficiency_streak_api_v1_plan_recommendations_org__org_id__efficiency_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"lookback_days","in":"query","required":false,"schema":{"type":"integer","default":45,"title":"Lookback Days"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EfficiencyStreakInfo"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/plan-recommendations/org/{org_id}/evaluate":{"post":{"tags":["plan-recommendations"],"summary":"Evaluate Org Recommendation","description":"Evaluate an organization and create a recommendation if conditions are met.\n\nIf an active recommendation already exists, returns it.\nOtherwise, analyzes usage patterns and creates a new recommendation\nif qualifying streaks are found.\n\nPlatform admins only.","operationId":"evaluate_org_recommendation_api_v1_plan_recommendations_org__org_id__evaluate_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvaluateRecommendationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/plan-recommendations/{recommendation_id}/dismiss":{"post":{"tags":["plan-recommendations"],"summary":"Dismiss Recommendation","description":"Dismiss a plan recommendation.\n\nMarks the recommendation as dismissed and records who dismissed it.\n\nPlatform admins only.","operationId":"dismiss_recommendation_api_v1_plan_recommendations__recommendation_id__dismiss_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"recommendation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Recommendation Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DismissRecommendationRequest"},{"type":"null"}],"title":"Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlanRecommendationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/plan-recommendations/process-all":{"post":{"tags":["plan-recommendations"],"summary":"Process All Orgs","description":"Batch process all organizations for plan recommendations.\n\nEvaluates all organizations and creates recommendations where\nqualifying usage patterns are found. Also expires stale recommendations\nwhere patterns have changed.\n\nThis endpoint is typically called by a scheduled job but can be\ntriggered manually by platform admins.\n\nPlatform admins only.","operationId":"process_all_orgs_api_v1_plan_recommendations_process_all_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessAllOrgsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/plan-recommendations":{"get":{"tags":["plan-recommendations"],"summary":"List All Recommendations","description":"List all plan recommendations.\n\nOptionally filter by status (active, dismissed, expired).\n\nPlatform admins only.","operationId":"list_all_recommendations_api_v1_plan_recommendations_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/RecommendationStatus"},{"type":"null"}],"title":"Status"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PlanRecommendationResponse"},"title":"Response List All Recommendations Api V1 Plan Recommendations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/invites/{token}":{"get":{"tags":["invite-acceptance"],"summary":"Validate Invite","description":"Validate an invitation token and return invite details.\n\nThis is a PUBLIC endpoint - no authentication required.\nReturns organization info, invited email, and role.\n\nFrontend behavior:\n- If user not logged in: Show \"Log in or sign up to accept\"\n- If user logged in: Show accept button\n\nArgs:\n token: Invitation token from email link\n db: Database session\n current_user: Optional authenticated user (for future use)\n\nReturns:\n InviteValidationResponse with invite details or error","operationId":"validate_invite_api_v1_invites__token__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteValidationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/invites/{token}/accept":{"post":{"tags":["invite-acceptance"],"summary":"Accept Invite","description":"Accept an invitation and join the organization.\n\nAUTHENTICATION REQUIRED.\n\nBehavior:\n- Validates token (pending, not expired)\n- Creates/updates org membership with role from invitation\n- Creates group memberships for assigned groups\n- Marks invitation as accepted\n\nEmail mismatch handling:\n- If current_user.email != invitation.email:\n - Logs warning for audit\n - Stores mismatch info in invitation metadata\n - Still allows acceptance (user may have multiple emails)\n\nArgs:\n token: Invitation token\n db: Database session\n current_user: Authenticated user accepting the invitation\n request: Optional request body (currently empty, for future extensibility)\n\nReturns:\n InviteAcceptResponse with org summary and groups added\n\nRaises:\n 401: Not authenticated\n 400: Invalid or expired invitation\n 404: Token not found","operationId":"accept_invite_api_v1_invites__token__accept_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteAcceptRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InviteAcceptResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/images/{image_id}":{"get":{"tags":["images"],"summary":"Serve Image","description":"Serve a resized image with signature validation.\n\nThis endpoint is used by coding agents to view images embedded in\nconversation.md. No JWT authentication required - security is provided\nvia HMAC signature with expiry.\n\nThe image is resized to fit within max_width x max_height while\nmaintaining aspect ratio. If the image is already smaller, it is\nreturned as-is.\n\nArgs:\n image_id: The image UUID\n max_width: Maximum width (default 800, max 4096)\n max_height: Maximum height (default 600, max 4096)\n exp: Expiry timestamp (Unix epoch)\n sig: HMAC signature\n\nReturns:\n Image bytes with appropriate Content-Type\n\nRaises:\n HTTPException 403: Invalid or expired signature\n HTTPException 404: Image not found\n HTTPException 500: Failed to fetch or process image","operationId":"serve_image_api_v1_images__image_id__get","parameters":[{"name":"image_id","in":"path","required":true,"schema":{"type":"string","title":"Image Id"}},{"name":"max_width","in":"query","required":false,"schema":{"type":"integer","maximum":4096,"minimum":1,"description":"Maximum image width","default":800,"title":"Max Width"},"description":"Maximum image width"},{"name":"max_height","in":"query","required":false,"schema":{"type":"integer","maximum":4096,"minimum":1,"description":"Maximum image height","default":600,"title":"Max Height"},"description":"Maximum image height"},{"name":"exp","in":"query","required":true,"schema":{"type":"integer","description":"Expiry timestamp (Unix epoch)","title":"Exp"},"description":"Expiry timestamp (Unix epoch)"},{"name":"sig","in":"query","required":true,"schema":{"type":"string","description":"HMAC signature","title":"Sig"},"description":"HMAC signature"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/images/{image_id}/url":{"get":{"tags":["images"],"summary":"Get Image Url","description":"Get an HMAC-signed proxy URL for an image by ID.\n\nThis authenticated endpoint allows the UI to fetch image URLs\nfor display in phase/feature descriptions and other contexts.\nThe returned URL points to the backend image proxy endpoint,\nnot directly to S3.\n\nArgs:\n image_id: The image UUID\n thumbnail: If True, return thumbnail URL (200x200) instead of full image (800x800)\n\nReturns:\n HMAC-signed backend proxy URL for the image\n\nRaises:\n HTTPException 404: Image not found","operationId":"get_image_url_api_v1_images__image_id__url_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"image_id","in":"path","required":true,"schema":{"type":"string","title":"Image Id"}},{"name":"thumbnail","in":"query","required":false,"schema":{"type":"boolean","description":"Get thumbnail URL instead of full image","default":false,"title":"Thumbnail"},"description":"Get thumbnail URL instead of full image"},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routers__images__ImageUrlResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/slack/install":{"get":{"tags":["slack-oauth"],"summary":"Slack Install","description":"Redirect to Slack's OAuth authorization page.\n\nGenerates a CSRF state token, stores it in the state store,\nand redirects the user to Slack's authorization URL.","operationId":"slack_install_api_v1_slack_install_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/slack/oauth_redirect":{"get":{"tags":["slack-oauth"],"summary":"Slack Oauth Redirect","description":"Handle the OAuth callback from Slack.\n\nValidates the CSRF state, exchanges the authorization code for tokens,\nand saves the installation (with encrypted tokens) to the database.","operationId":"slack_oauth_redirect_api_v1_slack_oauth_redirect_get","parameters":[{"name":"code","in":"query","required":false,"schema":{"type":"string","title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"type":"string","title":"State"}},{"name":"error","in":"query","required":false,"schema":{"type":"string","title":"Error"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/slack/status":{"get":{"tags":["slack-oauth"],"summary":"Slack Status","description":"Return Slack bot configuration status.\n\nAvailable to any authenticated user. Shows configuration state,\nconnected workspaces, and channel link counts.","operationId":"slack_status_api_v1_slack_status_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SlackBotStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/slack/workspaces/{team_id}":{"delete":{"tags":["slack-oauth"],"summary":"Slack Disconnect Workspace","description":"Disconnect a Slack workspace by removing its installation.\n\nRequires platform admin access.","operationId":"slack_disconnect_workspace_api_v1_slack_workspaces__team_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"team_id","in":"path","required":true,"schema":{"type":"string","title":"Team Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs":{"get":{"tags":["organizations"],"summary":"List User Orgs","description":"List all organizations the current user belongs to.\n\nThis is a protected endpoint that requires a valid JWT token.\nReturns all organizations the user is a member of, along with their role in each.\n\nArgs:\n current_user: Current authenticated user (injected by dependency)\n db: Database session\n\nReturns:\n List of OrgMembershipResponse containing organization details and user's role","operationId":"list_user_orgs_api_v1_orgs_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/app__schemas__org__OrgMembershipResponse"},"title":"Response List User Orgs Api V1 Orgs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/members":{"get":{"tags":["organizations"],"summary":"List Org Members","description":"List all members of an organization.\n\nThis endpoint requires the user to be an admin or owner of the organization.\nReturns all members with their roles and join dates.\n\nPermission Required: Owner or Admin role in the organization\n\nArgs:\n org_context: Current org context with permission info (injected by dependency)\n db: Database session\n\nReturns:\n List of OrgMemberResponse with user details and roles\n\nRaises:\n 401: Not authenticated\n 404: Org not found or user not a member\n 403: User lacks admin permissions","operationId":"list_org_members_api_v1_orgs__org_id__members_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/OrgMemberResponse"},"title":"Response List Org Members Api V1 Orgs Org Id Members Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/shareable-subjects":{"get":{"tags":["organizations"],"summary":"Search Shareable Subjects","description":"Search for users and groups that can be shared with.\n\nThis endpoint powers the autocomplete in the project sharing UI.\nReturns org members (users) and groups, filtered by search query.\n\nAny org member can search (VIEWER role or higher).","operationId":"search_shareable_subjects_api_v1_orgs__org_id__shareable_subjects_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"q","in":"query","required":false,"schema":{"type":"string","minLength":0,"maxLength":100,"description":"Search query (matches email/display_name for users, name for groups)","default":"","title":"Q"},"description":"Search query (matches email/display_name for users, name for groups)"},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by type: 'user' or 'group'","title":"Type"},"description":"Filter by type: 'user' or 'group'"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of results","default":20,"title":"Limit"},"description":"Maximum number of results"},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ShareableSubjectsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}":{"patch":{"tags":["organizations"],"summary":"Update Org","description":"Update organization details.\n\nThis endpoint requires the user to be an admin or owner of the organization.\nCurrently supports updating the organization name.\n\nPermission Required: Owner or Admin role in the organization\n\nArgs:\n org_context: Current org context with permission info (injected by dependency)\n request: Update request containing the new name\n db: Database session\n scalekit_service: Scalekit service for syncing org name\n\nReturns:\n Updated OrgResponse\n\nRaises:\n 401: Not authenticated\n 404: Org not found or user not a member\n 403: User lacks admin permissions","operationId":"update_org_api_v1_orgs__org_id__patch","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/members/{user_id}":{"patch":{"tags":["organizations"],"summary":"Update Org Member Role","description":"Update an organization member's role.\n\nThis endpoint allows admins and owners to change member roles.\nAdmins can only change member/viewer roles, while owners can change any role.\n\nPermission Required: Admin or Owner role in the organization\n\nArgs:\n org_id: Organization ID\n user_id: User ID whose role should be updated\n request: Contains the new role to assign\n org_context: Current org context with permission info\n db: Database session\n\nReturns:\n Updated OrgMemberResponse\n\nRaises:\n 401: Not authenticated\n 403: Permission denied (self-role-change, admin trying to change admin/owner,\n or demoting the last owner)\n 404: Member not found","operationId":"update_org_member_role_api_v1_orgs__org_id__members__user_id__patch","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgMemberRoleUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgMemberResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["organizations"],"summary":"Remove Org Member","description":"Remove a member from an organization.\n\nThis endpoint removes the user from the organization both locally and in Scalekit.\nOnly admins/owners can remove members. Owners cannot be removed.\n\nPermission Required: Owner or Admin role in the organization\n\nArgs:\n org_id: Organization ID\n user_id: User ID to remove\n org_context: Current org context with permission info\n db: Database session\n scalekit_service: Scalekit service for API calls\n\nRaises:\n 401: Not authenticated\n 403: User lacks admin permissions or trying to remove owner\n 404: Member not found","operationId":"remove_org_member_api_v1_orgs__org_id__members__user_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/projects":{"post":{"tags":["projects"],"summary":"Create Project","description":"Create a new application project.\n\nUse /projects/{app_id}/features or /projects/{app_id}/bugfixes for child projects.\nRequires MEMBER role or higher.","operationId":"create_project_api_v1_orgs__org_id__projects_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["projects"],"summary":"List Org Projects","description":"List projects the current user has access to in an organization.\n\nOnly returns projects the user can access via direct shares or group shares.\nOptional type filter: ?type=application","operationId":"list_org_projects_api_v1_orgs__org_id__projects_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProjectResponse"},"title":"Response List Org Projects Api V1 Orgs Org Id Projects Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/generate-prefix":{"post":{"tags":["projects"],"summary":"Generate Prefix","description":"Generate a suggested ticket prefix for a project name.\n\nUses LLM to generate a memorable prefix based on the project name.\nFalls back to acronym-based generation if LLM is unavailable.\n\nRequires MEMBER role or higher.","operationId":"generate_prefix_api_v1_orgs__org_id__generate_prefix_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratePrefixRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratePrefixResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/check-prefix/{prefix}":{"get":{"tags":["projects"],"summary":"Check Prefix Availability","description":"Check if a ticket prefix is available in the organization.\n\nValidates prefix format and checks uniqueness.\n\nRequires MEMBER role or higher.","operationId":"check_prefix_availability_api_v1_orgs__org_id__check_prefix__prefix__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"prefix","in":"path","required":true,"schema":{"type":"string","title":"Prefix"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CheckPrefixResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/load-sample-project":{"post":{"tags":["projects"],"summary":"Load Sample Project","description":"Load a sample project into the organization.\n\nCurrently supports:\n- flappy_mcvibe: A sample game project demonstrating the MFBT workflow\n\nAllows creating duplicate sample projects with unique names and keys.\nRequires MEMBER role or higher.","operationId":"load_sample_project_api_v1_orgs__org_id__load_sample_project_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoadSampleProjectRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects":{"get":{"tags":["projects"],"summary":"List All Accessible Projects","description":"List all projects the current user has access to across all organizations.\n\nUsed by OAuth consent flow when user needs to select a project.\nOptional type filter: ?type=application","operationId":"list_all_accessible_projects_api_v1_projects_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProjectResponse"},"title":"Response List All Accessible Projects Api V1 Projects Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}":{"get":{"tags":["projects"],"summary":"Get Project","description":"Get a project by ID, short_id, or URL identifier.\n\nRequires org membership to view.","operationId":"get_project_api_v1_projects__project_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["projects"],"summary":"Update Project","description":"Update a project.\n\nFor now, only the creator can update (Step 8 will add project-level roles).\nNote: GitHub repos are now managed via /projects/{id}/repositories endpoints.","operationId":"update_project_api_v1_projects__project_id__patch","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["projects"],"summary":"Delete Project","description":"Soft delete a project.\n\nOnly the creator can delete.","operationId":"delete_project_api_v1_projects__project_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/my-role":{"get":{"tags":["projects"],"summary":"Get My Project Role","description":"Get the current user's role in this project.\n\nReturns role and boolean flags for permission checking.","operationId":"get_my_project_role_api_v1_projects__project_id__my_role_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MyProjectRoleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/archive":{"post":{"tags":["projects"],"summary":"Archive Project","description":"Archive a project.\n\nFor now, only the creator can archive.","operationId":"archive_project_api_v1_projects__project_id__archive_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/clone":{"post":{"tags":["projects"],"summary":"Clone Project","description":"Clone a project with selective copying.\n\nAny org member can clone a project.","operationId":"clone_project_api_v1_projects__project_id__clone_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CloneProjectRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{parent_project_id}/features":{"post":{"tags":["projects"],"summary":"Create Feature","description":"Create a feature project under an application.\n\nParent project must be type APPLICATION.\nRequires org membership.","operationId":"create_feature_api_v1_projects__parent_project_id__features_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"parent_project_id","in":"path","required":true,"schema":{"type":"string","title":"Parent Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__project__FeatureCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{parent_project_id}/bugfixes":{"post":{"tags":["projects"],"summary":"Create Bugfix","description":"Create a bugfix project under an application.\n\nParent project must be type APPLICATION.\nRequires org membership.","operationId":"create_bugfix_api_v1_projects__parent_project_id__bugfixes_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"parent_project_id","in":"path","required":true,"schema":{"type":"string","title":"Parent Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BugfixCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{parent_project_id}/children":{"get":{"tags":["projects"],"summary":"List Project Children","description":"List all child projects (features and bugfixes) of a parent project.\n\nOptional type filter: ?type=feature or ?type=bugfix\nRequires org membership.","operationId":"list_project_children_api_v1_projects__parent_project_id__children_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"parent_project_id","in":"path","required":true,"schema":{"type":"string","title":"Parent Project Id"}},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProjectResponse"},"title":"Response List Project Children Api V1 Projects Parent Project Id Children Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/members":{"post":{"tags":["projects"],"summary":"Add Project Member","description":"Add a member to a project.\n\nDEPRECATED: Use POST /projects/{project_id}/shares instead.\nThis endpoint only supports user shares. The new /shares endpoint\nsupports both users and groups.\n\nRequires ADMIN or OWNER role in the project.\nThe user being added must be a member of the parent organization.","operationId":"add_project_member_api_v1_projects__project_id__members_post","deprecated":true,"security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectMemberCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectMembershipResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["projects"],"summary":"List Project Members","description":"List all members of a project.\n\nDEPRECATED: Use GET /projects/{project_id}/shares instead.\nThe new endpoint returns both user and group shares.\n\nAny project member can view the member list.","operationId":"list_project_members_api_v1_projects__project_id__members_get","deprecated":true,"security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProjectMemberResponse"},"title":"Response List Project Members Api V1 Projects Project Id Members Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/members/{user_id}":{"delete":{"tags":["projects"],"summary":"Remove Project Member","description":"Remove a member from a project.\n\nDEPRECATED: Use DELETE /projects/{project_id}/shares/{share_id} instead.\n\nRequires ADMIN or OWNER role in the project.\nCannot remove yourself if you're the only owner.","operationId":"remove_project_member_api_v1_projects__project_id__members__user_id__delete","deprecated":true,"security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/accessible-users":{"get":{"tags":["projects"],"summary":"List Project Accessible Users","description":"List all users who can access this project.\n\nReturns users who have access via:\n- Direct user shares\n- Group shares (expanded to members)\n- Org shares (if exists)\n\nUsed for @mention autocomplete in editors.\nAny project member can view the accessible users list.","operationId":"list_project_accessible_users_api_v1_projects__project_id__accessible_users_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProjectAccessibleUserResponse"},"title":"Response List Project Accessible Users Api V1 Projects Project Id Accessible Users Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/sync":{"post":{"tags":["projects"],"summary":"Trigger Bug Sync","description":"Trigger a manual bug sync for a bugfix project.\n\nRequires MEMBER role or higher.\nOnly works for bugfix projects with external_ticket_id configured.","operationId":"trigger_bug_sync_api_v1_projects__project_id__sync_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/sync-history":{"get":{"tags":["projects"],"summary":"Get Bug Sync History","description":"Get bug sync history for a project.\n\nRequires VIEWER role or higher.","operationId":"get_bug_sync_history_api_v1_projects__project_id__sync_history_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":10,"title":"Limit"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BugSyncHistoryResponse"},"title":"Response Get Bug Sync History Api V1 Projects Project Id Sync History Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/repositories":{"post":{"tags":["project-repositories"],"summary":"Create Project Repository","description":"Create a new repository for a project.\n\nRequires ADMIN or OWNER role in the project.","operationId":"create_project_repository_api_v1_projects__project_id__repositories_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectRepositoryCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectRepositoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["project-repositories"],"summary":"List Project Repositories","description":"List all repositories for a project.\n\nRequires VIEWER role or higher.","operationId":"list_project_repositories_api_v1_projects__project_id__repositories_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProjectRepositoryResponse"},"title":"Response List Project Repositories Api V1 Projects Project Id Repositories Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/repositories/{slug}":{"get":{"tags":["project-repositories"],"summary":"Get Project Repository","description":"Get a specific repository by slug.\n\nRequires VIEWER role or higher.","operationId":"get_project_repository_api_v1_projects__project_id__repositories__slug__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectRepositoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["project-repositories"],"summary":"Update Project Repository","description":"Update a repository.\n\nRequires ADMIN or OWNER role in the project.","operationId":"update_project_repository_api_v1_projects__project_id__repositories__slug__patch","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectRepositoryUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectRepositoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["project-repositories"],"summary":"Delete Project Repository","description":"Delete a repository.\n\nRequires ADMIN or OWNER role in the project.","operationId":"delete_project_repository_api_v1_projects__project_id__repositories__slug__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/repositories/reorder":{"put":{"tags":["project-repositories"],"summary":"Reorder Project Repositories","description":"Reorder repositories.\n\nRequires ADMIN or OWNER role in the project.\nThe first slug in the list becomes the primary repository (sort_order 0).","operationId":"reorder_project_repositories_api_v1_projects__project_id__repositories_reorder_put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReorderRepositoriesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProjectRepositoryResponse"},"title":"Response Reorder Project Repositories Api V1 Projects Project Id Repositories Reorder Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/threads":{"get":{"tags":["threads"],"summary":"List Project Threads","description":"List all threads for a project, with optional filters.","operationId":"list_project_threads_api_v1_projects__project_id__threads_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"context_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ContextType"},{"type":"null"}],"title":"Context Type"}},{"name":"context_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ThreadListResponse"},"title":"Response List Project Threads Api V1 Projects Project Id Threads Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["threads"],"summary":"Create Thread","description":"Create a new thread in a project.","operationId":"create_thread_api_v1_projects__project_id__threads_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/threads/{thread_id}":{"get":{"tags":["threads"],"summary":"Get Thread","description":"Get a thread by ID with all its comments and items.","operationId":"get_thread_api_v1_threads__thread_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["threads"],"summary":"Update Thread","description":"Update a thread's title.","operationId":"update_thread_api_v1_threads__thread_id__patch","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/threads/{thread_id}/comments":{"post":{"tags":["threads"],"summary":"Create Comment","description":"Create a new comment on a thread.","operationId":"create_comment_api_v1_threads__thread_id__comments_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/comments/{comment_id}":{"patch":{"tags":["threads"],"summary":"Update Comment","description":"Update a comment's body.","operationId":"update_comment_api_v1_comments__comment_id__patch","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"comment_id","in":"path","required":true,"schema":{"type":"string","title":"Comment Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["threads"],"summary":"Delete Comment","description":"Delete a comment.","operationId":"delete_comment_api_v1_comments__comment_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"comment_id","in":"path","required":true,"schema":{"type":"string","title":"Comment Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/threads/{thread_id}/approve":{"post":{"tags":["threads"],"summary":"Approve Thread","description":"Approve a thread that was pending approval.","operationId":"approve_thread_api_v1_threads__thread_id__approve_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/threads/{thread_id}/ai-mention":{"post":{"tags":["threads"],"summary":"Invoke Ai Mention","description":"Invoke @MFBTAI assistant for a thread (async background job).\n\nThis endpoint:\n1. Validates thread access and feature existence\n2. Creates a background job to process the AI mention\n3. Returns 202 ACCEPTED with job_id\n\nThe AI response will be:\n- Created as a thread item by the background worker\n- Broadcast to clients via WebSocket (thread_item_created event)\n\nThe assistant provides structured responses with:\n- Summary\n- Key Points\n- Next Steps\n- Risks / Watchouts","operationId":"invoke_ai_mention_api_v1_threads__thread_id__ai_mention_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIMentionRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIMentionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/threads/{thread_id}/ai-error":{"delete":{"tags":["threads"],"summary":"Clear Ai Error","description":"Clear AI error state from a thread.\n\nCalled when the user retries an AI mention after a failure.\nThis clears the persisted error state that survives page refreshes.","operationId":"clear_ai_error_api_v1_threads__thread_id__ai_error_delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/threads/{thread_id}/cancel":{"post":{"tags":["threads"],"summary":"Cancel Thread Ai Response","description":"Cancel any in-progress AI response or code exploration for a thread.\n\nAlso clears generation flags and error state to recover from stuck states\nand dismiss errors.","operationId":"cancel_thread_ai_response_api_v1_threads__thread_id__cancel_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/threads/{thread_id}/typing":{"post":{"tags":["threads"],"summary":"Send Typing Indicator","description":"Send a typing indicator for a thread.\n\nThe typing state is stored in Redis with a 5-second TTL.\nAll org members connected via WebSocket will receive the update.","operationId":"send_typing_indicator_api_v1_threads__thread_id__typing_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routers__project_chats__TypingIndicatorRequest"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/versions/{version_id}/threads":{"get":{"tags":["threads"],"summary":"List Threads For Version","description":"List all threads for a specific draft version.\n\nThese are threads anchored to blocks within a spec or prompt plan draft.","operationId":"list_threads_for_version_api_v1_versions__version_id__threads_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"version_id","in":"path","required":true,"schema":{"type":"string","title":"Version Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ThreadListResponse"},"title":"Response List Threads For Version Api V1 Versions Version Id Threads Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["threads"],"summary":"Create Version Thread","description":"Create a new thread anchored to a block in a draft version.\n\nRequires MEMBER role or higher.","operationId":"create_version_thread_api_v1_versions__version_id__threads_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"version_id","in":"path","required":true,"schema":{"type":"string","title":"Version Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VersionThreadCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/versions/{version_id}/blocks-with-threads":{"get":{"tags":["threads"],"summary":"Get Blocks With Threads","description":"Get list of block IDs that have threads for a draft version.\n\nUseful for highlighting which blocks have discussion threads in the UI.","operationId":"get_blocks_with_threads_api_v1_versions__version_id__blocks_with_threads_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"version_id","in":"path","required":true,"schema":{"type":"string","title":"Version Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"string"},"title":"Response Get Blocks With Threads Api V1 Versions Version Id Blocks With Threads Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/threads/{thread_id}/spec-draft-ai-mention":{"post":{"tags":["threads"],"summary":"Invoke Spec Draft Ai Mention","description":"Invoke @MFBTAI assistant for a spec/prompt plan draft discussion thread (async background job).\n\nThis endpoint is similar to the regular ai-mention endpoint, but instead of loading\nfeature context, it loads spec draft context (the full document, the selected block,\nand related phase information).\n\nThe AI response will be:\n- Created as a thread item by the background worker\n- Broadcast to clients via WebSocket (thread_item_created event)","operationId":"invoke_spec_draft_ai_mention_api_v1_threads__thread_id__spec_draft_ai_mention_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SpecDraftAIMentionRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AIMentionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/threads/{thread_id}/items/comments":{"post":{"summary":"Create Comment Item","description":"Create a new comment item on a thread.\n\nThis is the new endpoint for creating comments in the thread_items architecture.","operationId":"create_comment_item_api_v1_threads__thread_id__items_comments_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"thread_id","in":"path","required":true,"schema":{"type":"string","title":"Thread Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCommentItem"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/thread-items/{item_id}/answer":{"post":{"summary":"Answer Mcq Item","description":"Answer an MCQ follow-up item, or change an existing answer.\n\nUpdates the item with the selected option and optional free text.\n\nIf changing an existing answer and there are downstream items:\n- Without force_change=True: Returns 409 Conflict with downstream item count\n- With force_change=True: Deletes downstream items and updates the answer","operationId":"answer_mcq_item_api_v1_thread_items__item_id__answer_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMCQAnswer"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/thread-items/{item_id}/downstream-count":{"get":{"summary":"Get Downstream Count","description":"Check if an MCQ has downstream items that would be deleted if the answer is changed.\n\nUsed by frontend to determine whether to show a confirmation dialog before\nallowing the user to change their MCQ answer.","operationId":"get_downstream_count_api_v1_thread_items__item_id__downstream_count_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DownstreamItemsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/thread-items/{item_id}":{"delete":{"summary":"Delete Thread Item","description":"Delete a thread item.\n\nOnly the author or org admins can delete items.","operationId":"delete_thread_item_api_v1_thread_items__item_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/thread-items/{item_id}/start-over":{"post":{"summary":"Start Over From Item","description":"Start over from this item - delete it and all items after it.\n\nOnly the author of the starting item can trigger this operation.\nThis will also reset the thread's decision summary and trigger\nre-summarization if any items remain.","operationId":"start_over_from_item_api_v1_thread_items__item_id__start_over_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StartOverResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/thread-items/{item_id}/reactions":{"post":{"summary":"Toggle Reaction","description":"Toggle a reaction on a thread item.\n\nIf the user hasn't reacted with this emoji, add their reaction.\nIf they have, remove it.\n\nOnly works on COMMENT type items (human user comments).","operationId":"toggle_reaction_api_v1_thread_items__item_id__reactions_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToggleReactionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToggleReactionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/integrations":{"post":{"tags":["integrations"],"summary":"Create Integration Config","description":"Create a new integration config.\n\nRequires ADMIN role or higher.","operationId":"create_integration_config_api_v1_orgs__org_id__integrations_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationConfigCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["integrations"],"summary":"List Integration Configs","description":"List integration configs for an organization filtered by user visibility.\n\nRequires MEMBER role or higher.\nReturns only configs the user can access (org-wide, owned, or shared).","operationId":"list_integration_configs_api_v1_orgs__org_id__integrations_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationConfigResponse"},"title":"Response List Integration Configs Api V1 Orgs Org Id Integrations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/integrations/{config_id}":{"get":{"tags":["integrations"],"summary":"Get Integration Config","description":"Get a specific integration config by ID.\n\nRequires MEMBER role or higher and visibility access.","operationId":"get_integration_config_api_v1_orgs__org_id__integrations__config_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"config_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Config Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["integrations"],"summary":"Update Integration Config","description":"Update an existing integration config.\n\nRequires MEMBER role + management permission (creator or org admin).","operationId":"update_integration_config_api_v1_orgs__org_id__integrations__config_id__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"config_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Config Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationConfigUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationConfigResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["integrations"],"summary":"Delete Integration Config","description":"Delete an integration config.\n\nRequires MEMBER role + management permission (creator or org admin).","operationId":"delete_integration_config_api_v1_orgs__org_id__integrations__config_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"config_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Config Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/integrations/test":{"post":{"tags":["integrations"],"summary":"Test Integration Config","description":"Test an integration config (LLM or bug tracker).\n\nRequires ADMIN role or higher.","operationId":"test_integration_config_api_v1_orgs__org_id__integrations_test_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationTestRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationTestResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/integrations/github/repositories":{"post":{"tags":["integrations"],"summary":"List Github Repositories","description":"List available GitHub repositories for the provided credentials.\n\nRequires ADMIN role or higher.\nUsed by frontend to populate repository multi-select when configuring GitHub connector.","operationId":"list_github_repositories_api_v1_orgs__org_id__integrations_github_repositories_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositoryListRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositoryListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/github/repos":{"get":{"tags":["integrations"],"summary":"List Org Github Repos","description":"List GitHub repos using org's Code Explorer GitHub connector.\n\nUses the GitHub connector selected in org's LLM preferences for Code Explorer,\nor falls back to the first available GitHub connector.\n\nRequires MEMBER role or higher.","operationId":"list_org_github_repos_api_v1_orgs__org_id__github_repos_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Per Page"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositoryListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/integrations/{config_id}/github/repos":{"get":{"tags":["integrations"],"summary":"List Connector Github Repos","description":"List GitHub repos for a specific connector.\n\nRequires MEMBER role and visibility access to the connector.","operationId":"list_connector_github_repos_api_v1_orgs__org_id__integrations__config_id__github_repos_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"config_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Config Id"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","default":1,"title":"Page"}},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Per Page"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RepositoryListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/integrations/{config_id}/shares":{"get":{"tags":["integrations"],"summary":"List Integration Config Shares","description":"List all shares for an integration config.\n\nRequires management permission (creator or org admin).","operationId":"list_integration_config_shares_api_v1_orgs__org_id__integrations__config_id__shares_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"config_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Config Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationConfigShareListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["integrations"],"summary":"Create Integration Config Share","description":"Create a new share for an integration config.\n\nRequires management permission (creator or org admin).","operationId":"create_integration_config_share_api_v1_orgs__org_id__integrations__config_id__shares_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"config_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Config Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationConfigShareCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationConfigShareResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/integrations/{config_id}/shares/{share_id}":{"delete":{"tags":["integrations"],"summary":"Delete Integration Config Share","description":"Delete a share from an integration config.\n\nRequires management permission (creator or org admin).","operationId":"delete_integration_config_share_api_v1_orgs__org_id__integrations__config_id__shares__share_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"config_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Config Id"}},{"name":"share_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Share Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/integrations/github/oauth/available":{"get":{"tags":["integrations"],"summary":"Github Oauth Available","description":"Check if GitHub OAuth is configured and available.\n\nChecks both UI-configured credentials (Platform Settings) and\nenvironment variable credentials.","operationId":"github_oauth_available_api_v1_orgs__org_id__integrations_github_oauth_available_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Github Oauth Available Api V1 Orgs Org Id Integrations Github Oauth Available Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/integrations/github/oauth/initiate":{"post":{"tags":["integrations"],"summary":"Github Oauth Initiate","description":"Initiate GitHub OAuth flow for connector creation.\n\nReturns an authorization URL that should be opened in a popup window.\nUses credentials from Platform Settings (UI) or environment variables.","operationId":"github_oauth_initiate_api_v1_orgs__org_id__integrations_github_oauth_initiate_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitHubOAuthInitiateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitHubOAuthInitiateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/integrations/github/oauth/callback":{"get":{"tags":["integrations"],"summary":"Github Oauth Callback","description":"Handle GitHub OAuth callback.\n\nReturns HTML that communicates the result to the parent window and closes.\nThis endpoint is called in a popup window after GitHub redirects.\nThe org_id is retrieved from the validated state parameter.","operationId":"github_oauth_callback_api_v1_integrations_github_oauth_callback_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"code","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"}},{"name":"state","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},{"name":"error","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},{"name":"error_description","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Description"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/llm-preferences":{"get":{"tags":["llm-preferences"],"summary":"Get Llm Preferences","description":"Get LLM preferences for an organization.\n\nReturns null if no preferences are set yet.\nRequires MEMBER role or higher.","operationId":"get_llm_preferences_api_v1_orgs__org_id__llm_preferences_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/LLMPreferenceResponse"},{"type":"null"}],"title":"Response Get Llm Preferences Api V1 Orgs Org Id Llm Preferences Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["llm-preferences"],"summary":"Update Llm Preferences","description":"Update LLM preferences for an organization.\n\nCreates preferences if they don't exist yet.\nRequires ADMIN role or higher.","operationId":"update_llm_preferences_api_v1_orgs__org_id__llm_preferences_put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMPreferenceUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMPreferenceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/jobs":{"get":{"tags":["jobs"],"summary":"List Org Jobs","description":"List all jobs for an organization, optionally filtered by project and status.\n\nRequires organization membership (any role).\n\nArgs:\n project_id: Optional project ID (UUID or URL identifier) to filter jobs\n status: Optional list of statuses to filter by (e.g., running, queued)\n limit: Maximum number of jobs to return (default 100, max 500)\n org_ctx: Organization context with permissions\n db: Database session\n\nReturns:\n List of jobs for the organization","operationId":"list_org_jobs_api_v1_orgs__org_id__jobs_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"project_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional project ID or URL identifier to filter jobs","title":"Project Id"},"description":"Optional project ID or URL identifier to filter jobs"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/JobStatus"}},{"type":"null"}],"description":"Filter by job status (can specify multiple)","title":"Status"},"description":"Filter by job status (can specify multiple)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Maximum number of jobs to return","default":100,"title":"Limit"},"description":"Maximum number of jobs to return"},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/JobListResponse"},"title":"Response List Org Jobs Api V1 Orgs Org Id Jobs Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/jobs/{job_id}":{"get":{"tags":["jobs"],"summary":"Get Job","description":"Get a specific job by ID.\n\nRequires organization membership for the job's organization.\n\nArgs:\n job_id: ID of the job\n current_user: The current authenticated user\n db: Database session\n\nReturns:\n The job details","operationId":"get_job_api_v1_jobs__job_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/oauth/authorize":{"post":{"tags":["MCP HTTP Transport"],"summary":"Oauth Consent","description":"OAuth consent endpoint - called by frontend when user approves/denies.\n\nThis endpoint requires authentication (session JWT).\nIt creates an authorization code and returns the redirect URL.","operationId":"oauth_consent_api_v1_oauth_authorize_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthConsentRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthConsentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/oauth/authorize/info":{"get":{"tags":["MCP HTTP Transport"],"summary":"Oauth Authorize Info","description":"Get information about an OAuth authorization request.\n\nUsed by frontend to display consent UI with client and project details.","operationId":"oauth_authorize_info_api_v1_oauth_authorize_info_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"client_id","in":"query","required":true,"schema":{"type":"string","title":"Client Id"}},{"name":"resource","in":"query","required":true,"schema":{"type":"string","title":"Resource"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/mcp/.well-known/oauth-protected-resource":{"get":{"tags":["MCP HTTP Transport"],"summary":"Project Oauth Protected Resource Metadata","description":"OAuth Protected Resource Metadata for a specific project (RFC 9728).\n\nReturns the resource URL for this specific MCP endpoint.","operationId":"project_oauth_protected_resource_metadata_api_v1_projects__project_id__mcp__well_known_oauth_protected_resource_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/mcp/.well-known/oauth-authorization-server":{"get":{"tags":["MCP HTTP Transport"],"summary":"Project Oauth Authorization Server Metadata","description":"OAuth Authorization Server Metadata for a specific project (RFC 8414).\n\nReturns authorization server metadata with project-specific resource URL.","operationId":"project_oauth_authorization_server_metadata_api_v1_projects__project_id__mcp__well_known_oauth_authorization_server_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/mcp/.well-known/openid-configuration":{"get":{"tags":["MCP HTTP Transport"],"summary":"Project Openid Configuration","description":"OpenID Connect Discovery for a specific project.\n\nReturns full OIDC-compatible metadata with resource URL.\nClaude Code validates against OIDC schema, so we include required OIDC fields.","operationId":"project_openid_configuration_api_v1_projects__project_id__mcp__well_known_openid_configuration_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/mcp":{"get":{"tags":["MCP HTTP Transport"],"summary":"Mcp Endpoint Info","description":"MCP HTTP transport discovery endpoint.\n\nReturns server information for clients testing connectivity.","operationId":"mcp_endpoint_info_api_v1_projects__project_id__mcp_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["MCP HTTP Transport"],"summary":"Mcp Endpoint","description":"MCP HTTP transport endpoint.\n\nAccepts JSON-RPC 2.0 requests and routes them to the appropriate MCP tool.\nAuthentication is done via API key (Bearer token).\n\nProject context is automatically injected - tools don't need project_id in params.\n\nExample request:\n```json\n{\n \"jsonrpc\": \"2.0\",\n \"id\": 1,\n \"method\": \"tools/call\",\n \"params\": {\n \"name\": \"getContext\",\n \"arguments\": {}\n }\n}\n```","operationId":"mcp_endpoint_api_v1_projects__project_id__mcp_post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JSONRPCRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/mcp/{api_key}":{"get":{"tags":["MCP HTTP Transport"],"summary":"Mcp Endpoint Info With Key","description":"MCP HTTP transport discovery endpoint (with API key in URL).\n\nWorkaround for Claude Code 2.1.x bug that ignores --header option.\nReturns server information for clients testing connectivity.","operationId":"mcp_endpoint_info_with_key_api_v1_projects__project_id__mcp__api_key__get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"api_key","in":"path","required":true,"schema":{"type":"string","title":"Api Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["MCP HTTP Transport"],"summary":"Mcp Endpoint With Key","description":"MCP HTTP transport endpoint (with API key in URL).\n\nWorkaround for Claude Code 2.1.x bug that ignores --header option.\nThe API key is passed in the URL path instead of Authorization header.\n\nUsage: POST /api/v1/projects/{project_id}/mcp/{api_key}","operationId":"mcp_endpoint_with_key_api_v1_projects__project_id__mcp__api_key__post","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"api_key","in":"path","required":true,"schema":{"type":"string","title":"Api Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JSONRPCRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mcp/images/upload":{"post":{"tags":["mcp-images"],"summary":"Upload Mcp Image","description":"Upload an image for use in MCP conversation comments.\n\nAuthentication is via a signed upload token obtained from conversations.md.\nThe token is scoped to a specific project, feature, and user.\n\nThe image is stored temporarily in the database and can be referenced\nin a conversation comment using the returned image_id. When the comment\nis created, the image is uploaded to S3 and attached to the thread item.\n\nSupported formats: PNG, JPG, JPEG, GIF, WebP\nMaximum size: 10MB\nExpiry: 1 hour (if not used in a comment)\n\nExample curl command:\n curl -X POST \"https://api.mfbt.io/api/v1/mcp/images/upload\" \\\n -H \"Authorization: Bearer <upload_token>\" \\\n -F \"file=@/path/to/screenshot.png\"","operationId":"upload_mcp_image_api_v1_mcp_images_upload_post","parameters":[{"name":"authorization","in":"header","required":true,"schema":{"type":"string","description":"Bearer <upload_token>","title":"Authorization"},"description":"Bearer <upload_token>"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_mcp_image_api_v1_mcp_images_upload_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPImageUploadResponse"}}}},"400":{"description":"Invalid file or request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPImageUploadError"}}}},"401":{"description":"Invalid or expired token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPImageUploadError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/modules":{"post":{"tags":["modules"],"summary":"Create Module","description":"Create a new module for a project.\n\nRequires MEMBER role or higher.","operationId":"create_module_api_v1_projects__project_id__modules_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModuleCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__module__ModuleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["modules"],"summary":"List Modules","description":"List all modules for a project.\n\nRequires VIEWER role or higher.","operationId":"list_modules_api_v1_projects__project_id__modules_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","description":"Include archived modules","default":false,"title":"Include Archived"},"description":"Include archived modules"},{"name":"brainstorming_phase_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by brainstorming phase ID or URL identifier","title":"Brainstorming Phase Id"},"description":"Filter by brainstorming phase ID or URL identifier"},{"name":"module_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ModuleType"},{"type":"null"}],"description":"Filter by module type (conversation or implementation)","title":"Module Type"},"description":"Filter by module type (conversation or implementation)"},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ModuleListResponse"},"title":"Response List Modules Api V1 Projects Project Id Modules Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/modules/{module_id}":{"get":{"tags":["modules"],"summary":"Get Module","description":"Get a specific module by ID.\n\nRequires org membership (privacy: returns 404 if not member).","operationId":"get_module_api_v1_modules__module_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"module_id","in":"path","required":true,"schema":{"type":"string","title":"Module Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__module__ModuleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["modules"],"summary":"Update Module","description":"Update a module.\n\nRequires MEMBER role or higher.","operationId":"update_module_api_v1_modules__module_id__patch","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"module_id","in":"path","required":true,"schema":{"type":"string","title":"Module Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModuleUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__module__ModuleResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/modules/{module_id}/implementation-progress":{"get":{"tags":["modules"],"summary":"Get Module Implementation Progress","description":"Get implementation progress for a module.\n\nReturns feature completion stats for the module.\nRequires org membership (privacy: returns 404 if not member).","operationId":"get_module_implementation_progress_api_v1_modules__module_id__implementation_progress_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"module_id","in":"path","required":true,"schema":{"type":"string","title":"Module Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModuleProgressResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/modules/{module_id}/archive":{"post":{"tags":["modules"],"summary":"Archive Module","description":"Archive a module and all its features.\n\nRequires ADMIN or OWNER role.","operationId":"archive_module_api_v1_modules__module_id__archive_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"module_id","in":"path","required":true,"schema":{"type":"string","title":"Module Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModuleArchiveResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/modules/{module_id}/features":{"post":{"tags":["features"],"summary":"Create Feature","description":"Create a new feature within a module.\n\nRequires MEMBER role or higher.","operationId":"create_feature_api_v1_modules__module_id__features_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"module_id","in":"path","required":true,"schema":{"type":"string","title":"Module Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__feature__FeatureCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__feature__FeatureResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/features":{"get":{"tags":["features"],"summary":"List Project Features","description":"List all features for a project with filtering, sorting, and pagination.\n\nRequires VIEWER role or higher.","operationId":"list_project_features_api_v1_projects__project_id__features_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","description":"Include archived features","default":false,"title":"Include Archived"},"description":"Include archived features"},{"name":"module_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by module ID or URL identifier","title":"Module Id"},"description":"Filter by module ID or URL identifier"},{"name":"brainstorming_phase_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by brainstorming phase ID or URL identifier","title":"Brainstorming Phase Id"},"description":"Filter by brainstorming phase ID or URL identifier"},{"name":"feature_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/FeatureType"},{"type":"null"}],"description":"Filter by feature type (conversation or implementation)","title":"Feature Type"},"description":"Filter by feature type (conversation or implementation)"},{"name":"priority","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/FeaturePriority"}},{"type":"null"}],"description":"Filter by priority levels","title":"Priority"},"description":"Filter by priority levels"},{"name":"completion_status","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/FeatureCompletionStatus"}},{"type":"null"}],"description":"Filter by completion status","title":"Completion Status"},"description":"Filter by completion status"},{"name":"provenance","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/FeatureProvenance"}},{"type":"null"}],"description":"Filter by provenance (system, user, restored)","title":"Provenance"},"description":"Filter by provenance (system, user, restored)"},{"name":"has_spec","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by features with/without spec","title":"Has Spec"},"description":"Filter by features with/without spec"},{"name":"has_notes","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by features with/without notes","title":"Has Notes"},"description":"Filter by features with/without notes"},{"name":"external_provider","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by external provider (github, jira, none)","title":"External Provider"},"description":"Filter by external provider (github, jira, none)"},{"name":"sort_by","in":"query","required":false,"schema":{"$ref":"#/components/schemas/FeatureSortField","description":"Field to sort by","default":"updated_at"},"description":"Field to sort by"},{"name":"sort_order","in":"query","required":false,"schema":{"$ref":"#/components/schemas/SortOrder","description":"Sort order","default":"desc"},"description":"Sort order"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Maximum number of features to return","default":100,"title":"Limit"},"description":"Maximum number of features to return"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of features to skip","default":0,"title":"Offset"},"description":"Number of features to skip"},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedFeaturesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/features/{feature_id}":{"get":{"tags":["features"],"summary":"Get Feature","description":"Get a specific feature by ID.\n\nRequires org membership (privacy: returns 404 if not member).","operationId":"get_feature_api_v1_features__feature_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"feature_id","in":"path","required":true,"schema":{"type":"string","title":"Feature Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__feature__FeatureResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["features"],"summary":"Update Feature","description":"Update a feature.\n\nRequires MEMBER role or higher.","operationId":"update_feature_api_v1_features__feature_id__patch","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"feature_id","in":"path","required":true,"schema":{"type":"string","title":"Feature Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__feature__FeatureResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/features/{feature_id}/sidebar-data":{"get":{"tags":["features"],"summary":"Get Feature Sidebar Data","description":"Get sidebar data for a feature (decisions + engagement metrics).\n\nReturns decision summary, unresolved points, MCQ counts, and comment count.\nRequires org membership (privacy: returns 404 if not member).","operationId":"get_feature_sidebar_data_api_v1_features__feature_id__sidebar_data_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"feature_id","in":"path","required":true,"schema":{"type":"string","title":"Feature Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureSidebarData"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/features/{feature_id}/archive":{"post":{"tags":["features"],"summary":"Archive Feature","description":"Archive a feature.\n\nRequires ADMIN or OWNER role.","operationId":"archive_feature_api_v1_features__feature_id__archive_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"feature_id","in":"path","required":true,"schema":{"type":"string","title":"Feature Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__feature__FeatureResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/features/{feature_id}/restore":{"post":{"tags":["features"],"summary":"Restore Feature","description":"Restore an archived feature to a target module.\n\nRequires ADMIN or OWNER role.","operationId":"restore_feature_api_v1_features__feature_id__restore_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"feature_id","in":"path","required":true,"schema":{"type":"string","title":"Feature Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureRestoreRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__feature__FeatureResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/features/{feature_id}/start":{"post":{"tags":["features"],"summary":"Start Feature","description":"Start working on a feature (set completion status to IN_PROGRESS).\n\nRequires MEMBER role or higher.","operationId":"start_feature_api_v1_features__feature_id__start_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"feature_id","in":"path","required":true,"schema":{"type":"string","title":"Feature Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__feature__FeatureResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/features/{feature_id}/complete":{"post":{"tags":["features"],"summary":"Complete Feature","description":"Mark a feature as completed.\n\nRequires MEMBER role or higher.","operationId":"complete_feature_api_v1_features__feature_id__complete_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"feature_id","in":"path","required":true,"schema":{"type":"string","title":"Feature Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureCompleteRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__feature__FeatureResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/features/create-with-thread":{"post":{"tags":["features"],"summary":"Create Feature With Thread","description":"Create a new feature with an auto-created discussion thread.\n\nAllows selecting an existing module or creating a new one inline.\nRequires MEMBER role or higher.","operationId":"create_feature_with_thread_api_v1_projects__project_id__features_create_with_thread_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFeatureWithThreadRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureWithThreadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/features/import/search":{"post":{"tags":["features"],"summary":"Search Issues For Import","description":"Search for external issues to import.\n\nRequires MEMBER role or higher.","operationId":"search_issues_for_import_api_v1_projects__project_id__features_import_search_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueSearchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IssueSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/features/import/repositories":{"post":{"tags":["features"],"summary":"List Github Repositories For Import","description":"List GitHub repositories for a connector.\n\nRequires MEMBER role or higher.","operationId":"list_github_repositories_for_import_api_v1_projects__project_id__features_import_repositories_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectorSourcesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GitHubRepositoriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/features/import/jira-projects":{"post":{"tags":["features"],"summary":"List Jira Projects For Import","description":"List Jira projects for a connector.\n\nRequires MEMBER role or higher.","operationId":"list_jira_projects_for_import_api_v1_projects__project_id__features_import_jira_projects_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectorSourcesRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JiraProjectsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/features/import":{"post":{"tags":["features"],"summary":"Import Issue As Feature","description":"Import an external issue as a feature.\n\nRequires MEMBER role or higher.","operationId":"import_issue_as_feature_api_v1_projects__project_id__features_import_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureImportRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__feature__FeatureResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/features/{feature_id}/import-comments":{"get":{"tags":["features"],"summary":"Get Import Comments","description":"Get original comments for an imported feature.\n\nRequires VIEWER role or higher.","operationId":"get_import_comments_api_v1_projects__project_id__features__feature_id__import_comments_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"feature_id","in":"path","required":true,"schema":{"type":"string","title":"Feature Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FeatureImportCommentsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/features/{feature_id}/implementations":{"get":{"tags":["implementations"],"summary":"List Implementations","description":"List all implementations for a feature.","operationId":"list_implementations_api_v1_features__feature_id__implementations_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"feature_id","in":"path","required":true,"schema":{"type":"string","title":"Feature Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ImplementationListItem"},"title":"Response List Implementations Api V1 Features Feature Id Implementations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["implementations"],"summary":"Create Implementation","description":"Create a new implementation for a feature.\n\nRequires MEMBER role or higher on the project.\nEach implementation starts empty. The user generates spec/prompt_plan\nfor each implementation separately.","operationId":"create_implementation_api_v1_features__feature_id__implementations_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"feature_id","in":"path","required":true,"schema":{"type":"string","title":"Feature Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImplementationCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImplementationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/implementations/{implementation_id}":{"get":{"tags":["implementations"],"summary":"Get Implementation","description":"Get a specific implementation.","operationId":"get_implementation_api_v1_implementations__implementation_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"implementation_id","in":"path","required":true,"schema":{"type":"string","title":"Implementation Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImplementationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["implementations"],"summary":"Update Implementation","description":"Update an implementation.\n\nRequires MEMBER role or higher on the project.","operationId":"update_implementation_api_v1_implementations__implementation_id__patch","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"implementation_id","in":"path","required":true,"schema":{"type":"string","title":"Implementation Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImplementationUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImplementationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["implementations"],"summary":"Delete Implementation","description":"Delete an implementation.\n\nRequires MEMBER role or higher on the project.\nNote: Cannot delete if it's the only implementation for the feature.","operationId":"delete_implementation_api_v1_implementations__implementation_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"implementation_id","in":"path","required":true,"schema":{"type":"string","title":"Implementation Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/implementations/{implementation_id}/sidebar-data":{"get":{"tags":["implementations"],"summary":"Get Implementation Sidebar Data","description":"Get sidebar data for a specific implementation.","operationId":"get_implementation_sidebar_data_api_v1_implementations__implementation_id__sidebar_data_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"implementation_id","in":"path","required":true,"schema":{"type":"string","title":"Implementation Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImplementationSidebarData"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/implementations/{implementation_id}/complete":{"post":{"tags":["implementations"],"summary":"Mark Implementation Complete","description":"Mark an implementation as complete.\n\nRequires MEMBER role or higher on the project.","operationId":"mark_implementation_complete_api_v1_implementations__implementation_id__complete_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"implementation_id","in":"path","required":true,"schema":{"type":"string","title":"Implementation Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImplementationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/implementations/{implementation_id}/reopen":{"post":{"tags":["implementations"],"summary":"Reopen Implementation","description":"Mark an implementation as incomplete (reopen).\n\nRequires MEMBER role or higher on the project.","operationId":"reopen_implementation_api_v1_implementations__implementation_id__reopen_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"implementation_id","in":"path","required":true,"schema":{"type":"string","title":"Implementation Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImplementationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/implementations/{implementation_id}/clear-status-notes":{"post":{"tags":["implementations"],"summary":"Clear Implementation Status Notes","description":"Clear status and notes for a single implementation.\n\nRequires MEMBER role or higher on the project.\nClears: is_complete, completed_at, completed_by_id,\nimplementation_notes, notes_updated_by_agent, notes_updated_at","operationId":"clear_implementation_status_notes_api_v1_implementations__implementation_id__clear_status_notes_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"implementation_id","in":"path","required":true,"schema":{"type":"string","title":"Implementation Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImplementationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/features/{feature_id}/implementations/clear-status-notes":{"post":{"tags":["implementations"],"summary":"Clear All Implementations Status Notes","description":"Clear status and notes for all implementations of a feature.\n\nRequires MEMBER role or higher on the project.","operationId":"clear_all_implementations_status_notes_api_v1_features__feature_id__implementations_clear_status_notes_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"feature_id","in":"path","required":true,"schema":{"type":"string","title":"Feature Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClearStatusNotesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/implementations/{implementation_id}/set-primary":{"post":{"tags":["implementations"],"summary":"Set Implementation Primary","description":"Set an implementation as the primary one for its feature.\n\nRequires MEMBER role or higher on the project.","operationId":"set_implementation_primary_api_v1_implementations__implementation_id__set_primary_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"implementation_id","in":"path","required":true,"schema":{"type":"string","title":"Implementation Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImplementationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/implementations/{implementation_id}/auto-generate":{"post":{"tags":["implementations"],"summary":"Auto Generate Implementation Content","description":"Auto-generate spec and prompt plan for an implementation.\n\nRequires MEMBER role or higher on the project.\nCreates a spec generation job that will automatically chain to\nprompt plan generation upon completion.","operationId":"auto_generate_implementation_content_api_v1_implementations__implementation_id__auto_generate_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"implementation_id","in":"path","required":true,"schema":{"type":"string","title":"Implementation Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoGenerateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/implementations/{implementation_id}/cancel-generation":{"post":{"tags":["implementations"],"summary":"Cancel Implementation Generation","description":"Cancel in-progress spec/prompt_plan generation or clear stuck generation state.\n\nRequires MEMBER role or higher on the project.\nWorks even if no job is running - clears the DB flags to recover from crashes.\nCancels both spec and prompt_plan jobs if running (for chained generation).\n\nIf the implementation has no content after cancellation, it will be deleted\nand the \"Create Implementation\" button will reappear.","operationId":"cancel_implementation_generation_api_v1_implementations__implementation_id__cancel_generation_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"implementation_id","in":"path","required":true,"schema":{"type":"string","title":"Implementation Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CancelGenerationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/brainstorming-phases/{phase_id}/spec/drafts":{"get":{"tags":["drafts"],"summary":"List Spec Drafts","description":"List all spec drafts for a brainstorming phase.","operationId":"list_spec_drafts_api_v1_brainstorming_phases__phase_id__spec_drafts_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"phase_id","in":"path","required":true,"schema":{"type":"string","title":"Phase Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DraftListResponse"},"title":"Response List Spec Drafts Api V1 Brainstorming Phases Phase Id Spec Drafts Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["drafts"],"summary":"Create Spec Draft","description":"Create a new spec draft for a brainstorming phase.\n\nRequires MEMBER role or higher.","operationId":"create_spec_draft_api_v1_brainstorming_phases__phase_id__spec_drafts_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"phase_id","in":"path","required":true,"schema":{"type":"string","title":"Phase Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftVersionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftVersionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/brainstorming-phases/{phase_id}/spec/drafts/latest":{"get":{"tags":["drafts"],"summary":"Get Latest Spec Draft","description":"Get the latest spec draft for a brainstorming phase.","operationId":"get_latest_spec_draft_api_v1_brainstorming_phases__phase_id__spec_drafts_latest_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"phase_id","in":"path","required":true,"schema":{"type":"string","title":"Phase Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftVersionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/brainstorming-phases/{phase_id}/prompt-plan/drafts":{"get":{"tags":["drafts"],"summary":"List Prompt Plan Drafts","description":"List all prompt plan drafts for a brainstorming phase.","operationId":"list_prompt_plan_drafts_api_v1_brainstorming_phases__phase_id__prompt_plan_drafts_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"phase_id","in":"path","required":true,"schema":{"type":"string","title":"Phase Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DraftListResponse"},"title":"Response List Prompt Plan Drafts Api V1 Brainstorming Phases Phase Id Prompt Plan Drafts Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["drafts"],"summary":"Create Prompt Plan Draft","description":"Create a new prompt plan draft for a brainstorming phase.\n\nRequires MEMBER role or higher.","operationId":"create_prompt_plan_draft_api_v1_brainstorming_phases__phase_id__prompt_plan_drafts_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"phase_id","in":"path","required":true,"schema":{"type":"string","title":"Phase Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftVersionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftVersionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/brainstorming-phases/{phase_id}/prompt-plan/drafts/latest":{"get":{"tags":["drafts"],"summary":"Get Latest Prompt Plan Draft","description":"Get the latest prompt plan draft for a brainstorming phase.","operationId":"get_latest_prompt_plan_draft_api_v1_brainstorming_phases__phase_id__prompt_plan_drafts_latest_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"phase_id","in":"path","required":true,"schema":{"type":"string","title":"Phase Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftVersionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/spec-drafts/{version_id}":{"get":{"tags":["drafts"],"summary":"Get Spec Draft","description":"Get a specific spec draft by ID.","operationId":"get_spec_draft_api_v1_spec_drafts__version_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"version_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Version Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftVersionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/spec-drafts/{version_id}/finalize":{"post":{"tags":["drafts"],"summary":"Finalize Spec","description":"Generate a final spec from a draft version.\n\nRequires ADMIN or OWNER role.","operationId":"finalize_spec_api_v1_spec_drafts__version_id__finalize_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"version_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Version Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__final_version__FinalSpecResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/prompt-plan-drafts/{version_id}":{"get":{"tags":["drafts"],"summary":"Get Prompt Plan Draft","description":"Get a specific prompt plan draft by ID.","operationId":"get_prompt_plan_draft_api_v1_prompt_plan_drafts__version_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"version_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Version Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DraftVersionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/prompt-plan-drafts/{version_id}/finalize":{"post":{"tags":["drafts"],"summary":"Finalize Prompt Plan","description":"Generate a final prompt plan from a draft version.\n\nRequires ADMIN or OWNER role.","operationId":"finalize_prompt_plan_api_v1_prompt_plan_drafts__version_id__finalize_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"version_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Version Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__final_version__FinalPromptPlanResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/brainstorming-phases/{phase_id}/spec/final":{"get":{"tags":["drafts"],"summary":"Get Final Spec","description":"Get the final spec for a brainstorming phase.","operationId":"get_final_spec_api_v1_brainstorming_phases__phase_id__spec_final_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"phase_id","in":"path","required":true,"schema":{"type":"string","title":"Phase Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__final_version__FinalSpecResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/brainstorming-phases/{phase_id}/prompt-plan/final":{"get":{"tags":["drafts"],"summary":"Get Final Prompt Plan","description":"Get the final prompt plan for a brainstorming phase.","operationId":"get_final_prompt_plan_api_v1_brainstorming_phases__phase_id__prompt_plan_final_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"phase_id","in":"path","required":true,"schema":{"type":"string","title":"Phase Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__final_version__FinalPromptPlanResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/activity":{"get":{"tags":["activity"],"summary":"Get Project Activity","description":"Get aggregated activity for a project.\n\nIncludes activity for the project itself and all its entities:\nbrainstorming phases, modules, and features.\n\nRequires VIEWER role or higher.","operationId":"get_project_activity_api_v1_projects__project_id__activity_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project 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"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/brainstorming-phases/{phase_id}/activity":{"get":{"tags":["activity"],"summary":"Get Brainstorming Phase Activity","description":"Get activity for a brainstorming phase.\n\nRequires org membership.","operationId":"get_brainstorming_phase_activity_api_v1_brainstorming_phases__phase_id__activity_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"phase_id","in":"path","required":true,"schema":{"type":"string","title":"Phase 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"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/modules/{module_id}/activity":{"get":{"tags":["activity"],"summary":"Get Module Activity","description":"Get activity for a module.\n\nRequires org membership.","operationId":"get_module_activity_api_v1_modules__module_id__activity_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"module_id","in":"path","required":true,"schema":{"type":"string","title":"Module 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"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/features/{feature_id}/activity":{"get":{"tags":["activity"],"summary":"Get Feature Activity","description":"Get activity for a feature.\n\nRequires org membership.","operationId":"get_feature_activity_api_v1_features__feature_id__activity_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"feature_id","in":"path","required":true,"schema":{"type":"string","title":"Feature 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"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActivityListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/final-spec":{"get":{"tags":["Agent API"],"summary":"Get Final Specification","description":"Returns the finalized specification for the project. Only final data is exposed, never drafts or collaboration threads.","operationId":"get_final_spec_api_v1_projects__project_id__final_spec_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routers__agent_api__FinalSpecResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/final-prompt-plan":{"get":{"tags":["Agent API"],"summary":"Get Final Prompt Plan","description":"Returns the finalized prompt plan for the project. Only final data is exposed.","operationId":"get_final_prompt_plan_api_v1_projects__project_id__final_prompt_plan_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routers__agent_api__FinalPromptPlanResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/modules-features":{"get":{"tags":["Agent API"],"summary":"Get Modules and Features","description":"Returns all active (non-archived) modules and their features. Excludes archived items.","operationId":"get_modules_features_api_v1_projects__project_id__modules_features_get","parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModulesFeaturesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/platform/agent-logs":{"get":{"tags":["agent-logs"],"summary":"List Platform Agent Logs","description":"List jobs with their LLM call logs for the Agent Log page (platform admin).\n\nReturns jobs that have LLM usage across all organizations.\n\nArgs:\n user_id: Optional user ID to filter by who triggered the job\n project_id: Optional project ID to filter jobs\n limit: Maximum number of jobs to return (default 50, max 100)\n offset: Offset for pagination\n\nReturns:\n List of jobs with their call log summaries and pagination info","operationId":"list_platform_agent_logs_api_v1_platform_agent_logs_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"user_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by user who triggered the job","title":"User Id"},"description":"Filter by user who triggered the job"},{"name":"project_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by project ID","title":"Project Id"},"description":"Filter by project ID"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of jobs to return","default":50,"title":"Limit"},"description":"Maximum number of jobs to return"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Offset for pagination","default":0,"title":"Offset"},"description":"Offset for pagination"},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentLogListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/agent-logs":{"get":{"tags":["agent-logs"],"summary":"List Agent Logs","description":"List jobs with their LLM call logs for the Agent Log page.\n\nReturns jobs that have LLM usage, along with summary of each call made.\n\nArgs:\n project_id: Optional project ID to filter jobs\n limit: Maximum number of jobs to return (default 50, max 100)\n offset: Offset for pagination\n org_ctx: Organization context with permissions\n db: Database session\n\nReturns:\n List of jobs with their call log summaries","operationId":"list_agent_logs_api_v1_orgs__org_id__agent_logs_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"project_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by project ID","title":"Project Id"},"description":"Filter by project ID"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of jobs to return","default":50,"title":"Limit"},"description":"Maximum number of jobs to return"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Offset for pagination","default":0,"title":"Offset"},"description":"Offset for pagination"},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentLogListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/agent-log":{"get":{"tags":["agent-logs"],"summary":"List Project Agent Logs","description":"List jobs with their LLM call logs for a specific project.\n\nProject-scoped version of the agent logs endpoint.\nSupports optional filtering by job_type (e.g., 'grounding_update').\n\nArgs:\n job_type: Optional job type to filter (e.g., 'grounding_update')\n limit: Maximum number of jobs to return (default 50, max 100)\n offset: Offset for pagination\n project_ctx: Project context with permissions\n db: Database session\n\nReturns:\n List of jobs with their call log summaries","operationId":"list_project_agent_logs_api_v1_projects__project_id__agent_log_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"job_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by job type","title":"Job Type"},"description":"Filter by job type"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of jobs to return","default":50,"title":"Limit"},"description":"Maximum number of jobs to return"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Offset for pagination","default":0,"title":"Offset"},"description":"Offset for pagination"},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentLogListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/llm-call-logs/{call_log_id}":{"get":{"tags":["agent-logs"],"summary":"Get Call Log Detail","description":"Get detailed LLM call log including full request/response.\n\nRequires organization membership for the job's organization.\n\nArgs:\n call_log_id: ID of the call log\n current_user: The current authenticated user\n db: Database session\n\nReturns:\n Full call log details including request/response content","operationId":"get_call_log_detail_api_v1_llm_call_logs__call_log_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"call_log_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Log Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMCallLogDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/mcp-logs":{"get":{"tags":["mcp-logs"],"summary":"List Mcp Logs","description":"List MCP call logs for the organization.\n\nReturns individual MCP tool invocations, ordered by most recent first.\n\nArgs:\n project_id: Optional project ID to filter logs\n tool_name: Optional tool name to filter (e.g., 'getContext')\n is_error: Optional filter for error/success calls\n limit: Maximum number of logs to return (default 50, max 100)\n offset: Offset for pagination\n org_ctx: Organization context with permissions\n db: Database session\n\nReturns:\n List of MCP call log summaries with pagination info","operationId":"list_mcp_logs_api_v1_orgs__org_id__mcp_logs_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"project_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"description":"Filter by project ID","title":"Project Id"},"description":"Filter by project ID"},{"name":"tool_name","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by tool name","title":"Tool Name"},"description":"Filter by tool name"},{"name":"is_error","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Filter by error status","title":"Is Error"},"description":"Filter by error status"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of logs to return","default":50,"title":"Limit"},"description":"Maximum number of logs to return"},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Offset for pagination","default":0,"title":"Offset"},"description":"Offset for pagination"},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPLogListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/mcp-call-logs/{call_log_id}":{"get":{"tags":["mcp-logs"],"summary":"Get Mcp Call Log Detail","description":"Get detailed MCP call log including full request/response.\n\nRequires organization membership for the log's organization.\n\nArgs:\n call_log_id: ID of the call log\n current_user: The current authenticated user\n db: Database session\n\nReturns:\n Full call log details including request/response content","operationId":"get_mcp_call_log_detail_api_v1_mcp_call_logs__call_log_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"call_log_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Call Log Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MCPCallLogDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/team-role-definitions":{"get":{"tags":["team-roles"],"summary":"List Org Team Role Definitions","description":"List all team role definitions for an organization.\n\nRequires VIEWER role or higher.","operationId":"list_org_team_role_definitions_api_v1_orgs__org_id__team_role_definitions_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TeamRoleDefinitionResponse"},"title":"Response List Org Team Role Definitions Api V1 Orgs Org Id Team Role Definitions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["team-roles"],"summary":"Create Team Role Definition","description":"Create a new team role definition for an organization.\n\nRequires ADMIN role or higher.","operationId":"create_team_role_definition_api_v1_orgs__org_id__team_role_definitions_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamRoleDefinitionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamRoleDefinitionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/team-role-definitions/{role_id}":{"patch":{"tags":["team-roles"],"summary":"Update Team Role Definition","description":"Update a team role's title or description.\n\nRequires ADMIN role or higher.","operationId":"update_team_role_definition_api_v1_orgs__org_id__team_role_definitions__role_id__patch","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"role_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Role Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamRoleDefinitionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamRoleDefinitionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["team-roles"],"summary":"Delete Team Role Definition","description":"Delete a team role definition.\n\nThis will cascade delete all project team assignments for this role.\nRequires ADMIN role or higher.","operationId":"delete_team_role_definition_api_v1_orgs__org_id__team_role_definitions__role_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"role_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Role Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/team-role-definitions/{role_id}/reset":{"post":{"tags":["team-roles"],"summary":"Reset Team Role Definition","description":"Reset a team role to its default title and description.\n\nOnly works for default roles (is_default=True).\nRequires ADMIN role or higher.","operationId":"reset_team_role_definition_api_v1_orgs__org_id__team_role_definitions__role_id__reset_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"role_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Role Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TeamRoleDefinitionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/team":{"get":{"tags":["team-roles"],"summary":"Get Project Team","description":"Get the project team with all role assignments.\n\nReturns all roles with their assigned members.\nRequires VIEWER role or higher.","operationId":"get_project_team_api_v1_projects__project_id__team_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectTeamResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/team/assignments":{"get":{"tags":["team-roles"],"summary":"List Project Team Assignments","description":"List all team assignments for a project.\n\nRequires VIEWER role or higher.","operationId":"list_project_team_assignments_api_v1_projects__project_id__team_assignments_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProjectTeamAssignmentWithUser"},"title":"Response List Project Team Assignments Api V1 Projects Project Id Team Assignments Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["team-roles"],"summary":"Create Team Assignment","description":"Assign a user to a team role on a project.\n\nRequires ADMIN role or higher.","operationId":"create_team_assignment_api_v1_projects__project_id__team_assignments_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectTeamAssignmentCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectTeamAssignmentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/team/assignments/{assignment_id}":{"delete":{"tags":["team-roles"],"summary":"Delete Team Assignment","description":"Remove a team assignment.\n\nRequires ADMIN role or higher.","operationId":"delete_team_assignment_api_v1_projects__project_id__team_assignments__assignment_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"assignment_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Assignment Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/team/available-users":{"get":{"tags":["team-roles"],"summary":"List Available Users For Team","description":"List all org members available for team assignment.\n\nReturns all members of the organization (not just project members).\nRequires VIEWER role or higher.","operationId":"list_available_users_for_team_api_v1_projects__project_id__team_available_users_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AvailableUserResponse"},"title":"Response List Available Users For Team Api V1 Projects Project Id Team Available Users Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/features/{feature_id}/content/{content_type}/versions":{"get":{"tags":["feature-content-versions"],"summary":"List Content Versions","description":"List all versions for a feature's content type.\n\nReturns versions ordered by version number descending (newest first).","operationId":"list_content_versions_api_v1_features__feature_id__content__content_type__versions_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"feature_id","in":"path","required":true,"schema":{"type":"string","title":"Feature Id"}},{"name":"content_type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FeatureContentType"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ContentVersionListResponse"},"title":"Response List Content Versions Api V1 Features Feature Id Content Content Type Versions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["feature-content-versions"],"summary":"Create Content Version","description":"Create a new version of feature content.\n\nRequires MEMBER role on the project. Deactivates the previous active\nversion and creates a new one with incremented version number.","operationId":"create_content_version_api_v1_features__feature_id__content__content_type__versions_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"feature_id","in":"path","required":true,"schema":{"type":"string","title":"Feature Id"}},{"name":"content_type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FeatureContentType"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentVersionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentVersionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/features/{feature_id}/content/{content_type}/active":{"get":{"tags":["feature-content-versions"],"summary":"Get Active Content Version","description":"Get the active version for a feature's content type.\n\nReturns 404 if no active version exists.\n\nFor implementation_notes, falls back to the raw feature.implementation_notes\nfield if no content version exists (MCP writes there directly).","operationId":"get_active_content_version_api_v1_features__feature_id__content__content_type__active_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"feature_id","in":"path","required":true,"schema":{"type":"string","title":"Feature Id"}},{"name":"content_type","in":"path","required":true,"schema":{"$ref":"#/components/schemas/FeatureContentType"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentVersionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/feature-content-versions/{version_id}":{"get":{"tags":["feature-content-versions"],"summary":"Get Content Version","description":"Get a specific version by ID.\n\nUsed for diff comparison.","operationId":"get_content_version_api_v1_feature_content_versions__version_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"version_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Version Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentVersionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/features/{feature_id}/generate/{content_type}":{"post":{"tags":["feature-content-versions"],"summary":"Generate From Conversation","description":"Generate spec or prompt plan from conversation context.\n\nCreates a job and returns job_id for progress tracking.\nWhen job completes, content is stored in the Implementation record\n(if implementation_id provided) or FeatureContentVersion (legacy).\n\nArgs:\n feature_id: ID of the feature\n content_type: \"spec\" or \"prompt_plan\"\n implementation_id: Optional ID of the implementation to update","operationId":"generate_from_conversation_api_v1_features__feature_id__generate__content_type__post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"feature_id","in":"path","required":true,"schema":{"type":"string","title":"Feature Id"}},{"name":"content_type","in":"path","required":true,"schema":{"type":"string","title":"Content Type"}},{"name":"implementation_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Implementation Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateContentResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/invitations":{"post":{"tags":["invitations"],"summary":"Create Invitations","description":"Create organization invitations and send email invites.\n\nRequires ADMIN role or higher in the organization.\n\nArgs:\n org_id: Organization ID\n request: Invitation creation request with emails, role, and optional groups\n org_context: Organization context with permission info\n db: Synchronous database session (for InvitationService)\n async_db: Async database session (for EmailService)\n\nReturns:\n InvitationCreateResponse with results for each email\n\nRaises:\n 403: User lacks admin permissions\n 404: Org not found or user not a member","operationId":"create_invitations_api_v1_orgs__org_id__invitations_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationCreateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["invitations"],"summary":"List Invitations","description":"List invitations for an organization.\n\nRequires ADMIN role or higher in the organization.\n\nArgs:\n org_id: Organization ID\n org_context: Organization context with permission info\n db: Database session\n status_filter: Optional status to filter by\n\nReturns:\n InvitationListResponse with list of invitations\n\nRaises:\n 403: User lacks admin permissions\n 404: Org not found or user not a member","operationId":"list_invitations_api_v1_orgs__org_id__invitations_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status (pending, accepted, cancelled, expired)","title":"Status"},"description":"Filter by status (pending, accepted, cancelled, expired)"},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/invitations/{invitation_id}":{"delete":{"tags":["invitations"],"summary":"Cancel Invitation","description":"Cancel a pending invitation.\n\nRequires ADMIN role or higher in the organization.\n\nArgs:\n org_id: Organization ID\n invitation_id: Invitation ID to cancel\n org_context: Organization context with permission info\n db: Database session\n\nRaises:\n 403: User lacks admin permissions\n 404: Invitation not found or not pending","operationId":"cancel_invitation_api_v1_orgs__org_id__invitations__invitation_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"invitation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invitation Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/invitations/{invitation_id}/resend":{"post":{"tags":["invitations"],"summary":"Resend Invitation","description":"Resend an invitation email for a pending invitation.\n\nRequires ADMIN role or higher in the organization.\n\nArgs:\n org_id: Organization ID\n invitation_id: Invitation ID to resend\n org_context: Organization context with permission info\n db: Synchronous database session\n async_db: Async database session (for EmailService)\n\nReturns:\n InvitationSendResult with email send status\n\nRaises:\n 403: User lacks admin permissions\n 404: Invitation not found\n 400: Invitation is not pending","operationId":"resend_invitation_api_v1_orgs__org_id__invitations__invitation_id__resend_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"invitation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Invitation Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvitationSendResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/shares":{"post":{"tags":["project-shares"],"summary":"Create Project Share","description":"Create or update a project share.\n\nShare a project with a user, group, or the entire organization.\nIf a share already exists, the role will be updated.\n\nRequires ADMIN role or higher in the project.\n\nValidations:\n- For USER shares: user must be a member of the parent organization\n- For GROUP shares: group must belong to the same organization as the project\n- For ORG shares: subject_id must match the project's org_id","operationId":"create_project_share_api_v1_projects__project_id__shares_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectShareCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectShareResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["project-shares"],"summary":"List Project Shares","description":"List all shares for a project.\n\nReturns user, group, and org shares with enriched subject information.\nAny project member can view the share list.","operationId":"list_project_shares_api_v1_projects__project_id__shares_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"subject_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by subject type: 'user', 'group', or 'org'","title":"Subject Type"},"description":"Filter by subject type: 'user', 'group', or 'org'"},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectShareListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/shares/{share_id}":{"patch":{"tags":["project-shares"],"summary":"Update Project Share","description":"Update a project share's role.\n\nRequires ADMIN role or higher in the project.","operationId":"update_project_share_api_v1_projects__project_id__shares__share_id__patch","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"share_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Share Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectShareUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectShareResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["project-shares"],"summary":"Delete Project Share","description":"Remove a project share.\n\nRequires ADMIN role or higher in the project.\nCannot remove the last owner of a project.","operationId":"delete_project_share_api_v1_projects__project_id__shares__share_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"share_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Share Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/groups":{"post":{"tags":["user-groups"],"summary":"Create Group","description":"Create a new user group in the organization.\n\nRequires ADMIN role or higher in the organization.\n\nArgs:\n org_id: Organization ID\n request: Group creation request with name and optional description\n org_context: Organization context with permission info\n db: Database session\n\nReturns:\n UserGroupResponse with created group details\n\nRaises:\n 400: Group name already exists in org\n 403: User lacks admin permissions\n 404: Org not found or user not a member","operationId":"create_group_api_v1_orgs__org_id__groups_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserGroupCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserGroupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["user-groups"],"summary":"List Groups","description":"List all user groups in the organization.\n\nRequires membership in the organization (any role).\n\nArgs:\n org_id: Organization ID\n org_context: Organization context with permission info\n db: Database session\n\nReturns:\n UserGroupListResponse with list of groups\n\nRaises:\n 404: Org not found or user not a member","operationId":"list_groups_api_v1_orgs__org_id__groups_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserGroupListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/groups/{group_id}":{"get":{"tags":["user-groups"],"summary":"Get Group","description":"Get details of a specific user group.\n\nRequires membership in the organization (any role).\n\nArgs:\n org_id: Organization ID\n group_id: Group ID\n org_context: Organization context with permission info\n db: Database session\n\nReturns:\n UserGroupResponse with group details\n\nRaises:\n 404: Group not found or not in this org","operationId":"get_group_api_v1_orgs__org_id__groups__group_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserGroupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["user-groups"],"summary":"Update Group","description":"Update a user group's name and/or description.\n\nRequires ADMIN role or higher in the organization.\n\nArgs:\n org_id: Organization ID\n group_id: Group ID\n request: Update request with optional name and description\n org_context: Organization context with permission info\n db: Database session\n\nReturns:\n UserGroupResponse with updated group details\n\nRaises:\n 400: Group name already exists in org\n 403: User lacks admin permissions\n 404: Group not found or not in this org","operationId":"update_group_api_v1_orgs__org_id__groups__group_id__patch","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserGroupUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserGroupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["user-groups"],"summary":"Delete Group","description":"Delete a user group.\n\nThis will also remove all group memberships.\nRequires ADMIN role or higher in the organization.\n\nArgs:\n org_id: Organization ID\n group_id: Group ID\n org_context: Organization context with permission info\n db: Database session\n\nRaises:\n 403: User lacks admin permissions\n 404: Group not found or not in this org","operationId":"delete_group_api_v1_orgs__org_id__groups__group_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/groups/{group_id}/members":{"get":{"tags":["user-groups"],"summary":"List Group Members","description":"List all members of a user group.\n\nRequires membership in the organization (any role).\n\nArgs:\n org_id: Organization ID\n group_id: Group ID\n org_context: Organization context with permission info\n db: Database session\n\nReturns:\n GroupMembersListResponse with list of members\n\nRaises:\n 404: Group not found or not in this org","operationId":"list_group_members_api_v1_orgs__org_id__groups__group_id__members_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupMembersListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["user-groups"],"summary":"Add Group Member","description":"Add a user to a group.\n\nThe user must be a member of the organization.\nRequires ADMIN role or higher in the organization.\n\nArgs:\n org_id: Organization ID\n group_id: Group ID\n request: Request with user_id to add\n org_context: Organization context with permission info\n db: Database session\n\nReturns:\n GroupMemberResponse with added member details\n\nRaises:\n 400: User already in group or user not in org\n 403: User lacks admin permissions\n 404: Group not found or not in this org","operationId":"add_group_member_api_v1_orgs__org_id__groups__group_id__members_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserGroupMemberAdd"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupMemberResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/groups/{group_id}/members/{user_id}":{"delete":{"tags":["user-groups"],"summary":"Remove Group Member","description":"Remove a user from a group.\n\nRequires ADMIN role or higher in the organization.\n\nArgs:\n org_id: Organization ID\n group_id: Group ID\n user_id: User ID to remove\n org_context: Organization context with permission info\n db: Database session\n\nRaises:\n 403: User lacks admin permissions\n 404: Group not found, user not in group, or not in this org","operationId":"remove_group_member_api_v1_orgs__org_id__groups__group_id__members__user_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}},{"name":"user_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"User Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/thread-images/upload":{"post":{"tags":["thread-images"],"summary":"Upload Thread Image","description":"Upload an image for attachment to a thread comment.\n\nThe image is stored in S3 and a thumbnail is generated.\nReturns metadata that should be included when creating the comment.","operationId":"upload_thread_image_api_v1_thread_images_upload_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_thread_image_api_v1_thread_images_upload_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routers__project_chat_images__ImageUploadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/thread-images/url":{"get":{"tags":["thread-images"],"summary":"Get Image Url","description":"Get an HMAC-signed proxy URL for an image.\n\nArgs:\n s3_key: The S3 key of the image (used to look up image ID)\n thread_id: Thread ID for authorization check\n thumbnail: If True, get thumbnail URL (200x200) instead of full (800x800)\n\nReturns:\n HMAC-signed backend proxy URL for the image","operationId":"get_image_url_api_v1_thread_images_url_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"s3_key","in":"query","required":true,"schema":{"type":"string","title":"S3 Key"}},{"name":"thread_id","in":"query","required":true,"schema":{"type":"string","title":"Thread Id"}},{"name":"thumbnail","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Thumbnail"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routers__thread_images__ImageUrlResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/project-chats/{project_chat_id}/images/upload":{"post":{"tags":["project-chat-images"],"summary":"Upload Discussion Image Project Scoped","description":"Upload an image for a project-scoped project-chat discussion message.","operationId":"upload_discussion_image_project_scoped_api_v1_projects__project_id__project_chats__project_chat_id__images_upload_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"project_chat_id","in":"path","required":true,"schema":{"type":"string","title":"Project Chat Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_discussion_image_project_scoped_api_v1_projects__project_id__project_chats__project_chat_id__images_upload_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routers__project_chat_images__ImageUploadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/project-chats/{project_chat_id}/images/upload":{"post":{"tags":["project-chat-images"],"summary":"Upload Discussion Image Org Scoped","description":"Upload an image for an org-scoped project-chat discussion message.","operationId":"upload_discussion_image_org_scoped_api_v1_orgs__org_id__project_chats__project_chat_id__images_upload_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"project_chat_id","in":"path","required":true,"schema":{"type":"string","title":"Project Chat Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_discussion_image_org_scoped_api_v1_orgs__org_id__project_chats__project_chat_id__images_upload_post"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routers__project_chat_images__ImageUploadResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/project-chats/{project_chat_id}/images/url":{"get":{"tags":["project-chat-images"],"summary":"Get Discussion Image Url","description":"Get an HMAC-signed proxy URL for a discussion image.\n\nArgs:\n project_chat_id: Discussion ID for authorization check\n s3_key: The S3 key of the image (used to look up image ID)\n thumbnail: If True, get thumbnail URL (200x200) instead of full (800x800)\n\nReturns:\n HMAC-signed backend proxy URL for the image","operationId":"get_discussion_image_url_api_v1_project_chats__project_chat_id__images_url_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_chat_id","in":"path","required":true,"schema":{"type":"string","title":"Project Chat Id"}},{"name":"s3_key","in":"query","required":true,"schema":{"type":"string","title":"S3 Key"}},{"name":"thumbnail","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Thumbnail"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routers__project_chat_images__ImageUrlResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/project-chats/{project_chat_id}/images/{image_id}/annotate":{"post":{"tags":["project-chat-images"],"summary":"Annotate Discussion Image Project Scoped","description":"Trigger AI annotation for an uploaded image in a project-scoped discussion.\n\nCreates a job to analyze the image using a vision-capable LLM and generate\na contextual annotation based on the discussion context and user's description.\n\nThe image metadata (s3_key, filename, content_type) is passed in the request\nsince the image hasn't been attached to a message yet at annotation time.\n\nArgs:\n project_id: Project ID\n project_chat_id: Discussion ID\n image_id: ID of the uploaded image to annotate\n request: Contains user_remark and image metadata from upload response\n\nReturns:\n Job ID for tracking the annotation job","operationId":"annotate_discussion_image_project_scoped_api_v1_projects__project_id__project_chats__project_chat_id__images__image_id__annotate_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"project_chat_id","in":"path","required":true,"schema":{"type":"string","title":"Project Chat Id"}},{"name":"image_id","in":"path","required":true,"schema":{"type":"string","title":"Image Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageAnnotateRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageAnnotateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/project-chats/{project_chat_id}/images/{image_id}/annotate":{"post":{"tags":["project-chat-images"],"summary":"Annotate Discussion Image Org Scoped","description":"Trigger AI annotation for an uploaded image in an org-scoped discussion.\n\nCreates a job to analyze the image using a vision-capable LLM and generate\na contextual annotation based on the discussion context and user's description.\n\nThe image metadata (s3_key, filename, content_type) is passed in the request\nsince the image hasn't been attached to a message yet at annotation time.\n\nArgs:\n org_id: Organization ID\n project_chat_id: Discussion ID\n image_id: ID of the uploaded image to annotate\n request: Contains user_remark and image metadata from upload response\n\nReturns:\n Job ID for tracking the annotation job","operationId":"annotate_discussion_image_org_scoped_api_v1_orgs__org_id__project_chats__project_chat_id__images__image_id__annotate_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"project_chat_id","in":"path","required":true,"schema":{"type":"string","title":"Project Chat Id"}},{"name":"image_id","in":"path","required":true,"schema":{"type":"string","title":"Image Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageAnnotateRequest"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImageAnnotateResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dashboard/orgs/{org_id}/stats":{"get":{"tags":["dashboard"],"summary":"Get Dashboard Stats","description":"Get dashboard statistics for organization home page.\n\nReturns:\n - user_count: Number of organization members\n - project_count: Number of active (non-archived) projects\n - llm_usage_this_month: Token and cost totals for current calendar month\n - recent_llm_calls: Most recent LLM calls (default 10)\n\nArgs:\n org_ctx: Organization context with permissions\n db: Database session\n\nReturns:\n Dashboard statistics for the organization","operationId":"get_dashboard_stats_api_v1_dashboard_orgs__org_id__stats_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DashboardStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/dashboard/orgs/{org_id}/llm-usage":{"get":{"tags":["dashboard"],"summary":"Get Llm Usage Details","description":"Get detailed LLM usage for a specific month.\n\nIncludes total usage and breakdown by agent.\n\nArgs:\n year: Year (defaults to current year)\n month: Month 1-12 (defaults to current month)\n org_ctx: Organization context with permissions\n db: Database session\n\nReturns:\n Detailed LLM usage with per-agent breakdown","operationId":"get_llm_usage_details_api_v1_dashboard_orgs__org_id__llm_usage_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"year","in":"query","required":false,"schema":{"type":"integer","title":"Year"}},{"name":"month","in":"query","required":false,"schema":{"type":"integer","maximum":12,"minimum":1,"title":"Month"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LLMUsageDetailsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/form-drafts":{"get":{"tags":["form-drafts"],"summary":"List Form Drafts","description":"List all form drafts for the current user in a project.\n\nOptionally filter by draft_type.","operationId":"list_form_drafts_api_v1_projects__project_id__form_drafts_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"draft_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/FormDraftType"},{"type":"null"}],"title":"Draft Type"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FormDraftListItem"},"title":"Response List Form Drafts Api V1 Projects Project Id Form Drafts Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["form-drafts"],"summary":"Upsert Form Draft","description":"Create or update a form draft.\n\nIf request.id is provided and the draft exists, it will be updated.\nOtherwise, a new draft will be created.","operationId":"upsert_form_draft_api_v1_projects__project_id__form_drafts_put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDraftUpsertRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDraftResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/form-drafts/{draft_id}":{"get":{"tags":["form-drafts"],"summary":"Get Form Draft","description":"Get a specific form draft by ID.\n\nUsers can only access their own drafts.","operationId":"get_form_draft_api_v1_form_drafts__draft_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Draft Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormDraftResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["form-drafts"],"summary":"Delete Form Draft","description":"Delete a form draft.\n\nUsers can only delete their own drafts.","operationId":"delete_form_draft_api_v1_form_drafts__draft_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"draft_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Draft Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/phase-containers":{"post":{"tags":["phase-containers"],"summary":"Create Phase Container","description":"Create a new phase container for a project.\n\nPhase containers are used to group related brainstorming phases together,\nenabling hierarchical organization of project planning.\n\nRequires MEMBER role or higher.","operationId":"create_phase_container_api_v1_projects__project_id__phase_containers_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhaseContainerCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhaseContainerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["phase-containers"],"summary":"List Phase Containers","description":"List all phase containers for a project.\n\nRequires VIEWER role or higher.\nReturns containers ordered by order_index.","operationId":"list_phase_containers_api_v1_projects__project_id__phase_containers_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Archived"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PhaseContainerListResponse"},"title":"Response List Phase Containers Api V1 Projects Project Id Phase Containers Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/phase-containers/{identifier}":{"get":{"tags":["phase-containers"],"summary":"Get Phase Container","description":"Get a specific phase container by ID or short URL identifier.\n\nRequires org membership (privacy: returns 404 if not member).","operationId":"get_phase_container_api_v1_phase_containers__identifier__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"identifier","in":"path","required":true,"schema":{"type":"string","title":"Identifier"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhaseContainerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["phase-containers"],"summary":"Update Phase Container","description":"Update a phase container.\n\nRequires MEMBER role or higher.","operationId":"update_phase_container_api_v1_phase_containers__identifier__patch","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"identifier","in":"path","required":true,"schema":{"type":"string","title":"Identifier"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhaseContainerUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhaseContainerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/phase-containers/{identifier}/archive":{"post":{"tags":["phase-containers"],"summary":"Archive Phase Container","description":"Archive a phase container.\n\nWhen a container is archived, all contained phases are also cascade-archived.\nArchived containers return 404 everywhere (list and get endpoints).\n\nRequires ADMIN or OWNER role.","operationId":"archive_phase_container_api_v1_phase_containers__identifier__archive_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"identifier","in":"path","required":true,"schema":{"type":"string","title":"Identifier"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhaseContainerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/phase-containers/{identifier}/restore":{"post":{"tags":["phase-containers"],"summary":"Restore Phase Container","description":"Restore an archived phase container.\n\nNote: This does NOT restore archived phases - that must be done manually.\nThis is intentional to prevent accidentally restoring phases that were\narchived for other reasons.\n\nRequires ADMIN or OWNER role.","operationId":"restore_phase_container_api_v1_phase_containers__identifier__restore_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"identifier","in":"path","required":true,"schema":{"type":"string","title":"Identifier"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhaseContainerResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/phase-containers/{identifier}/phases":{"get":{"tags":["phase-containers"],"summary":"List Container Phases","description":"List all phases in a phase container.\n\nReturns phases ordered by container_sequence.\nRequires org membership.","operationId":"list_container_phases_api_v1_phase_containers__identifier__phases_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"identifier","in":"path","required":true,"schema":{"type":"string","title":"Identifier"}},{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Archived"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BrainstormingPhaseListResponse"},"title":"Response List Container Phases Api V1 Phase Containers Identifier Phases Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/phases/{phase_id}/assign-to-container":{"post":{"tags":["phase-containers"],"summary":"Assign Phase To Container","description":"Assign a phase to a container.\n\nRequest body:\n container_id: Container identifier (UUID or short URL)\n sequence: Optional sequence number within container (auto-assigned if not provided)\n\nRequires MEMBER role or higher.","operationId":"assign_phase_to_container_api_v1_phases__phase_id__assign_to_container_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"phase_id","in":"path","required":true,"schema":{"type":"string","title":"Phase Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Request Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrainstormingPhaseListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/phases/{phase_id}/remove-from-container":{"post":{"tags":["phase-containers"],"summary":"Remove Phase From Container","description":"Remove a phase from its container.\n\nThe phase remains in the project but is no longer associated with a container.\n\nRequires MEMBER role or higher.","operationId":"remove_phase_from_container_api_v1_phases__phase_id__remove_from_container_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"phase_id","in":"path","required":true,"schema":{"type":"string","title":"Phase Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrainstormingPhaseListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/phase-containers/{identifier}/extension-preview":{"get":{"tags":["phase-containers"],"summary":"Get Extension Preview","description":"Get preview data for creating an extension phase in a container.\n\nReturns context information including initial spec summary, sibling\nextensions, and code exploration output.\n\nRequires MEMBER role or higher.","operationId":"get_extension_preview_api_v1_phase_containers__identifier__extension_preview_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"identifier","in":"path","required":true,"schema":{"type":"string","title":"Identifier"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtensionPreviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/phase-containers/{identifier}/create-extension":{"post":{"tags":["phase-containers"],"summary":"Create Extension Phase","description":"Create an extension phase within a container.\n\nAtomically creates a BrainstormingPhase with EXTENSION subtype,\nassigns it to the container with auto-numbered sequence, and\ntriggers the brainstorm generation Kafka job.\n\nRequires MEMBER role or higher.","operationId":"create_extension_phase_api_v1_phase_containers__identifier__create_extension_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"identifier","in":"path","required":true,"schema":{"type":"string","title":"Identifier"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtensionCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrainstormingPhaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/grounding-notes/active":{"get":{"tags":["grounding-notes"],"summary":"Get Active Grounding Note","description":"Get the active grounding note version for a project.\n\nReturns 404 if no active version exists.","operationId":"get_active_grounding_note_api_v1_projects__project_id__grounding_notes_active_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroundingNoteVersionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/grounding-notes/versions":{"get":{"tags":["grounding-notes"],"summary":"List Grounding Note Versions","description":"List all grounding note versions for a project.\n\nReturns versions ordered by version number descending (newest first).","operationId":"list_grounding_note_versions_api_v1_projects__project_id__grounding_notes_versions_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GroundingNoteVersionListResponse"},"title":"Response List Grounding Note Versions Api V1 Projects Project Id Grounding Notes Versions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["grounding-notes"],"summary":"Create Grounding Note Version","description":"Create a new grounding note version.\n\nRequires MEMBER role on the project. Deactivates the previous active\nversion and creates a new one with incremented version number.","operationId":"create_grounding_note_version_api_v1_projects__project_id__grounding_notes_versions_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroundingNoteCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroundingNoteVersionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/grounding-note-versions/{version_id}":{"get":{"tags":["grounding-notes"],"summary":"Get Grounding Note Version","description":"Get a specific grounding note version by ID.\n\nUsed for viewing historical versions.","operationId":"get_grounding_note_version_api_v1_grounding_note_versions__version_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"version_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Version Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroundingNoteVersionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/brainstorming-phases":{"post":{"tags":["brainstorming-phases"],"summary":"Create Brainstorming Phase","description":"Create a new brainstorming phase for a project.\n\nRequires MEMBER role or higher.\n\nAfter creating the phase, automatically triggers an async job to generate\naspects (Modules), clarification questions (Features), and conversation\nthreads with initial MCQs.","operationId":"create_brainstorming_phase_api_v1_projects__project_id__brainstorming_phases_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrainstormingPhaseCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrainstormingPhaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["brainstorming-phases"],"summary":"List Brainstorming Phases","description":"List all brainstorming phases for a project.\n\nRequires VIEWER role or higher.\nReturns phases with question stats (active answered/total, pending total).\nStats are stored directly on the phase model and updated when questions change.","operationId":"list_brainstorming_phases_api_v1_projects__project_id__brainstorming_phases_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BrainstormingPhaseListResponse"},"title":"Response List Brainstorming Phases Api V1 Projects Project Id Brainstorming Phases Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/brainstorming-phases/{phase_id}":{"get":{"tags":["brainstorming-phases"],"summary":"Get Brainstorming Phase","description":"Get a specific brainstorming phase by ID.\n\nRequires org membership (privacy: returns 404 if not member).","operationId":"get_brainstorming_phase_api_v1_brainstorming_phases__phase_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"phase_id","in":"path","required":true,"schema":{"type":"string","title":"Phase Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrainstormingPhaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["brainstorming-phases"],"summary":"Update Brainstorming Phase","description":"Update a brainstorming phase.\n\nRequires MEMBER role or higher.","operationId":"update_brainstorming_phase_api_v1_brainstorming_phases__phase_id__patch","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"phase_id","in":"path","required":true,"schema":{"type":"string","title":"Phase Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrainstormingPhaseUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrainstormingPhaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["brainstorming-phases"],"summary":"Delete Brainstorming Phase","description":"Delete a brainstorming phase.\n\nRequires ADMIN or OWNER role.\nCascades deletion to all related specs, prompt plans, and threads.","operationId":"delete_brainstorming_phase_api_v1_brainstorming_phases__phase_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"phase_id","in":"path","required":true,"schema":{"type":"string","title":"Phase Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/brainstorming-phases/{phase_id}/implementation-progress":{"get":{"tags":["brainstorming-phases"],"summary":"Get Phase Implementation Progress","description":"Get implementation progress for a brainstorming phase.\n\nReturns aggregate and per-module feature completion stats.\nRequires org membership (privacy: returns 404 if not member).","operationId":"get_phase_implementation_progress_api_v1_brainstorming_phases__phase_id__implementation_progress_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"phase_id","in":"path","required":true,"schema":{"type":"string","title":"Phase Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhaseImplementationProgressResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/brainstorming-phases/{phase_id}/archive":{"post":{"tags":["brainstorming-phases"],"summary":"Archive Brainstorming Phase","description":"Archive a brainstorming phase.\n\nArchived phases return 404 everywhere (list and get endpoints).\nChildren (modules, features, threads) remain unchanged but become\ninaccessible via the archived phase.\n\nRequires ADMIN or OWNER role.","operationId":"archive_brainstorming_phase_api_v1_brainstorming_phases__phase_id__archive_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"phase_id","in":"path","required":true,"schema":{"type":"string","title":"Phase Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrainstormingPhaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/brainstorming-phases/{phase_id}/restore":{"post":{"tags":["brainstorming-phases"],"summary":"Restore Brainstorming Phase","description":"Restore an archived brainstorming phase.\n\nRequires ADMIN or OWNER role.","operationId":"restore_brainstorming_phase_api_v1_brainstorming_phases__phase_id__restore_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"phase_id","in":"path","required":true,"schema":{"type":"string","title":"Phase Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrainstormingPhaseResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/brainstorming-phases/{phase_id}/generate-conversations":{"post":{"tags":["brainstorming-phases"],"summary":"Generate Conversations","description":"Regenerate conversations for a brainstorming phase.\n\nTriggers an async job to regenerate aspects (Modules), clarification\nquestions (Features), and conversation threads with initial MCQs.\nUses the 6-agent pipeline (Summarizer→Classifier→AspectGen→QuestionGen→Critic).\n\nRequires MEMBER role or higher.\nReturns job ID for tracking progress via WebSocket.","operationId":"generate_conversations_api_v1_brainstorming_phases__phase_id__generate_conversations_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"phase_id","in":"path","required":true,"schema":{"type":"string","title":"Phase Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Generate Conversations Api V1 Brainstorming Phases Phase Id Generate Conversations Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/brainstorming-phases/{phase_id}/generate-modules":{"post":{"tags":["brainstorming-phases"],"summary":"Generate Modules From Spec","description":"Generate modules and features from the Final Specification.\n\nTriggers an async job to extract modules and features from the\nFinal Spec using LLM agents.\n\nRequires MEMBER role or higher.\nReturns job ID for tracking progress.","operationId":"generate_modules_from_spec_api_v1_brainstorming_phases__phase_id__generate_modules_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"phase_id","in":"path","required":true,"schema":{"type":"string","title":"Phase Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Generate Modules From Spec Api V1 Brainstorming Phases Phase Id Generate Modules Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/brainstorming-phases/{phase_id}/spec-generation-status":{"get":{"tags":["brainstorming-phases"],"summary":"Get Spec Generation Status","description":"Get status and prerequisites for spec generation.\n\nReturns information about conversation progress, existing drafts,\nand any warnings that should be displayed before generation.\n\nRequires org membership.","operationId":"get_spec_generation_status_api_v1_brainstorming_phases__phase_id__spec_generation_status_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"phase_id","in":"path","required":true,"schema":{"type":"string","title":"Phase Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrainstormSpecGenerationStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/brainstorming-phases/{phase_id}/prompt-plan-generation-status":{"get":{"tags":["brainstorming-phases"],"summary":"Get Prompt Plan Generation Status","description":"Get status and prerequisites for prompt plan generation.\n\nReturns information about spec availability, existing drafts,\nand any warnings that should be displayed before generation.\n\nRequires org membership.","operationId":"get_prompt_plan_generation_status_api_v1_brainstorming_phases__phase_id__prompt_plan_generation_status_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"phase_id","in":"path","required":true,"schema":{"type":"string","title":"Phase Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrainstormPromptPlanGenerationStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/brainstorming-phases/{phase_id}/feature-generation-status":{"get":{"tags":["brainstorming-phases"],"summary":"Get Feature Generation Status","description":"Get status and prerequisites for feature generation.\n\nReturns information about existing modules/features, spec availability,\nand any warnings that should be displayed before generation.\n\nRequires org membership.","operationId":"get_feature_generation_status_api_v1_brainstorming_phases__phase_id__feature_generation_status_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"phase_id","in":"path","required":true,"schema":{"type":"string","title":"Phase Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BrainstormFeatureGenerationStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/brainstorming-phases/{phase_id}/generate-spec":{"post":{"tags":["brainstorming-phases"],"summary":"Generate Brainstorm Spec","description":"Generate a specification from brainstorming conversations.\n\nTriggers an async job to generate a phase-level specification using\nthe 4-agent pipeline (Summarizer→Planner→Writer→QA).\n\nThe specification is stored as a SpecVersion linked to the brainstorming phase.\n\nRequires MEMBER role or higher.\nReturns job ID for tracking progress via WebSocket.","operationId":"generate_brainstorm_spec_api_v1_brainstorming_phases__phase_id__generate_spec_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"phase_id","in":"path","required":true,"schema":{"type":"string","title":"Phase Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Generate Brainstorm Spec Api V1 Brainstorming Phases Phase Id Generate Spec Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/brainstorming-phases/{phase_id}/generate-prompt-plan":{"post":{"tags":["brainstorming-phases"],"summary":"Generate Brainstorm Prompt Plan","description":"Generate a prompt plan from brainstorming conversations.\n\nTriggers an async job to generate a phase-level prompt plan using\nthe 4-agent pipeline (Analyzer→Planner→Writer→QA).\n\nThe prompt plan is stored as a SpecVersion linked to the brainstorming phase.\nIf a brainstorm specification exists, it will be used to inform the prompt plan.\n\nRequires MEMBER role or higher.\nReturns job ID for tracking progress via WebSocket.","operationId":"generate_brainstorm_prompt_plan_api_v1_brainstorming_phases__phase_id__generate_prompt_plan_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"phase_id","in":"path","required":true,"schema":{"type":"string","title":"Phase Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Generate Brainstorm Prompt Plan Api V1 Brainstorming Phases Phase Id Generate Prompt Plan Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/brainstorming-phases/{phase_id}/pending-questions-count":{"get":{"tags":["brainstorming-phases"],"summary":"Get Pending Questions Count","description":"Get count of pending and active questions for a phase.\n\nReturns counts needed for the info panel:\n- pending_aspects: Number of aspects with only pending questions\n- pending_questions: Number of pending questions\n- active_questions: Number of active questions\n- max_questions: Maximum allowed questions (100)\n- at_limit: Whether the phase is at the question limit\n\nRequires org membership.","operationId":"get_pending_questions_count_api_v1_brainstorming_phases__phase_id__pending_questions_count_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"phase_id","in":"path","required":true,"schema":{"type":"string","title":"Phase Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Pending Questions Count Api V1 Brainstorming Phases Phase Id Pending Questions Count Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/brainstorming-phases/{phase_id}/pending-questions":{"get":{"tags":["brainstorming-phases"],"summary":"Get Pending Questions","description":"Get all pending questions for a phase, grouped by aspect.\n\nReturns:\n- aspects: List of aspects with their pending questions\n- counts: Counts from get_pending_questions_count()\n\nRequires org membership.","operationId":"get_pending_questions_api_v1_brainstorming_phases__phase_id__pending_questions_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"phase_id","in":"path","required":true,"schema":{"type":"string","title":"Phase Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Pending Questions Api V1 Brainstorming Phases Phase Id Pending Questions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/brainstorming-phases/{phase_id}/activate-questions":{"post":{"tags":["brainstorming-phases"],"summary":"Activate Pending Questions","description":"Activate selected pending questions.\n\nRequest body:\n- question_ids: List of feature IDs to activate\n\nActivates the selected questions by:\n1. Setting visibility_status to ACTIVE\n2. Creating Thread and initial MCQ ThreadItem for each\n\nRequires MEMBER role or higher.\nReturns:\n- activated_count: Number of questions activated\n- skipped_count: Number of questions skipped (already active or not found)\n- at_limit: Whether the phase is now at the question limit","operationId":"activate_pending_questions_api_v1_brainstorming_phases__phase_id__activate_questions_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"phase_id","in":"path","required":true,"schema":{"type":"string","title":"Phase Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Request Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Activate Pending Questions Api V1 Brainstorming Phases Phase Id Activate Questions Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/brainstorming-phases/{phase_id}/dismiss-questions":{"post":{"tags":["brainstorming-phases"],"summary":"Dismiss Pending Questions","description":"Permanently delete selected pending questions.\n\nRequest body:\n- question_ids: List of feature IDs to dismiss\n\nDismisses the selected questions by permanently deleting them\nalong with their associated Threads and ThreadItems.\n\nRequires MEMBER role or higher.\nReturns:\n- dismissed_count: Number of questions dismissed\n- skipped_count: Number of questions skipped (not found, wrong phase, or already active)","operationId":"dismiss_pending_questions_api_v1_brainstorming_phases__phase_id__dismiss_questions_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"phase_id","in":"path","required":true,"schema":{"type":"string","title":"Phase Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Request Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Dismiss Pending Questions Api V1 Brainstorming Phases Phase Id Dismiss Questions Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/brainstorming-phases/{phase_id}/cancel-generation":{"post":{"tags":["brainstorming-phases"],"summary":"Cancel Phase Generation","description":"Cancel in-progress generation or clear stuck generation state.\n\nWorks even if no job is running - clears the DB flag to recover from crashes.\n\nRequest body:\n generation_type: Type of generation to cancel (\"spec\", \"prompt_plan\", or \"features\")\n\nReturns:\n cancelled_jobs: Number of jobs cancelled\n cleared_flag: Name of the flag that was cleared","operationId":"cancel_phase_generation_api_v1_brainstorming_phases__phase_id__cancel_generation_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"phase_id","in":"path","required":true,"schema":{"type":"string","title":"Phase Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Request Data"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Cancel Phase Generation Api V1 Brainstorming Phases Phase Id Cancel Generation Post"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/brainstorming-phases/{phase_id}/user-question-sessions":{"post":{"tags":["user-question-sessions"],"summary":"Create Session","description":"Create a new user question session for a brainstorming phase.","operationId":"create_session_api_v1_brainstorming_phases__phase_id__user_question_sessions_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"phase_id","in":"path","required":true,"schema":{"type":"string","title":"Phase Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserQuestionSessionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["user-question-sessions"],"summary":"List Sessions","description":"List all user question sessions for a brainstorming phase.","operationId":"list_sessions_api_v1_brainstorming_phases__phase_id__user_question_sessions_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"phase_id","in":"path","required":true,"schema":{"type":"string","title":"Phase Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserQuestionSessionResponse"},"title":"Response List Sessions Api V1 Brainstorming Phases Phase Id User Question Sessions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/user-question-sessions/{session_id}":{"get":{"tags":["user-question-sessions"],"summary":"Get Session","description":"Get a user question session with all messages.","operationId":"get_session_api_v1_user_question_sessions__session_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserQuestionSessionWithMessagesResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/user-question-sessions/{session_id}/generate":{"post":{"tags":["user-question-sessions"],"summary":"Generate Questions","description":"Generate questions based on user prompt.","operationId":"generate_questions_api_v1_user_question_sessions__session_id__generate_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateQuestionsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateQuestionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/user-question-sessions/{session_id}/add-questions":{"post":{"tags":["user-question-sessions"],"summary":"Add Questions","description":"Add selected questions from a message to the phase.","operationId":"add_questions_api_v1_user_question_sessions__session_id__add_questions_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"session_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Session Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddQuestionsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddQuestionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/grounding-files":{"get":{"tags":["Grounding"],"summary":"List Grounding Files","description":"List all grounding files for the project.\n\nEnsures agents.md exists (auto-created with template if missing).\nRequires project membership.","operationId":"list_grounding_files_api_v1_projects__project_id__grounding_files_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroundingFileListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Grounding"],"summary":"Create Grounding File","description":"Create a new grounding file.\n\nAllowed extensions: .md, .txt, .json, .yaml, .yml\nRequires project membership.","operationId":"create_grounding_file_api_v1_projects__project_id__grounding_files_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroundingFileCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroundingFileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/grounding-files/{filename}":{"get":{"tags":["Grounding"],"summary":"Get Grounding File","description":"Get a specific grounding file by filename.\n\nRequires project membership.","operationId":"get_grounding_file_api_v1_projects__project_id__grounding_files__filename__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"filename","in":"path","required":true,"schema":{"type":"string","title":"Filename"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroundingFileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["Grounding"],"summary":"Update Grounding File","description":"Update a grounding file's content.\n\nRequires project membership.","operationId":"update_grounding_file_api_v1_projects__project_id__grounding_files__filename__put","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"filename","in":"path","required":true,"schema":{"type":"string","title":"Filename"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroundingFileUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroundingFileResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Grounding"],"summary":"Delete Grounding File","description":"Delete a grounding file.\n\nProtected files (agents.md) cannot be deleted.\nRequires project membership.","operationId":"delete_grounding_file_api_v1_projects__project_id__grounding_files__filename__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"filename","in":"path","required":true,"schema":{"type":"string","title":"Filename"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/grounding-files/agents.md/branches":{"get":{"tags":["Grounding"],"summary":"List User Branches","description":"List all branches where current user has agents.md versions.\n\nReturns branch-specific versions of agents.md for the logged-in user.\nRequires project membership.","operationId":"list_user_branches_api_v1_projects__project_id__grounding_files_agents_md_branches_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BranchListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/grounding-files/agents.md/branches/{branch_name}":{"get":{"tags":["Grounding"],"summary":"Get Branch File","description":"Get a specific branch version of agents.md.\n\nReturns the branch-specific agents.md for the logged-in user.\nRequires project membership.","operationId":"get_branch_file_api_v1_projects__project_id__grounding_files_agents_md_branches__branch_name__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"branch_name","in":"path","required":true,"schema":{"type":"string","title":"Branch Name"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroundingFileBranchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/grounding-files/agents.md/branches/{branch_name}/merge":{"post":{"tags":["Grounding"],"summary":"Merge Branch","description":"Trigger merge of branch agents.md into global version.\n\nCreates an async job to merge the branch-specific agents.md content\ninto the global agents.md file.\nRequires project membership.","operationId":"merge_branch_api_v1_projects__project_id__grounding_files_agents_md_branches__branch_name__merge_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"branch_name","in":"path","required":true,"schema":{"type":"string","title":"Branch Name"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MergeJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/grounding-files/agents.md/branches/{branch_name}/pull":{"post":{"tags":["Grounding"],"summary":"Pull From Global","description":"Trigger pull of global agents.md into branch version.\n\nCreates an async job to merge the global agents.md content\ninto the branch-specific agents.md file, preserving branch work.\nRequires project membership.","operationId":"pull_from_global_api_v1_projects__project_id__grounding_files_agents_md_branches__branch_name__pull_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"branch_name","in":"path","required":true,"schema":{"type":"string","title":"Branch Name"}},{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PullJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/grounding-files/regenerate":{"post":{"tags":["Grounding"],"summary":"Regenerate Grounding","description":"Trigger regeneration of agents.md from the project's codebase.\n\nUses code-explorer to analyze the repository and generate a comprehensive\nagents.md grounding file for AI coding assistants.\n\nOnly available for brownfield projects (projects with GitHub repo configured).\nRequires project membership.","operationId":"regenerate_grounding_api_v1_projects__project_id__grounding_files_regenerate_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegenerateGroundingJobResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/project-chats":{"post":{"tags":["project-chats"],"summary":"Create Project Chat","description":"Create a new pre-phase discussion for a project.\n\nOptionally accepts initial_message_content to auto-post a first message\nand trigger the bot response immediately.","operationId":"create_project_chat_api_v1_projects__project_id__project_chats_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectChatRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectChatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["project-chats"],"summary":"Get Project Chat For Project","description":"Get the current pre-phase discussion for a project (if any).","operationId":"get_project_chat_for_project_api_v1_projects__project_id__project_chats_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ProjectChatWithMessages"},{"type":"null"}],"title":"Response Get Project Chat For Project Api V1 Projects Project Id Project Chats Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/project-chats/list":{"get":{"tags":["project-chats"],"summary":"List Project Discussions","description":"List all discussions for a project with pagination for sidebar.","operationId":"list_project_discussions_api_v1_projects__project_id__project_chats_list_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__project_chat__ProjectChatListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/project-chats/{discussion_id}":{"get":{"tags":["project-chats"],"summary":"Get Project Chat","description":"Get a pre-phase discussion with all messages.","operationId":"get_project_chat_api_v1_projects__project_id__project_chats__discussion_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"discussion_id","in":"path","required":true,"schema":{"type":"string","title":"Discussion Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectChatWithMessages"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["project-chats"],"summary":"Delete Project Chat","description":"Delete a pre-phase discussion.","operationId":"delete_project_chat_api_v1_projects__project_id__project_chats__discussion_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"discussion_id","in":"path","required":true,"schema":{"type":"string","title":"Discussion Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/project-chats/{discussion_id}/messages":{"post":{"tags":["project-chats"],"summary":"Send Message","description":"Send a user message and trigger bot response.","operationId":"send_message_api_v1_projects__project_id__project_chats__discussion_id__messages_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"discussion_id","in":"path","required":true,"schema":{"type":"string","title":"Discussion Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__project_chat__SendMessageRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__project_chat__SendMessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/project-chats/{discussion_id}/retry":{"post":{"tags":["project-chats"],"summary":"Retry Message","description":"Retry sending the last failed message.","operationId":"retry_message_api_v1_projects__project_id__project_chats__discussion_id__retry_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"discussion_id","in":"path","required":true,"schema":{"type":"string","title":"Discussion Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__project_chat__SendMessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/project-chats/{discussion_id}/cancel":{"post":{"tags":["project-chats"],"summary":"Cancel Discussion Response","description":"Cancel any in-progress AI response or code exploration for a discussion.\n\nAlso clears generation flags even if no job exists, to recover from stuck states.\nCreates a system message to record the cancellation in conversation history.","operationId":"cancel_discussion_response_api_v1_projects__project_id__project_chats__discussion_id__cancel_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"discussion_id","in":"path","required":true,"schema":{"type":"string","title":"Discussion Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/ProjectChatMessageResponse"},{"type":"null"}],"title":"Response Cancel Discussion Response Api V1 Projects Project Id Project Chats Discussion Id Cancel Post"}}}},"204":{"description":"No content - nothing was cancelled"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/project-chats/{discussion_id}/create-phase":{"post":{"tags":["project-chats"],"summary":"Create Phase From Project Chat","description":"Create a brainstorming phase from the discussion's proposed values.","operationId":"create_phase_from_project_chat_api_v1_projects__project_id__project_chats__discussion_id__create_phase_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"discussion_id","in":"path","required":true,"schema":{"type":"string","title":"Discussion Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePhaseFromProjectChatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/project-chats/{discussion_id}/create-feature":{"post":{"tags":["project-chats"],"summary":"Create Feature From Project Chat","description":"Create a feature from the discussion's proposed values.","operationId":"create_feature_from_project_chat_api_v1_projects__project_id__project_chats__discussion_id__create_feature_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"discussion_id","in":"path","required":true,"schema":{"type":"string","title":"Discussion Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CreateFeatureFromProjectChatRequest"},{"type":"null"}],"title":"Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFeatureFromProjectChatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/project-chats/{discussion_id}/created-features":{"get":{"tags":["project-chats"],"summary":"Get Created Features","description":"Get list of features created from this discussion.","operationId":"get_created_features_api_v1_projects__project_id__project_chats__discussion_id__created_features_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"discussion_id","in":"path","required":true,"schema":{"type":"string","title":"Discussion Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CreatedFeatureInfo"},"title":"Response Get Created Features Api V1 Projects Project Id Project Chats Discussion Id Created Features Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/project-chats/{discussion_id}/messages/{message_id}":{"delete":{"tags":["project-chats"],"summary":"Delete Message","description":"Delete a user message from a pre-phase discussion.\n\nOnly the message author can delete their own user messages.\nBot, system, and code exploration messages cannot be deleted.","operationId":"delete_message_api_v1_projects__project_id__project_chats__discussion_id__messages__message_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"discussion_id","in":"path","required":true,"schema":{"type":"string","title":"Discussion Id"}},{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/project-chats/{discussion_id}/messages/{message_id}/start-over":{"post":{"tags":["project-chats"],"summary":"Start Over From Message","description":"Start over from a specific message in the conversation.\n\nDeletes the target message and all subsequent messages, then resets\nall proposal fields and generation flags.\n\nOnly the message author can trigger start over from their own user messages.","operationId":"start_over_from_message_api_v1_projects__project_id__project_chats__discussion_id__messages__message_id__start_over_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"discussion_id","in":"path","required":true,"schema":{"type":"string","title":"Discussion Id"}},{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectChatStartOverResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/project-chats/{discussion_id}/visibility":{"patch":{"tags":["project-chats"],"summary":"Update Visibility","description":"Update the visibility of a project chat.\n\nOnly the creator of the chat can change its visibility.","operationId":"update_visibility_api_v1_projects__project_id__project_chats__discussion_id__visibility_patch","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"discussion_id","in":"path","required":true,"schema":{"type":"string","title":"Discussion Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__project_chat__UpdateVisibilityRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectChatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/project-chats/{discussion_id}/messages/{message_id}/reactions":{"post":{"tags":["project-chats"],"summary":"Toggle Reaction","description":"Toggle a reaction on a project chat message.\n\nOnly user messages support reactions.","operationId":"toggle_reaction_api_v1_projects__project_id__project_chats__discussion_id__messages__message_id__reactions_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"discussion_id","in":"path","required":true,"schema":{"type":"string","title":"Discussion Id"}},{"name":"message_id","in":"path","required":true,"schema":{"type":"string","title":"Message Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToggleReactionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToggleReactionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/project-chats/{discussion_id}/typing":{"post":{"tags":["project-chats"],"summary":"Send Typing Indicator","description":"Send a typing indicator for a project chat.\n\nThe typing state is stored in Redis with a 5-second TTL.\nAll org members connected via WebSocket will receive the update.","operationId":"send_typing_indicator_api_v1_projects__project_id__project_chats__discussion_id__typing_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"discussion_id","in":"path","required":true,"schema":{"type":"string","title":"Discussion Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routers__project_chats__TypingIndicatorRequest"}}}},"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/chats":{"post":{"tags":["org-chats"],"summary":"Create Org Project Chat","description":"Create a new org-scoped discussion (for creating a new project).","operationId":"create_org_project_chat_api_v1_orgs__org_id__chats_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectChatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["org-chats"],"summary":"List Org Discussions","description":"List org-scoped project chats for the current user with pagination.","operationId":"list_org_discussions_api_v1_orgs__org_id__chats_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrgProjectChatListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/chats/{project_chat_id}":{"get":{"tags":["org-chats"],"summary":"Get Org Discussion","description":"Get an org-scoped discussion with all messages (user can only access their own).","operationId":"get_org_discussion_api_v1_orgs__org_id__chats__project_chat_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_chat_id","in":"path","required":true,"schema":{"type":"string","title":"Project Chat Id"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectChatWithMessages"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["org-chats"],"summary":"Delete Org Discussion","description":"Delete an org-scoped discussion (user can only delete their own).","operationId":"delete_org_discussion_api_v1_orgs__org_id__chats__project_chat_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_chat_id","in":"path","required":true,"schema":{"type":"string","title":"Project Chat Id"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/chats/{project_chat_id}/messages":{"post":{"tags":["org-chats"],"summary":"Send Message","description":"Send a user message and trigger bot response (user can only message their own chats).","operationId":"send_message_api_v1_orgs__org_id__chats__project_chat_id__messages_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_chat_id","in":"path","required":true,"schema":{"type":"string","title":"Project Chat Id"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__project_chat__SendMessageRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__project_chat__SendMessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/chats/{project_chat_id}/retry":{"post":{"tags":["org-chats"],"summary":"Retry Message","description":"Retry sending the last failed message (user can only retry their own chats).","operationId":"retry_message_api_v1_orgs__org_id__chats__project_chat_id__retry_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_chat_id","in":"path","required":true,"schema":{"type":"string","title":"Project Chat Id"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__schemas__project_chat__SendMessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/orgs/{org_id}/chats/{project_chat_id}/create-project":{"post":{"tags":["org-chats"],"summary":"Create Project From Project Chat","description":"Create a project from discussion (user can only create from their own chats).","operationId":"create_project_from_project_chat_api_v1_orgs__org_id__chats__project_chat_id__create_project_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_chat_id","in":"path","required":true,"schema":{"type":"string","title":"Project Chat Id"}},{"name":"org_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Org Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CreateProjectFromProjectChatRequest"},{"type":"null"}],"title":"Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectFromProjectChatResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/projects/{project_id}/conversations":{"post":{"tags":["conversations"],"summary":"Create Project Chat Conversation","description":"Create a new project chat conversation.\n\nThis creates a Thread with context_type=PROJECT_CHAT.","operationId":"create_project_chat_conversation_api_v1_projects__project_id__conversations_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateProjectChatConversationRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectChatConversationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["conversations"],"summary":"List Project Conversations","description":"List project chat conversations for a project.","operationId":"list_project_conversations_api_v1_projects__project_id__conversations_get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"project_id","in":"path","required":true,"schema":{"type":"string","title":"Project Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routers__conversations__ProjectChatListResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/conversations/{conversation_id}":{"get":{"tags":["conversations"],"summary":"Get Conversation","description":"Get a conversation by ID with all its items.\n\nSupports both UUID and short_id/URL identifier formats.","operationId":"get_conversation_api_v1_conversations__conversation_id__get","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectChatConversationWithItems"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/conversations/{conversation_id}/messages":{"post":{"tags":["conversations"],"summary":"Send Message","description":"Send a message in a conversation.","operationId":"send_message_api_v1_conversations__conversation_id__messages_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routers__conversations__SendMessageRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routers__conversations__SendMessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/conversations/{conversation_id}/visibility":{"patch":{"tags":["conversations"],"summary":"Update Conversation Visibility","description":"Update the visibility of a conversation.\n\nOnly the owner can change visibility.","operationId":"update_conversation_visibility_api_v1_conversations__conversation_id__visibility_patch","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__routers__conversations__UpdateVisibilityRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectChatConversationResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/conversations/{conversation_id}/messages/{item_id}":{"delete":{"tags":["conversations"],"summary":"Delete Message","description":"Delete a message from a conversation.","operationId":"delete_message_api_v1_conversations__conversation_id__messages__item_id__delete","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/conversations/{conversation_id}/messages/{item_id}/reactions":{"post":{"tags":["conversations"],"summary":"Toggle Message Reaction","description":"Toggle a reaction on a message.","operationId":"toggle_message_reaction_api_v1_conversations__conversation_id__messages__item_id__reactions_post","security":[{"OAuth2PasswordBearer":[]}],"parameters":[{"name":"conversation_id","in":"path","required":true,"schema":{"type":"string","title":"Conversation Id"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}},{"name":"mfbt_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mfbt Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToggleReactionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToggleReactionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"tags":["health"],"summary":"Health Check","description":"Health check endpoint.\n\nReturns:\n dict: Status indicating the service is running","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/":{"get":{"tags":["root"],"summary":"Root","description":"Root endpoint with API information.\n\nReturns:\n dict: Basic API information","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AIMentionRequest":{"properties":{"message_text":{"type":"string","minLength":1,"title":"Message Text","description":"The message text containing @MFBTAI"},"feature_id":{"type":"string","title":"Feature Id","description":"Feature ID for context"},"additional_context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Additional Context","description":"Optional additional context for the AI assistant"},"trigger_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Trigger Type","description":"Optional trigger type (e.g., 'feature_created', 'manual_start')"}},"type":"object","required":["message_text","feature_id"],"title":"AIMentionRequest","description":"Schema for @MFBTAI mention request."},"AIMentionResponse":{"properties":{"job_id":{"type":"string","title":"Job Id","description":"ID of the background job processing the AI mention"},"status":{"type":"string","title":"Status","description":"Job acceptance status","default":"accepted"},"message":{"type":"string","title":"Message","description":"Status message","default":"AI mention job queued successfully"}},"type":"object","required":["job_id"],"title":"AIMentionResponse","description":"Schema for @MFBTAI async response (job accepted)."},"ActivityListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/ActivityLogResponse"},"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":"ActivityListResponse","description":"Schema for paginated activity log list."},"ActivityLogResponse":{"properties":{"id":{"type":"string","title":"Id"},"entity_type":{"type":"string","title":"Entity Type"},"entity_id":{"type":"string","title":"Entity Id"},"event_type":{"type":"string","title":"Event Type"},"actor_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor Id"},"event_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Event Metadata"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","entity_type","entity_id","event_type","created_at"],"title":"ActivityLogResponse","description":"Schema for activity log response."},"AddQuestionsRequest":{"properties":{"message_id":{"type":"string","title":"Message Id"},"temp_question_ids":{"items":{"type":"string"},"type":"array","title":"Temp Question Ids"}},"type":"object","required":["message_id","temp_question_ids"],"title":"AddQuestionsRequest","description":"Request schema for adding questions to the phase."},"AddQuestionsResponse":{"properties":{"added_count":{"type":"integer","title":"Added Count"},"feature_ids":{"items":{"type":"string"},"type":"array","title":"Feature Ids"},"session_limit_reached":{"type":"boolean","title":"Session Limit Reached"}},"type":"object","required":["added_count","feature_ids","session_limit_reached"],"title":"AddQuestionsResponse","description":"Response schema for add questions endpoint."},"AgentLogListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/JobWithCallLogs"},"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":"AgentLogListResponse","description":"Response for listing agent logs."},"AgentUsage":{"properties":{"agent_name":{"type":"string","title":"Agent Name"},"agent_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Display Name"},"total_tokens":{"type":"integer","title":"Total Tokens"},"total_cost_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Cost Usd"},"call_count":{"type":"integer","title":"Call Count"}},"type":"object","required":["agent_name","agent_display_name","total_tokens","total_cost_usd","call_count"],"title":"AgentUsage","description":"LLM usage breakdown by agent."},"ApiKeyCreate":{"properties":{"name":{"type":"string","maxLength":200,"minLength":1,"title":"Name","description":"Human-readable name for the API key"}},"type":"object","required":["name"],"title":"ApiKeyCreate","description":"Schema for creating a new API key."},"ApiKeyCreateResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"api_key":{"type":"string","title":"Api Key","description":"Full API key in format: mfbtsk-{uuid}"}},"type":"object","required":["id","name","created_at","api_key"],"title":"ApiKeyCreateResponse","description":"Schema for API key creation response.\n\nThis is the ONLY time the full API key is returned to the user.\nThe key should be displayed prominently with a copy button and a warning\nthat it will never be shown again."},"ApiKeyList":{"properties":{"keys":{"items":{"$ref":"#/components/schemas/ApiKeyResponse"},"type":"array","title":"Keys"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["keys","total"],"title":"ApiKeyList","description":"Schema for listing API keys."},"ApiKeyResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"revoked":{"type":"boolean","title":"Revoked"},"key_preview":{"type":"string","title":"Key Preview","description":"Partial key for identification (e.g., 'mfbtsk-...cb29f34f')"},"api_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key","description":"Full API key (available for keys created after encryption was enabled)"},"is_legacy":{"type":"boolean","title":"Is Legacy","description":"True if key was created before encryption was enabled (cannot be viewed)","default":false}},"type":"object","required":["id","name","created_at","last_used_at","revoked","key_preview"],"title":"ApiKeyResponse","description":"Schema for API key response."},"AuthorInfo":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"}},"type":"object","required":["id","email"],"title":"AuthorInfo","description":"Schema for author information."},"AutoGenerateResponse":{"properties":{"spec_job_id":{"type":"string","title":"Spec Job Id"},"implementation_id":{"type":"string","title":"Implementation Id"}},"type":"object","required":["spec_job_id","implementation_id"],"title":"AutoGenerateResponse","description":"Response schema for auto-generate endpoint."},"AvailableUserResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"}},"type":"object","required":["id","email"],"title":"AvailableUserResponse","description":"Schema for available user (org member) response."},"Body_login_api_v1_auth_login_post":{"properties":{"grant_type":{"anyOf":[{"type":"string","pattern":"^password$"},{"type":"null"}],"title":"Grant Type"},"username":{"type":"string","title":"Username"},"password":{"type":"string","format":"password","title":"Password"},"scope":{"type":"string","title":"Scope","default":""},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"format":"password","title":"Client Secret"}},"type":"object","required":["username","password"],"title":"Body_login_api_v1_auth_login_post"},"Body_oauth_revoke_oauth_revoke_post":{"properties":{"token":{"type":"string","title":"Token"},"client_id":{"type":"string","title":"Client Id"},"token_type_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Type Hint"}},"type":"object","required":["token","client_id"],"title":"Body_oauth_revoke_oauth_revoke_post"},"Body_oauth_token_oauth_token_post":{"properties":{"grant_type":{"type":"string","title":"Grant Type"},"client_id":{"type":"string","title":"Client Id"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code"},"redirect_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect Uri"},"code_verifier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Verifier"},"refresh_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Token"}},"type":"object","required":["grant_type","client_id"],"title":"Body_oauth_token_oauth_token_post"},"Body_upload_discussion_image_org_scoped_api_v1_orgs__org_id__project_chats__project_chat_id__images_upload_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_discussion_image_org_scoped_api_v1_orgs__org_id__project_chats__project_chat_id__images_upload_post"},"Body_upload_discussion_image_project_scoped_api_v1_projects__project_id__project_chats__project_chat_id__images_upload_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_discussion_image_project_scoped_api_v1_projects__project_id__project_chats__project_chat_id__images_upload_post"},"Body_upload_mcp_image_api_v1_mcp_images_upload_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_mcp_image_api_v1_mcp_images_upload_post"},"Body_upload_thread_image_api_v1_thread_images_upload_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"thread_id":{"type":"string","title":"Thread Id"}},"type":"object","required":["file","thread_id"],"title":"Body_upload_thread_image_api_v1_thread_images_upload_post"},"BrainstormFeatureGenerationStatusResponse":{"properties":{"has_existing_modules":{"type":"boolean","title":"Has Existing Modules"},"module_count":{"type":"integer","title":"Module Count"},"feature_count":{"type":"integer","title":"Feature Count"},"has_spec_draft":{"type":"boolean","title":"Has Spec Draft"},"has_final_spec":{"type":"boolean","title":"Has Final Spec"},"has_prompt_plan_draft":{"type":"boolean","title":"Has Prompt Plan Draft"},"has_final_prompt_plan":{"type":"boolean","title":"Has Final Prompt Plan"},"spec_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Spec Source"},"spec_draft_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Spec Draft Version"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"},"can_generate":{"type":"boolean","title":"Can Generate"}},"type":"object","required":["has_existing_modules","module_count","feature_count","has_spec_draft","has_final_spec","has_prompt_plan_draft","has_final_prompt_plan","spec_source","spec_draft_version","warnings","can_generate"],"title":"BrainstormFeatureGenerationStatusResponse","description":"Response schema for brainstorm feature generation status check."},"BrainstormPromptPlanGenerationStatusResponse":{"properties":{"has_existing_draft":{"type":"boolean","title":"Has Existing Draft"},"draft_count":{"type":"integer","title":"Draft Count"},"latest_draft_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latest Draft Version"},"has_final_plan":{"type":"boolean","title":"Has Final Plan"},"has_spec_draft":{"type":"boolean","title":"Has Spec Draft"},"has_final_spec":{"type":"boolean","title":"Has Final Spec"},"spec_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Spec Source"},"spec_draft_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Spec Draft Version"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"},"can_generate":{"type":"boolean","title":"Can Generate"}},"type":"object","required":["has_existing_draft","draft_count","latest_draft_version","has_final_plan","has_spec_draft","has_final_spec","spec_source","spec_draft_version","warnings","can_generate"],"title":"BrainstormPromptPlanGenerationStatusResponse","description":"Response schema for brainstorm prompt plan generation status check."},"BrainstormSpecGenerationStatusResponse":{"properties":{"has_existing_draft":{"type":"boolean","title":"Has Existing Draft"},"draft_count":{"type":"integer","title":"Draft Count"},"latest_draft_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Latest Draft Version"},"has_final_spec":{"type":"boolean","title":"Has Final Spec"},"total_threads":{"type":"integer","title":"Total Threads"},"answered_threads":{"type":"integer","title":"Answered Threads"},"thread_progress_percentage":{"type":"integer","title":"Thread Progress Percentage"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"},"can_generate":{"type":"boolean","title":"Can Generate"}},"type":"object","required":["has_existing_draft","draft_count","latest_draft_version","has_final_spec","total_threads","answered_threads","thread_progress_percentage","warnings","can_generate"],"title":"BrainstormSpecGenerationStatusResponse","description":"Response schema for brainstorm spec generation status check."},"BrainstormingPhaseCreate":{"properties":{"phase_type":{"$ref":"#/components/schemas/BrainstormingPhaseType"},"title":{"type":"string","maxLength":255,"minLength":1,"title":"Title"},"description":{"type":"string","minLength":10,"title":"Description","description":"Detailed description of what to brainstorm. Required for AI-generated aspects and questions."}},"type":"object","required":["phase_type","title","description"],"title":"BrainstormingPhaseCreate","description":"Schema for creating a brainstorming phase."},"BrainstormingPhaseListResponse":{"properties":{"id":{"type":"string","title":"Id"},"project_id":{"type":"string","title":"Project Id"},"phase_type":{"$ref":"#/components/schemas/BrainstormingPhaseType"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"created_by_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By Name"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At"},"active_answered":{"type":"integer","title":"Active Answered","default":0},"active_total":{"type":"integer","title":"Active Total","default":0},"pending_total":{"type":"integer","title":"Pending Total","default":0},"is_generating_conversation":{"type":"boolean","title":"Is Generating Conversation","default":false},"is_generating_spec":{"type":"boolean","title":"Is Generating Spec","default":false},"is_generating_prompt_plan":{"type":"boolean","title":"Is Generating Prompt Plan","default":false},"is_generating_features":{"type":"boolean","title":"Is Generating Features","default":false},"short_id":{"type":"string","title":"Short Id"},"url_identifier":{"type":"string","title":"Url Identifier"},"container_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Container Id"},"phase_subtype":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phase Subtype"},"container_sequence":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Container Sequence"}},"type":"object","required":["id","project_id","phase_type","title","created_at","short_id","url_identifier"],"title":"BrainstormingPhaseListResponse","description":"Schema for brainstorming phase list item."},"BrainstormingPhaseResponse":{"properties":{"id":{"type":"string","title":"Id"},"project_id":{"type":"string","title":"Project Id"},"phase_type":{"$ref":"#/components/schemas/BrainstormingPhaseType"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"description_image_attachments":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Description Image Attachments"},"created_by":{"type":"string","title":"Created By"},"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"},"is_generating_conversation":{"type":"boolean","title":"Is Generating Conversation","default":false},"is_generating_spec":{"type":"boolean","title":"Is Generating Spec","default":false},"is_generating_prompt_plan":{"type":"boolean","title":"Is Generating Prompt Plan","default":false},"is_generating_features":{"type":"boolean","title":"Is Generating Features","default":false},"short_id":{"type":"string","title":"Short Id"},"url_identifier":{"type":"string","title":"Url Identifier"},"container_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Container Id"},"phase_subtype":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phase Subtype"},"container_sequence":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Container Sequence"}},"type":"object","required":["id","project_id","phase_type","title","created_by","created_at","updated_at","short_id","url_identifier"],"title":"BrainstormingPhaseResponse","description":"Schema for brainstorming phase response."},"BrainstormingPhaseType":{"type":"string","enum":["initial","feature_specific"],"title":"BrainstormingPhaseType","description":"Type of brainstorming phase."},"BrainstormingPhaseUpdate":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"BrainstormingPhaseUpdate","description":"Schema for updating a brainstorming phase."},"BranchListResponse":{"properties":{"branches":{"items":{"$ref":"#/components/schemas/GroundingFileBranchResponse"},"type":"array","title":"Branches"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["branches","total"],"title":"BranchListResponse","description":"Response schema for listing branch versions."},"BugSyncHistoryResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"synced_at":{"type":"string","format":"date-time","title":"Synced At"},"status":{"type":"string","title":"Status","description":"Sync status (success/error)"},"imported_data_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Imported Data Json","description":"Imported ticket data"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message","description":"Error message if failed"},"triggered_by":{"type":"string","title":"Triggered By","description":"Who triggered sync (system/user/agent)"}},"type":"object","required":["id","project_id","synced_at","status","triggered_by"],"title":"BugSyncHistoryResponse","description":"Schema for bug sync history response."},"BugfixCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"short_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Short Description"},"idea_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idea Text"},"key":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Key"},"external_ticket_id":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"External Ticket Id"},"external_system":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"External System"}},"type":"object","required":["name"],"title":"BugfixCreate","description":"Schema for creating a bugfix project."},"CancelGenerationResponse":{"properties":{"cancelled_jobs":{"type":"integer","title":"Cancelled Jobs"},"cleared_flags":{"items":{"type":"string"},"type":"array","title":"Cleared Flags"}},"type":"object","required":["cancelled_jobs","cleared_flags"],"title":"CancelGenerationResponse","description":"Response schema for cancel-generation endpoint."},"CheckPrefixResponse":{"properties":{"available":{"type":"boolean","title":"Available"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["available"],"title":"CheckPrefixResponse","description":"Schema for prefix availability check response."},"ClearStatusNotesResponse":{"properties":{"cleared_count":{"type":"integer","title":"Cleared Count"},"implementation_ids":{"items":{"type":"string"},"type":"array","title":"Implementation Ids"}},"type":"object","required":["cleared_count","implementation_ids"],"title":"ClearStatusNotesResponse","description":"Response after clearing status and notes from implementations."},"CloneProjectRequest":{"properties":{"include_phases":{"type":"boolean","title":"Include Phases","default":false},"include_threads":{"$ref":"#/components/schemas/ThreadCloneOption","default":"none"},"share_with_collaborators":{"type":"boolean","title":"Share With Collaborators","default":false}},"type":"object","title":"CloneProjectRequest","description":"Schema for cloning a project."},"CommentCreate":{"properties":{"body_markdown":{"type":"string","maxLength":32000,"minLength":1,"title":"Body Markdown"}},"type":"object","required":["body_markdown"],"title":"CommentCreate","description":"Schema for creating a comment."},"CommentResponse":{"properties":{"id":{"type":"string","title":"Id"},"thread_id":{"type":"string","title":"Thread Id"},"author_id":{"type":"string","title":"Author Id"},"author":{"anyOf":[{"$ref":"#/components/schemas/AuthorInfo"},{"type":"null"}]},"body_markdown":{"type":"string","title":"Body Markdown"},"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","thread_id","author_id","body_markdown","created_at"],"title":"CommentResponse","description":"Schema for comment response."},"CommentUpdate":{"properties":{"body_markdown":{"type":"string","maxLength":32000,"minLength":1,"title":"Body Markdown"}},"type":"object","required":["body_markdown"],"title":"CommentUpdate","description":"Schema for updating a comment."},"ConnectorSourcesRequest":{"properties":{"connector_id":{"type":"string","title":"Connector Id"}},"type":"object","required":["connector_id"],"title":"ConnectorSourcesRequest","description":"Schema for requesting available sources from a connector."},"ContentVersionCreate":{"properties":{"content_markdown":{"type":"string","minLength":1,"title":"Content Markdown"}},"type":"object","required":["content_markdown"],"title":"ContentVersionCreate","description":"Schema for creating a new content version."},"ContentVersionListResponse":{"properties":{"id":{"type":"string","title":"Id"},"version":{"type":"integer","title":"Version"},"edit_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Edit Source"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"creator_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creator Display Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","version","created_at"],"title":"ContentVersionListResponse","description":"Schema for version list items (without full content)."},"ContentVersionResponse":{"properties":{"id":{"type":"string","title":"Id"},"feature_id":{"type":"string","title":"Feature Id"},"content_type":{"$ref":"#/components/schemas/FeatureContentType"},"version":{"type":"integer","title":"Version"},"content_markdown":{"type":"string","title":"Content Markdown"},"is_active":{"type":"boolean","title":"Is Active"},"edit_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Edit Source"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"creator_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creator Display Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","feature_id","content_type","version","content_markdown","is_active","created_at"],"title":"ContentVersionResponse","description":"Schema for full version response with content."},"ContextType":{"type":"string","enum":["spec","general","spec_draft","prompt_plan_draft","brainstorm_feature","project_chat"],"title":"ContextType","description":"Context types for threads."},"CreateCommentItem":{"properties":{"body_markdown":{"type":"string","maxLength":32000,"minLength":1,"title":"Body Markdown"},"images":{"anyOf":[{"items":{"$ref":"#/components/schemas/ImageAttachment"},"type":"array","maxItems":10},{"type":"null"}],"title":"Images"}},"type":"object","required":["body_markdown"],"title":"CreateCommentItem","description":"Request to create a comment item."},"CreateFeatureFromProjectChatRequest":{"properties":{"module_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Module Id"},"new_module_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"New Module Title"},"new_module_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"New Module Description"}},"type":"object","title":"CreateFeatureFromProjectChatRequest","description":"Request schema for creating a feature from project chat."},"CreateFeatureFromProjectChatResponse":{"properties":{"feature_id":{"type":"string","format":"uuid","title":"Feature Id"},"feature_key":{"type":"string","title":"Feature Key"},"feature_title":{"type":"string","title":"Feature Title"},"module_id":{"type":"string","format":"uuid","title":"Module Id"},"module_title":{"type":"string","title":"Module Title"},"thread_id":{"type":"string","format":"uuid","title":"Thread Id"},"is_new_module":{"type":"boolean","title":"Is New Module"}},"type":"object","required":["feature_id","feature_key","feature_title","module_id","module_title","thread_id","is_new_module"],"title":"CreateFeatureFromProjectChatResponse","description":"Response schema for create feature from project chat endpoint."},"CreateFeatureWithThreadRequest":{"properties":{"title":{"type":"string","maxLength":255,"minLength":1,"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"priority":{"$ref":"#/components/schemas/FeaturePriority","default":"important"},"module_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Module Id"},"new_module_title":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"New Module Title"},"new_module_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"New Module Description"}},"type":"object","required":["title"],"title":"CreateFeatureWithThreadRequest","description":"Schema for creating a feature with auto-created discussion thread."},"CreateMCQAnswer":{"properties":{"selected_option_id":{"type":"string","title":"Selected Option Id"},"free_text":{"anyOf":[{"type":"string","maxLength":32000},{"type":"null"}],"title":"Free Text"},"force_change":{"type":"boolean","title":"Force Change","default":false}},"type":"object","required":["selected_option_id"],"title":"CreateMCQAnswer","description":"Request to answer an MCQ follow-up."},"CreatePhaseFromProjectChatResponse":{"properties":{"phase_id":{"type":"string","format":"uuid","title":"Phase Id"},"phase_title":{"type":"string","title":"Phase Title"},"phase_short_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phase Short Id"},"container_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Container Id"},"container_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Container Title"}},"type":"object","required":["phase_id","phase_title"],"title":"CreatePhaseFromProjectChatResponse","description":"Response schema for create phase from project chat endpoint."},"CreateProjectChatConversationRequest":{"properties":{"visibility":{"type":"string","title":"Visibility","description":"Visibility: 'private' or 'team'","default":"private"},"initial_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Initial Message","description":"Optional initial message to send"}},"type":"object","title":"CreateProjectChatConversationRequest","description":"Request to create a new project chat conversation."},"CreateProjectChatRequest":{"properties":{"initial_message_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Initial Message Content"},"target_container_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Container Id"}},"type":"object","title":"CreateProjectChatRequest","description":"Request schema for creating a project chat."},"CreateProjectFromProjectChatRequest":{"properties":{"project_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Name"},"project_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Key"}},"type":"object","title":"CreateProjectFromProjectChatRequest","description":"Request schema for creating a project from project chat."},"CreateProjectFromProjectChatResponse":{"properties":{"project_id":{"type":"string","format":"uuid","title":"Project Id"},"project_name":{"type":"string","title":"Project Name"},"phase_id":{"type":"string","format":"uuid","title":"Phase Id"},"phase_title":{"type":"string","title":"Phase Title"}},"type":"object","required":["project_id","project_name","phase_id","phase_title"],"title":"CreateProjectFromProjectChatResponse","description":"Response schema for create project from project chat endpoint."},"CreatedFeatureInfo":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"feature_key":{"type":"string","title":"Feature Key"},"title":{"type":"string","title":"Title"},"module_id":{"type":"string","format":"uuid","title":"Module Id"},"module_title":{"type":"string","title":"Module Title"}},"type":"object","required":["id","feature_key","title","module_id","module_title"],"title":"CreatedFeatureInfo","description":"Info about a feature created from this project chat."},"DashboardStatsResponse":{"properties":{"user_count":{"type":"integer","title":"User Count"},"project_count":{"type":"integer","title":"Project Count"},"llm_usage_this_month":{"$ref":"#/components/schemas/MonthlyLLMUsage"},"recent_llm_calls":{"items":{"$ref":"#/components/schemas/RecentLLMCall"},"type":"array","title":"Recent Llm Calls"},"plan_info":{"$ref":"#/components/schemas/PlanInfo"}},"type":"object","required":["user_count","project_count","llm_usage_this_month","recent_llm_calls","plan_info"],"title":"DashboardStatsResponse","description":"Complete dashboard data for organization home page."},"DismissRecommendationRequest":{"properties":{"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason","description":"Optional reason for dismissal"}},"type":"object","title":"DismissRecommendationRequest","description":"Request to dismiss a recommendation."},"DownstreamItemsResponse":{"properties":{"has_downstream":{"type":"boolean","title":"Has Downstream"},"downstream_count":{"type":"integer","title":"Downstream Count"}},"type":"object","required":["has_downstream","downstream_count"],"title":"DownstreamItemsResponse","description":"Response for checking downstream items from an MCQ."},"DraftListResponse":{"properties":{"id":{"type":"string","title":"Id"},"brainstorming_phase_id":{"type":"string","title":"Brainstorming Phase Id"},"spec_type":{"$ref":"#/components/schemas/SpecType"},"version_number":{"type":"integer","title":"Version Number"},"created_by":{"type":"string","title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","brainstorming_phase_id","spec_type","version_number","created_by","created_at"],"title":"DraftListResponse","description":"Schema for draft version list item."},"DraftVersionCreate":{"properties":{"content_markdown":{"type":"string","minLength":1,"title":"Content Markdown"},"blocks":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Blocks"}},"type":"object","required":["content_markdown"],"title":"DraftVersionCreate","description":"Schema for creating a draft version."},"DraftVersionResponse":{"properties":{"id":{"type":"string","title":"Id"},"brainstorming_phase_id":{"type":"string","title":"Brainstorming Phase Id"},"spec_type":{"$ref":"#/components/schemas/SpecType"},"version_number":{"type":"integer","title":"Version Number"},"content_markdown":{"type":"string","title":"Content Markdown"},"content_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Content Json"},"blocks":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Blocks"},"created_by":{"type":"string","title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","brainstorming_phase_id","spec_type","version_number","content_markdown","created_by","created_at"],"title":"DraftVersionResponse","description":"Schema for draft version response."},"EfficiencyMetrics":{"properties":{"avg_tokens_per_call":{"type":"number","title":"Avg Tokens Per Call","description":"Average tokens per LLM call"},"avg_cost_per_call":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Cost Per Call","description":"Average cost per LLM call in USD"},"total_calls":{"type":"integer","title":"Total Calls","description":"Total number of LLM calls"},"total_tokens":{"type":"integer","title":"Total Tokens","description":"Total tokens consumed"},"total_credits":{"type":"number","title":"Total Credits","description":"Total credits (tokens / 100k)"},"total_cost_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Cost Usd","description":"Total cost in USD"}},"type":"object","required":["avg_tokens_per_call","total_calls","total_tokens","total_credits"],"title":"EfficiencyMetrics","description":"Efficiency metrics for the platform."},"EfficiencyOverviewResponse":{"properties":{"time_range":{"$ref":"#/components/schemas/TimeRange","description":"The time range used for the query"},"start_date":{"type":"string","format":"date","title":"Start Date","description":"Start date of the query range"},"end_date":{"type":"string","format":"date","title":"End Date","description":"End date of the query range"},"org_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Org Id","description":"Organization filter (null for platform-wide)"},"metrics":{"$ref":"#/components/schemas/EfficiencyMetrics","description":"Efficiency metrics"}},"type":"object","required":["time_range","start_date","end_date","metrics"],"title":"EfficiencyOverviewResponse","description":"Response model for efficiency overview analytics endpoint."},"EfficiencyScore":{"properties":{"efficiency_percentage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Efficiency Percentage","description":"Usage efficiency as percentage of plan limit"},"plan_type":{"type":"string","title":"Plan Type","description":"Type of plan (monthly, lifetime, unlimited)"},"threshold_color":{"anyOf":[{"$ref":"#/components/schemas/ThresholdColor"},{"type":"null"}],"description":"Color-coded threshold indicator"},"recommendation_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recommendation Text","description":"Recommendation based on efficiency level"},"tokens_used":{"type":"integer","title":"Tokens Used","description":"Total tokens consumed in the period"},"tokens_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tokens Limit","description":"Plan token limit (None for unlimited)"}},"type":"object","required":["plan_type","tokens_used"],"title":"EfficiencyScore","description":"Efficiency score with threshold coloring."},"EfficiencyStreakInfo":{"properties":{"has_streak":{"type":"boolean","title":"Has Streak","description":"Whether a qualifying streak was found"},"action":{"anyOf":[{"$ref":"#/components/schemas/RecommendationAction"},{"type":"null"}],"description":"Recommended action if streak qualifies"},"consecutive_days":{"type":"integer","title":"Consecutive Days","description":"Number of consecutive days in streak","default":0},"avg_efficiency_percent":{"type":"number","title":"Avg Efficiency Percent","description":"Average efficiency during streak","default":0.0},"streak_start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Streak Start Date","description":"Start date of the streak"},"streak_end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Streak End Date","description":"End date of the streak"},"avg_daily_tokens_used":{"type":"integer","title":"Avg Daily Tokens Used","description":"Average daily tokens used during streak","default":0}},"type":"object","required":["has_streak"],"title":"EfficiencyStreakInfo","description":"Information about an efficiency streak for analysis."},"EmailEnvConfigResponse":{"properties":{"configured":{"type":"boolean","title":"Configured","description":"Whether email env vars are configured with non-empty values"},"from_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Email","description":"From email address (if configured)"},"from_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Name","description":"From name (if configured)"}},"type":"object","required":["configured"],"title":"EmailEnvConfigResponse","description":"Schema for email environment config check response."},"EmailTemplateListResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"key":{"type":"string","title":"Key"},"display_name":{"type":"string","title":"Display Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_footer":{"type":"boolean","title":"Is Footer"},"is_active":{"type":"boolean","title":"Is Active"},"mandatory_variables":{"items":{"type":"string"},"type":"array","title":"Mandatory Variables"},"available_variables":{"items":{"type":"string"},"type":"array","title":"Available Variables"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","key","display_name","description","is_footer","is_active","mandatory_variables","available_variables","updated_at"],"title":"EmailTemplateListResponse","description":"Schema for listing email templates."},"EmailTemplatePreviewRequest":{"properties":{"subject_template":{"type":"string","title":"Subject Template"},"body_markdown":{"type":"string","title":"Body Markdown"},"sample_variables":{"additionalProperties":{"type":"string"},"type":"object","title":"Sample Variables"}},"type":"object","required":["subject_template","body_markdown"],"title":"EmailTemplatePreviewRequest","description":"Request to preview a template with sample data."},"EmailTemplatePreviewResponse":{"properties":{"subject":{"type":"string","title":"Subject"},"body_html":{"type":"string","title":"Body Html"}},"type":"object","required":["subject","body_html"],"title":"EmailTemplatePreviewResponse","description":"Preview of rendered template."},"EmailTemplateResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"key":{"type":"string","title":"Key"},"display_name":{"type":"string","title":"Display Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"subject_template":{"type":"string","title":"Subject Template"},"body_markdown":{"type":"string","title":"Body Markdown"},"mandatory_variables":{"items":{"type":"string"},"type":"array","title":"Mandatory Variables"},"available_variables":{"items":{"type":"string"},"type":"array","title":"Available Variables"},"is_footer":{"type":"boolean","title":"Is Footer"},"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","key","display_name","description","subject_template","body_markdown","mandatory_variables","available_variables","is_footer","is_active","created_at","updated_at"],"title":"EmailTemplateResponse","description":"Schema for email template response."},"EmailTemplateTipTapResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"key":{"type":"string","title":"Key"},"display_name":{"type":"string","title":"Display Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"subject_template":{"type":"string","title":"Subject Template"},"body_tiptap_json":{"additionalProperties":true,"type":"object","title":"Body Tiptap Json"},"body_markdown":{"type":"string","title":"Body Markdown"},"mandatory_variables":{"items":{"type":"string"},"type":"array","title":"Mandatory Variables"},"available_variables":{"items":{"type":"string"},"type":"array","title":"Available Variables"},"is_footer":{"type":"boolean","title":"Is Footer"},"is_active":{"type":"boolean","title":"Is Active"}},"type":"object","required":["id","key","display_name","description","subject_template","body_tiptap_json","body_markdown","mandatory_variables","available_variables","is_footer","is_active"],"title":"EmailTemplateTipTapResponse","description":"Response with TipTap JSON for editor."},"EmailTemplateUpdate":{"properties":{"display_name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Display Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"subject_template":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"null"}],"title":"Subject Template"},"body_markdown":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}],"title":"Body Markdown"},"mandatory_variables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Mandatory Variables"},"available_variables":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Available Variables"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"}},"type":"object","title":"EmailTemplateUpdate","description":"Schema for updating an email template."},"EmailTemplateValidateRequest":{"properties":{"subject_template":{"type":"string","title":"Subject Template"},"body_markdown":{"type":"string","title":"Body Markdown"},"mandatory_variables":{"items":{"type":"string"},"type":"array","title":"Mandatory Variables"}},"type":"object","required":["subject_template","body_markdown"],"title":"EmailTemplateValidateRequest","description":"Request to validate template content."},"EmailTemplateValidationResult":{"properties":{"valid":{"type":"boolean","title":"Valid"},"missing_variables":{"items":{"type":"string"},"type":"array","title":"Missing Variables"},"message":{"type":"string","title":"Message"}},"type":"object","required":["valid","message"],"title":"EmailTemplateValidationResult","description":"Result of template validation."},"EvaluateRecommendationResponse":{"properties":{"org_id":{"type":"string","format":"uuid","title":"Org Id","description":"Organization ID"},"org_name":{"type":"string","title":"Org Name","description":"Organization name"},"recommendation_created":{"type":"boolean","title":"Recommendation Created","description":"Whether a new recommendation was created"},"recommendation":{"anyOf":[{"$ref":"#/components/schemas/PlanRecommendationResponse"},{"type":"null"}],"description":"The recommendation if created or already exists"},"streak_info":{"$ref":"#/components/schemas/EfficiencyStreakInfo","description":"Information about the analyzed efficiency streak"}},"type":"object","required":["org_id","org_name","recommendation_created","streak_info"],"title":"EvaluateRecommendationResponse","description":"Response from evaluating an organization for recommendations."},"ExtensionCreateRequest":{"properties":{"title":{"type":"string","maxLength":255,"minLength":1,"title":"Title"},"description":{"type":"string","minLength":10,"title":"Description"}},"type":"object","required":["title","description"],"title":"ExtensionCreateRequest","description":"Request body for creating an extension phase."},"ExtensionPreviewResponse":{"properties":{"container_id":{"type":"string","title":"Container Id"},"container_title":{"type":"string","title":"Container Title"},"next_extension_number":{"type":"integer","title":"Next Extension Number"},"next_container_sequence":{"type":"integer","title":"Next Container Sequence"},"initial_spec_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Initial Spec Summary"},"initial_spec_phase_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Initial Spec Phase Title"},"sibling_extensions":{"items":{"$ref":"#/components/schemas/SiblingExtensionInfo"},"type":"array","title":"Sibling Extensions","default":[]},"code_exploration_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Exploration Summary"}},"type":"object","required":["container_id","container_title","next_extension_number","next_container_sequence"],"title":"ExtensionPreviewResponse","description":"Preview data for creating an extension phase."},"FeatureCompleteRequest":{"properties":{},"type":"object","title":"FeatureCompleteRequest","description":"Schema for marking a feature as complete."},"FeatureCompletionStatus":{"type":"string","enum":["pending","in_progress","completed"],"title":"FeatureCompletionStatus","description":"Implementation completion status for features."},"FeatureContentType":{"type":"string","enum":["description","spec","prompt_plan","implementation_notes"],"title":"FeatureContentType","description":"Type of feature content."},"FeatureImportCommentResponse":{"properties":{"id":{"type":"string","title":"Id"},"feature_id":{"type":"string","title":"Feature Id"},"author":{"type":"string","title":"Author"},"body_markdown":{"type":"string","title":"Body Markdown"},"source_created_at":{"type":"string","format":"date-time","title":"Source Created At"},"order_index":{"type":"integer","title":"Order Index"}},"type":"object","required":["id","feature_id","author","body_markdown","source_created_at","order_index"],"title":"FeatureImportCommentResponse","description":"Schema for import comment response."},"FeatureImportCommentsResponse":{"properties":{"comments":{"items":{"$ref":"#/components/schemas/FeatureImportCommentResponse"},"type":"array","title":"Comments"}},"type":"object","required":["comments"],"title":"FeatureImportCommentsResponse","description":"Schema for list of import comments."},"FeatureImportRequest":{"properties":{"connector_id":{"type":"string","title":"Connector Id"},"module_id":{"type":"string","title":"Module Id"},"external_id":{"type":"string","title":"External Id"}},"type":"object","required":["connector_id","module_id","external_id"],"title":"FeatureImportRequest","description":"Schema for importing an external issue as a feature."},"FeatureListResponse":{"properties":{"id":{"type":"string","title":"Id"},"module_id":{"type":"string","title":"Module Id"},"feature_key":{"type":"string","title":"Feature Key"},"title":{"type":"string","title":"Title"},"priority":{"$ref":"#/components/schemas/FeaturePriority"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"provenance":{"$ref":"#/components/schemas/FeatureProvenance"},"feature_type":{"$ref":"#/components/schemas/FeatureType"},"status":{"$ref":"#/components/schemas/FeatureStatus"},"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"},"is_answered":{"type":"boolean","title":"Is Answered","default":false},"completion_status":{"$ref":"#/components/schemas/FeatureCompletionStatus","default":"pending"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"spec_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Spec Text"},"prompt_plan_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt Plan Text"},"implementation_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Implementation Notes"},"has_description":{"type":"boolean","title":"Has Description","default":false},"has_spec":{"type":"boolean","title":"Has Spec","default":false},"has_prompt_plan":{"type":"boolean","title":"Has Prompt Plan","default":false},"has_notes":{"type":"boolean","title":"Has Notes","default":false},"external_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Provider"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"external_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Url"},"unresolved_count":{"type":"integer","title":"Unresolved Count","default":0},"implementation_count":{"type":"integer","title":"Implementation Count","default":0},"short_id":{"type":"string","title":"Short Id"},"url_identifier":{"type":"string","title":"Url Identifier"}},"type":"object","required":["id","module_id","feature_key","title","priority","provenance","feature_type","status","created_at","updated_at","short_id","url_identifier"],"title":"FeatureListResponse","description":"Schema for feature list item."},"FeaturePriority":{"type":"string","enum":["must_have","important","optional"],"title":"FeaturePriority","description":"Priority level for features/clarification questions."},"FeatureProvenance":{"type":"string","enum":["system","user","restored"],"title":"FeatureProvenance","description":"How the feature was created."},"FeatureRestoreRequest":{"properties":{"target_module_id":{"type":"string","title":"Target Module Id"}},"type":"object","required":["target_module_id"],"title":"FeatureRestoreRequest","description":"Schema for restoring an archived feature."},"FeatureSidebarData":{"properties":{"decision_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision Summary"},"decision_summary_short":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision Summary Short"},"unresolved_points":{"anyOf":[{"items":{"$ref":"#/components/schemas/UnresolvedPointSchema"},"type":"array"},{"type":"null"}],"title":"Unresolved Points"},"mcq_total":{"type":"integer","title":"Mcq Total","default":0},"mcq_answered":{"type":"integer","title":"Mcq Answered","default":0},"comment_count":{"type":"integer","title":"Comment Count","default":0},"has_description":{"type":"boolean","title":"Has Description","default":false},"has_spec":{"type":"boolean","title":"Has Spec","default":false},"has_prompt_plan":{"type":"boolean","title":"Has Prompt Plan","default":false},"has_notes":{"type":"boolean","title":"Has Notes","default":false}},"type":"object","title":"FeatureSidebarData","description":"Schema for feature sidebar data (decisions + engagement metrics + readiness)."},"FeatureSortField":{"type":"string","enum":["updated_at","feature_key","priority","created_at","completion_status"],"title":"FeatureSortField","description":"Sort field options for feature listing."},"FeatureStatus":{"type":"string","enum":["active","archived"],"title":"FeatureStatus","description":"Feature lifecycle status."},"FeatureType":{"type":"string","enum":["conversation","implementation"],"title":"FeatureType","description":"Purpose of the feature."},"FeatureUpdate":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"spec_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Spec Text"},"prompt_plan_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt Plan Text"},"implementation_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Implementation Notes"},"priority":{"anyOf":[{"$ref":"#/components/schemas/FeaturePriority"},{"type":"null"}]},"category":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Category"}},"type":"object","title":"FeatureUpdate","description":"Schema for updating a feature."},"FeatureWithThreadResponse":{"properties":{"id":{"type":"string","title":"Id"},"module_id":{"type":"string","title":"Module Id"},"feature_key":{"type":"string","title":"Feature Key"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"description_image_attachments":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Description Image Attachments"},"spec_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Spec Text"},"prompt_plan_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt Plan Text"},"implementation_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Implementation Notes"},"priority":{"$ref":"#/components/schemas/FeaturePriority"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"provenance":{"$ref":"#/components/schemas/FeatureProvenance"},"feature_type":{"$ref":"#/components/schemas/FeatureType"},"status":{"$ref":"#/components/schemas/FeatureStatus"},"created_by":{"type":"string","title":"Created By"},"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"},"completion_status":{"$ref":"#/components/schemas/FeatureCompletionStatus","default":"pending"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"completed_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed By Id"},"external_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Provider"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"external_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Url"},"external_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Status"},"external_state_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External State Category"},"external_author":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Author"},"external_labels":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"External Labels"},"external_imported_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"External Imported At"},"short_id":{"type":"string","title":"Short Id"},"url_identifier":{"type":"string","title":"Url Identifier"},"thread_id":{"type":"string","title":"Thread Id"}},"type":"object","required":["id","module_id","feature_key","title","priority","provenance","feature_type","status","created_by","created_at","updated_at","short_id","url_identifier","thread_id"],"title":"FeatureWithThreadResponse","description":"Feature response that includes the auto-created thread ID."},"FormDraftListItem":{"properties":{"id":{"type":"string","title":"Id"},"draft_type":{"$ref":"#/components/schemas/FormDraftType"},"name":{"type":"string","title":"Name"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","draft_type","name","updated_at"],"title":"FormDraftListItem","description":"Schema for form draft list item (minimal info for dropdown)."},"FormDraftResponse":{"properties":{"id":{"type":"string","title":"Id"},"user_id":{"type":"string","title":"User Id"},"project_id":{"type":"string","title":"Project Id"},"draft_type":{"$ref":"#/components/schemas/FormDraftType"},"name":{"type":"string","title":"Name"},"content":{"additionalProperties":true,"type":"object","title":"Content"},"context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Context"},"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","project_id","draft_type","name","content","created_at","updated_at"],"title":"FormDraftResponse","description":"Schema for form draft response."},"FormDraftType":{"type":"string","enum":["brainstorming_phase","feature_with_module","feature_simple"],"title":"FormDraftType","description":"Type of form draft."},"FormDraftUpsertRequest":{"properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id","description":"If provided, updates existing draft; otherwise creates new"},"draft_type":{"$ref":"#/components/schemas/FormDraftType"},"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"content":{"additionalProperties":true,"type":"object","title":"Content"},"context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Context"}},"type":"object","required":["draft_type","name","content"],"title":"FormDraftUpsertRequest","description":"Schema for creating or updating a form draft."},"FreemiumSettingsResponse":{"properties":{"freemium_initial_tokens":{"type":"integer","title":"Freemium Initial Tokens","description":"Initial tokens granted to new users on signup"},"freemium_weekly_topup_tokens":{"type":"integer","title":"Freemium Weekly Topup Tokens","description":"Tokens added each Monday (additive, up to max)"},"freemium_max_tokens":{"type":"integer","title":"Freemium Max Tokens","description":"Maximum token balance for freemium users"}},"type":"object","required":["freemium_initial_tokens","freemium_weekly_topup_tokens","freemium_max_tokens"],"title":"FreemiumSettingsResponse","description":"Response containing freemium plan configuration."},"FreemiumSettingsUpdate":{"properties":{"freemium_initial_tokens":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Freemium Initial Tokens","description":"Initial tokens granted to new users on signup"},"freemium_weekly_topup_tokens":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Freemium Weekly Topup Tokens","description":"Tokens added each Monday (additive, up to max)"},"freemium_max_tokens":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Freemium Max Tokens","description":"Maximum token balance for freemium users"}},"type":"object","title":"FreemiumSettingsUpdate","description":"Request to update freemium plan configuration."},"GenerateContentResponse":{"properties":{"job_id":{"type":"string","title":"Job Id"}},"type":"object","required":["job_id"],"title":"GenerateContentResponse","description":"Schema for generation job response."},"GeneratePrefixRequest":{"properties":{"project_name":{"type":"string","maxLength":255,"minLength":1,"title":"Project Name"}},"type":"object","required":["project_name"],"title":"GeneratePrefixRequest","description":"Schema for requesting a prefix generation."},"GeneratePrefixResponse":{"properties":{"prefix":{"type":"string","title":"Prefix"},"available":{"type":"boolean","title":"Available"}},"type":"object","required":["prefix","available"],"title":"GeneratePrefixResponse","description":"Schema for prefix generation response."},"GenerateQuestionsRequest":{"properties":{"user_prompt":{"type":"string","maxLength":2000,"minLength":1,"title":"User Prompt"},"num_questions":{"type":"integer","maximum":5.0,"minimum":1.0,"title":"Num Questions","default":3}},"type":"object","required":["user_prompt"],"title":"GenerateQuestionsRequest","description":"Request schema for generating questions."},"GenerateQuestionsResponse":{"properties":{"job_id":{"type":"string","title":"Job Id"},"message_id":{"type":"string","title":"Message Id"}},"type":"object","required":["job_id","message_id"],"title":"GenerateQuestionsResponse","description":"Response schema for generate questions endpoint."},"GeneratedQuestionPreview":{"properties":{"temp_id":{"type":"string","title":"Temp Id"},"aspect_title":{"type":"string","title":"Aspect Title"},"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description"},"priority":{"type":"string","title":"Priority"},"mcq":{"$ref":"#/components/schemas/MCQSchema"}},"type":"object","required":["temp_id","aspect_title","title","description","priority","mcq"],"title":"GeneratedQuestionPreview","description":"Schema for a generated question preview (before adding to phase)."},"GitHubOAuthEnvConfigResponse":{"properties":{"configured":{"type":"boolean","title":"Configured","description":"Whether GitHub OAuth env vars are configured with non-empty values"}},"type":"object","required":["configured"],"title":"GitHubOAuthEnvConfigResponse","description":"Schema for GitHub OAuth environment config check response."},"GitHubOAuthInitiateRequest":{"properties":{"display_name":{"type":"string","title":"Display Name","description":"Connector display name"},"visibility":{"$ref":"#/components/schemas/IntegrationVisibility","default":"org"}},"type":"object","required":["display_name"],"title":"GitHubOAuthInitiateRequest","description":"Request to initiate GitHub OAuth flow."},"GitHubOAuthInitiateResponse":{"properties":{"authorization_url":{"type":"string","title":"Authorization Url"},"state":{"type":"string","title":"State"}},"type":"object","required":["authorization_url","state"],"title":"GitHubOAuthInitiateResponse","description":"Response with authorization URL."},"GitHubOAuthSettingsResponse":{"properties":{"has_client_id":{"type":"boolean","title":"Has Client Id","description":"Whether a client ID is configured (UI or ENV)"},"has_client_secret":{"type":"boolean","title":"Has Client Secret","description":"Whether a client secret is configured (UI or ENV)"},"is_fully_configured":{"type":"boolean","title":"Is Fully Configured","description":"Whether both client ID and secret are configured"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source","description":"Configuration source: 'ui', 'env', or None if not configured"}},"type":"object","required":["has_client_id","has_client_secret","is_fully_configured"],"title":"GitHubOAuthSettingsResponse","description":"Schema for GitHub OAuth settings status response."},"GitHubOAuthSettingsUpdate":{"properties":{"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id","description":"GitHub OAuth App Client ID"},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret","description":"GitHub OAuth App Client Secret"},"clear_credentials":{"type":"boolean","title":"Clear Credentials","description":"Set to true to clear all GitHub OAuth credentials from UI config","default":false}},"type":"object","title":"GitHubOAuthSettingsUpdate","description":"Schema for updating GitHub OAuth settings."},"GitHubRepositoriesResponse":{"properties":{"repositories":{"items":{"$ref":"#/components/schemas/GitHubRepository"},"type":"array","title":"Repositories"}},"type":"object","required":["repositories"],"title":"GitHubRepositoriesResponse","description":"Schema for GitHub repositories list response."},"GitHubRepository":{"properties":{"full_name":{"type":"string","title":"Full Name"},"name":{"type":"string","title":"Name"},"owner":{"type":"string","title":"Owner"},"private":{"type":"boolean","title":"Private","default":false}},"type":"object","required":["full_name","name","owner"],"title":"GitHubRepository","description":"Schema for GitHub repository info."},"GroundingFileBranchResponse":{"properties":{"id":{"type":"string","title":"Id"},"filename":{"type":"string","title":"Filename"},"content":{"type":"string","title":"Content"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"branch_name":{"type":"string","title":"Branch Name"},"repo_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Repo Path"},"is_merged":{"type":"boolean","title":"Is Merged"},"is_merging":{"type":"boolean","title":"Is Merging"},"merged_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Merged At"},"last_synced_with_global_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Synced With Global At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"content_updated_at":{"type":"string","format":"date-time","title":"Content Updated At"}},"type":"object","required":["id","filename","content","branch_name","is_merged","is_merging","created_at","updated_at","content_updated_at"],"title":"GroundingFileBranchResponse","description":"Response schema for branch-specific grounding file."},"GroundingFileCreate":{"properties":{"filename":{"type":"string","title":"Filename"},"content":{"type":"string","title":"Content","default":""}},"type":"object","required":["filename"],"title":"GroundingFileCreate","description":"Schema for creating a grounding file."},"GroundingFileListResponse":{"properties":{"files":{"items":{"$ref":"#/components/schemas/GroundingFileResponse"},"type":"array","title":"Files"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["files","total"],"title":"GroundingFileListResponse","description":"Response schema for listing grounding files."},"GroundingFileResponse":{"properties":{"id":{"type":"string","title":"Id"},"filename":{"type":"string","title":"Filename"},"content":{"type":"string","title":"Content"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"is_protected":{"type":"boolean","title":"Is Protected"},"is_generating":{"type":"boolean","title":"Is Generating"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"content_updated_at":{"type":"string","format":"date-time","title":"Content Updated At"}},"type":"object","required":["id","filename","content","is_protected","is_generating","created_at","updated_at","content_updated_at"],"title":"GroundingFileResponse","description":"Response schema for grounding file."},"GroundingFileUpdate":{"properties":{"content":{"type":"string","title":"Content"}},"type":"object","required":["content"],"title":"GroundingFileUpdate","description":"Schema for updating a grounding file."},"GroundingNoteCreate":{"properties":{"content_markdown":{"type":"string","title":"Content Markdown"}},"type":"object","required":["content_markdown"],"title":"GroundingNoteCreate","description":"Request schema for creating a new grounding note version.\n\nEmpty content is allowed to clear/reset the notes."},"GroundingNoteVersionListResponse":{"properties":{"id":{"type":"string","title":"Id"},"version":{"type":"integer","title":"Version"},"edit_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Edit Source"},"creator_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creator Display Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","version","created_at"],"title":"GroundingNoteVersionListResponse","description":"Response schema for listing grounding note versions."},"GroundingNoteVersionResponse":{"properties":{"id":{"type":"string","title":"Id"},"project_id":{"type":"string","title":"Project Id"},"version":{"type":"integer","title":"Version"},"content_markdown":{"type":"string","title":"Content Markdown"},"is_active":{"type":"boolean","title":"Is Active"},"edit_source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Edit Source"},"creator_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creator Display Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","project_id","version","content_markdown","is_active","created_at"],"title":"GroundingNoteVersionResponse","description":"Response schema for a single grounding note version."},"GroupMemberResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"email":{"type":"string","title":"Email"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"provisioning_source":{"type":"string","title":"Provisioning Source"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","user_id","email","provisioning_source","created_at"],"title":"GroupMemberResponse","description":"Response for a group member."},"GroupMembersListResponse":{"properties":{"members":{"items":{"$ref":"#/components/schemas/GroupMemberResponse"},"type":"array","title":"Members"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["members","total"],"title":"GroupMembersListResponse","description":"Response for listing group members."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ImageAnnotateRequest":{"properties":{"user_remark":{"type":"string","title":"User Remark"},"s3_key":{"type":"string","title":"S3 Key"},"filename":{"type":"string","title":"Filename"},"content_type":{"type":"string","title":"Content Type","default":"image/jpeg"}},"type":"object","required":["user_remark","s3_key","filename"],"title":"ImageAnnotateRequest","description":"Request to annotate an image.\n\nIncludes image metadata from upload response since the image\nhasn't been attached to a message yet at annotation time."},"ImageAnnotateResponse":{"properties":{"job_id":{"type":"string","title":"Job Id"}},"type":"object","required":["job_id"],"title":"ImageAnnotateResponse","description":"Response from image annotation request."},"ImageAttachment":{"properties":{"id":{"type":"string","title":"Id"},"s3_key":{"type":"string","title":"S3 Key"},"filename":{"type":"string","title":"Filename"},"content_type":{"type":"string","title":"Content Type"},"size_bytes":{"type":"integer","title":"Size Bytes"},"width":{"type":"integer","title":"Width"},"height":{"type":"integer","title":"Height"},"thumbnail_s3_key":{"type":"string","title":"Thumbnail S3 Key"},"annotation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Annotation"},"user_remark":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Remark"}},"type":"object","required":["id","s3_key","filename","content_type","size_bytes","width","height","thumbnail_s3_key"],"title":"ImageAttachment","description":"Image attachment metadata."},"ImplementationCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"spec_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Spec Text"},"prompt_plan_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt Plan Text"},"is_primary":{"type":"boolean","title":"Is Primary","default":false}},"type":"object","required":["name"],"title":"ImplementationCreate","description":"Schema for creating an implementation."},"ImplementationListItem":{"properties":{"id":{"type":"string","title":"Id"},"feature_id":{"type":"string","title":"Feature Id"},"name":{"type":"string","title":"Name"},"order_index":{"type":"integer","title":"Order Index"},"is_complete":{"type":"boolean","title":"Is Complete"},"is_primary":{"type":"boolean","title":"Is Primary"},"has_spec":{"type":"boolean","title":"Has Spec"},"has_prompt_plan":{"type":"boolean","title":"Has Prompt Plan"},"has_notes":{"type":"boolean","title":"Has Notes"},"is_generating_spec":{"type":"boolean","title":"Is Generating Spec","default":false},"is_generating_prompt_plan":{"type":"boolean","title":"Is Generating Prompt Plan","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"creator_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Creator Display Name"}},"type":"object","required":["id","feature_id","name","order_index","is_complete","is_primary","has_spec","has_prompt_plan","has_notes","created_at","updated_at"],"title":"ImplementationListItem","description":"Schema for implementation list item (lightweight)."},"ImplementationResponse":{"properties":{"id":{"type":"string","title":"Id"},"feature_id":{"type":"string","title":"Feature Id"},"name":{"type":"string","title":"Name"},"order_index":{"type":"integer","title":"Order Index"},"spec_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Spec Text"},"prompt_plan_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt Plan Text"},"implementation_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Implementation Notes"},"notes_updated_by_agent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Notes Updated By Agent"},"notes_updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Notes Updated At"},"is_complete":{"type":"boolean","title":"Is Complete"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"completed_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed By Id"},"completion_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completion Summary"},"is_primary":{"type":"boolean","title":"Is Primary"},"is_generating_spec":{"type":"boolean","title":"Is Generating Spec","default":false},"is_generating_prompt_plan":{"type":"boolean","title":"Is Generating Prompt Plan","default":false},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","feature_id","name","order_index","is_complete","is_primary","created_at","updated_at"],"title":"ImplementationResponse","description":"Schema for full implementation response."},"ImplementationSidebarData":{"properties":{"has_spec":{"type":"boolean","title":"Has Spec"},"has_prompt_plan":{"type":"boolean","title":"Has Prompt Plan"},"has_notes":{"type":"boolean","title":"Has Notes"},"is_complete":{"type":"boolean","title":"Is Complete"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"completion_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completion Summary"}},"type":"object","required":["has_spec","has_prompt_plan","has_notes","is_complete"],"title":"ImplementationSidebarData","description":"Sidebar data for a specific implementation."},"ImplementationUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"spec_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Spec Text"},"prompt_plan_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt Plan Text"},"implementation_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Implementation Notes"},"completion_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completion Summary"}},"type":"object","title":"ImplementationUpdate","description":"Schema for updating an implementation."},"IntegrationConfigCreate":{"properties":{"provider":{"type":"string","title":"Provider","description":"Provider name (github, jira, anthropic, openai, azure-openai, google-vertex, deepseek, aws-bedrock)"},"display_name":{"type":"string","title":"Display Name","description":"Display name for this integration (e.g., 'Production OpenAI')"},"config_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config Json","description":"Optional provider-specific configuration"},"token":{"type":"string","title":"Token","description":"Authentication token (will be encrypted)"},"visibility":{"$ref":"#/components/schemas/IntegrationVisibility","description":"Visibility level: 'org' (everyone) or 'private' (creator + shares)","default":"org"}},"type":"object","required":["provider","display_name","token"],"title":"IntegrationConfigCreate","description":"Schema for creating an integration config."},"IntegrationConfigResponse":{"properties":{"provider":{"type":"string","title":"Provider","description":"Provider name (github, jira, anthropic, openai, azure-openai, google-vertex, deepseek, aws-bedrock)"},"display_name":{"type":"string","title":"Display Name","description":"Display name for this integration (e.g., 'Production OpenAI')"},"config_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config Json","description":"Optional provider-specific configuration"},"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"visibility":{"$ref":"#/components/schemas/IntegrationVisibility"},"created_by_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By User Id"},"created_by":{"anyOf":[{"$ref":"#/components/schemas/app__schemas__project_share__UserSummary"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"share_count":{"type":"integer","title":"Share Count","default":0}},"type":"object","required":["provider","display_name","id","organization_id","visibility","created_at","updated_at"],"title":"IntegrationConfigResponse","description":"Schema for integration config response."},"IntegrationConfigShareCreate":{"properties":{"subject_type":{"$ref":"#/components/schemas/IntegrationShareSubjectType","description":"Type of subject: 'user' or 'group'"},"subject_id":{"type":"string","format":"uuid","title":"Subject Id","description":"UUID of the user or group to share with"}},"type":"object","required":["subject_type","subject_id"],"title":"IntegrationConfigShareCreate","description":"Schema for creating an integration config share."},"IntegrationConfigShareListResponse":{"properties":{"shares":{"items":{"$ref":"#/components/schemas/IntegrationConfigShareResponse"},"type":"array","title":"Shares"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["shares","total"],"title":"IntegrationConfigShareListResponse","description":"Response for listing integration config shares."},"IntegrationConfigShareResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"integration_config_id":{"type":"string","format":"uuid","title":"Integration Config Id"},"subject_type":{"$ref":"#/components/schemas/IntegrationShareSubjectType"},"subject_id":{"type":"string","format":"uuid","title":"Subject Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"created_by":{"anyOf":[{"$ref":"#/components/schemas/app__schemas__project_share__UserSummary"},{"type":"null"}]},"user":{"anyOf":[{"$ref":"#/components/schemas/app__schemas__project_share__UserSummary"},{"type":"null"}]},"group":{"anyOf":[{"$ref":"#/components/schemas/app__schemas__project_share__GroupSummary"},{"type":"null"}]}},"type":"object","required":["id","integration_config_id","subject_type","subject_id","created_at"],"title":"IntegrationConfigShareResponse","description":"Response for a single integration config share."},"IntegrationConfigUpdate":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name","description":"New display name"},"token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token","description":"New authentication token"},"config_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config Json","description":"Updated configuration"},"visibility":{"anyOf":[{"$ref":"#/components/schemas/IntegrationVisibility"},{"type":"null"}],"description":"New visibility level"}},"type":"object","title":"IntegrationConfigUpdate","description":"Schema for updating an integration config."},"IntegrationShareSubjectType":{"type":"string","enum":["user","group"],"title":"IntegrationShareSubjectType","description":"Type of subject in an integration config share."},"IntegrationTestRequest":{"properties":{"provider":{"type":"string","title":"Provider"},"token":{"type":"string","title":"Token"},"config_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config Json"}},"type":"object","required":["provider","token"],"title":"IntegrationTestRequest","description":"Schema for testing an integration config."},"IntegrationTestResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"response":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"IntegrationTestResponse","description":"Schema for integration test response."},"IntegrationVisibility":{"type":"string","enum":["org","private"],"title":"IntegrationVisibility","description":"Visibility level for integration configs."},"InvitationCreateRequest":{"properties":{"emails":{"items":{"type":"string"},"type":"array","maxItems":50,"minItems":1,"title":"Emails","description":"List of email addresses to invite"},"role":{"$ref":"#/components/schemas/OrgRole","description":"Role to assign when invitation is accepted","default":"member"},"group_ids":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Group Ids","description":"Optional group IDs to auto-assign on acceptance"}},"type":"object","required":["emails"],"title":"InvitationCreateRequest","description":"Schema for creating invitations."},"InvitationCreateResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/InvitationSendResult"},"type":"array","title":"Results"},"total":{"type":"integer","title":"Total"},"successful":{"type":"integer","title":"Successful"},"failed":{"type":"integer","title":"Failed"}},"type":"object","required":["results","total","successful","failed"],"title":"InvitationCreateResponse","description":"Response for batch invitation creation."},"InvitationListResponse":{"properties":{"invitations":{"items":{"$ref":"#/components/schemas/InvitationResponse"},"type":"array","title":"Invitations"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["invitations","total"],"title":"InvitationListResponse","description":"Response for listing invitations."},"InvitationResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"role":{"type":"string","title":"Role"},"status":{"type":"string","title":"Status"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"invited_by":{"anyOf":[{"$ref":"#/components/schemas/InvitedByUser"},{"type":"null"}]},"groups":{"items":{"$ref":"#/components/schemas/app__schemas__invitation__GroupSummary"},"type":"array","title":"Groups","default":[]}},"type":"object","required":["id","email","role","status","expires_at","created_at"],"title":"InvitationResponse","description":"Schema for invitation in list response."},"InvitationSendResult":{"properties":{"email":{"type":"string","title":"Email"},"success":{"type":"boolean","title":"Success"},"invitation_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Invitation Id"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"email_sent":{"type":"boolean","title":"Email Sent","default":false}},"type":"object","required":["email","success"],"title":"InvitationSendResult","description":"Result for a single invitation creation attempt."},"InviteAcceptRequest":{"properties":{},"type":"object","title":"InviteAcceptRequest","description":"Request body for POST /invites/{token}/accept (currently empty, extensible)."},"InviteAcceptResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"org":{"$ref":"#/components/schemas/OrgSummary"},"role":{"type":"string","title":"Role"},"groups_added":{"items":{"type":"string"},"type":"array","title":"Groups Added","default":[]},"email_mismatch":{"type":"boolean","title":"Email Mismatch","default":false}},"type":"object","required":["success","org","role"],"title":"InviteAcceptResponse","description":"Response for successful invitation acceptance."},"InviteValidationResponse":{"properties":{"valid":{"type":"boolean","title":"Valid"},"org":{"anyOf":[{"$ref":"#/components/schemas/OrgSummary"},{"type":"null"}]},"invited_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Invited Email"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"user_exists":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"User Exists"}},"type":"object","required":["valid"],"title":"InviteValidationResponse","description":"Response for GET /invites/{token} - public invite preview."},"InvitedByUser":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"}},"type":"object","required":["id","email"],"title":"InvitedByUser","description":"Schema for the user who sent the invitation."},"IssueSearchRequest":{"properties":{"connector_id":{"type":"string","title":"Connector Id"},"provider":{"type":"string","title":"Provider"},"query":{"type":"string","title":"Query","default":""},"repo_or_project":{"type":"string","title":"Repo Or Project"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"}},"type":"object","required":["connector_id","provider","repo_or_project"],"title":"IssueSearchRequest","description":"Schema for searching external issues."},"IssueSearchResponse":{"properties":{"issues":{"items":{"$ref":"#/components/schemas/IssueSearchResult"},"type":"array","title":"Issues"}},"type":"object","required":["issues"],"title":"IssueSearchResponse","description":"Schema for search results response."},"IssueSearchResult":{"properties":{"external_id":{"type":"string","title":"External Id"},"title":{"type":"string","title":"Title"},"state":{"type":"string","title":"State"},"labels":{"items":{"type":"string"},"type":"array","title":"Labels","default":[]},"author":{"type":"string","title":"Author"},"created_at":{"type":"string","title":"Created At"},"url":{"type":"string","title":"Url"},"body":{"type":"string","title":"Body","default":""}},"type":"object","required":["external_id","title","state","author","created_at","url"],"title":"IssueSearchResult","description":"Schema for a single search result from external system."},"JSONRPCRequest":{"properties":{"jsonrpc":{"type":"string","title":"Jsonrpc","description":"JSON-RPC version","default":"2.0"},"id":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Id","description":"Request ID"},"method":{"type":"string","title":"Method","description":"Method name (e.g., 'tools/call')"},"params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Params","description":"Method parameters"}},"type":"object","required":["method"],"title":"JSONRPCRequest","description":"JSON-RPC 2.0 request."},"JiraProject":{"properties":{"key":{"type":"string","title":"Key"},"name":{"type":"string","title":"Name"},"id":{"type":"string","title":"Id"}},"type":"object","required":["key","name","id"],"title":"JiraProject","description":"Schema for Jira project info."},"JiraProjectsResponse":{"properties":{"projects":{"items":{"$ref":"#/components/schemas/JiraProject"},"type":"array","title":"Projects"}},"type":"object","required":["projects"],"title":"JiraProjectsResponse","description":"Schema for Jira projects list response."},"JobListResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"org_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Org Id"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"},"job_type":{"$ref":"#/components/schemas/JobType"},"status":{"$ref":"#/components/schemas/JobStatus"},"payload":{"additionalProperties":true,"type":"object","title":"Payload"},"result":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Result"},"error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Message"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"},"model_used":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Used"},"total_prompt_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Prompt Tokens"},"total_completion_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Completion Tokens"},"total_cost_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Cost Usd"},"project_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Name"},"triggered_by_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Triggered By User Id"}},"type":"object","required":["id","org_id","project_id","job_type","status","payload","result","error_message","created_at","started_at","finished_at"],"title":"JobListResponse","description":"Schema for job list items."},"JobStatus":{"type":"string","enum":["queued","running","succeeded","failed","cancelled"],"title":"JobStatus","description":"Enumeration of job statuses."},"JobType":{"type":"string","enum":["module_feature_generate","brainstorm_generate","brainstorm_conversation_generate","brainstorm_conversation_batch_generate","brainstorm_spec_generate","brainstorm_prompt_plan_generate","bug_sync","phase_analysis","archive_export","notification_fanout","mention_notification","grounding_update","grounding_summarize","grounding_branch_summarize","grounding_merge","grounding_pull","feature_content_generate","collab_thread_decision_summarize","collab_thread_ai_mention","user_initiated_question_generate","project_chat_respond","pre_phase_discussion_respond","project_chat_mention_notification","image_annotate","code_explorer_explore","code_explorer_grounding_generate","web_search_execute","slack_ai_mention","slack_code_explore","slack_web_search","slack_create_feature_extract"],"title":"JobType","description":"Enumeration of job types in the system."},"JobWithCallLogs":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"job_type":{"type":"string","title":"Job Type"},"status":{"type":"string","title":"Status"},"model_used":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model Used"},"total_prompt_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Prompt Tokens"},"total_completion_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Completion Tokens"},"total_cost_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Cost Usd"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"},"project_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Name"},"triggered_by_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Triggered By User Id"},"triggered_by_user_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Triggered By User Email"},"triggered_by_user_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Triggered By User Display Name"},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Seconds"},"call_logs":{"items":{"$ref":"#/components/schemas/LLMCallLogSummary"},"type":"array","title":"Call Logs"},"call_count":{"type":"integer","title":"Call Count"}},"type":"object","required":["id","job_type","status","model_used","total_prompt_tokens","total_completion_tokens","total_cost_usd","created_at","started_at","finished_at","project_id","project_name","duration_seconds","call_logs","call_count"],"title":"JobWithCallLogs","description":"Job summary with its call logs for Agent Log page."},"LLMCallLogDetail":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"job_id":{"type":"string","format":"uuid","title":"Job Id"},"agent_name":{"type":"string","title":"Agent Name"},"agent_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Display Name"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"},"project_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Name"},"feature_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Feature Id"},"feature_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feature Name"},"request_messages":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Request Messages"},"request_model":{"type":"string","title":"Request Model"},"request_temperature":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Request Temperature"},"request_max_tokens":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Request Max Tokens"},"response_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Content"},"response_finish_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Response Finish Reason"},"response_tool_calls":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Response Tool Calls"},"prompt_tokens":{"type":"integer","title":"Prompt Tokens"},"completion_tokens":{"type":"integer","title":"Completion Tokens"},"cost_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost Usd"},"duration_ms":{"type":"integer","title":"Duration Ms"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"finished_at":{"type":"string","format":"date-time","title":"Finished At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","job_id","agent_name","agent_display_name","request_messages","request_model","request_temperature","request_max_tokens","response_content","response_finish_reason","response_tool_calls","prompt_tokens","completion_tokens","cost_usd","duration_ms","started_at","finished_at","created_at"],"title":"LLMCallLogDetail","description":"Full detail view including request/response."},"LLMCallLogSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"agent_name":{"type":"string","title":"Agent Name"},"agent_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Display Name"},"request_model":{"type":"string","title":"Request Model"},"prompt_tokens":{"type":"integer","title":"Prompt Tokens"},"completion_tokens":{"type":"integer","title":"Completion Tokens"},"cost_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost Usd"},"duration_ms":{"type":"integer","title":"Duration Ms"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"finished_at":{"type":"string","format":"date-time","title":"Finished At"}},"type":"object","required":["id","agent_name","agent_display_name","request_model","prompt_tokens","completion_tokens","cost_usd","duration_ms","started_at","finished_at"],"title":"LLMCallLogSummary","description":"Summary view for list display (excludes full request/response)."},"LLMPreferenceResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"organization_id":{"type":"string","format":"uuid","title":"Organization Id"},"main_llm_config_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Main Llm Config Id"},"lightweight_llm_config_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Lightweight Llm Config Id"},"mock_discovery_enabled":{"type":"boolean","title":"Mock Discovery Enabled","default":false},"mock_discovery_question_limit":{"type":"integer","title":"Mock Discovery Question Limit","default":10},"mock_discovery_delay_seconds":{"type":"integer","title":"Mock Discovery Delay Seconds","default":5},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","organization_id","main_llm_config_id","lightweight_llm_config_id","created_at","updated_at"],"title":"LLMPreferenceResponse","description":"Schema for LLM preference response."},"LLMPreferenceUpdate":{"properties":{"main_llm_config_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Main Llm Config Id"},"lightweight_llm_config_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Lightweight Llm Config Id"},"mock_discovery_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Mock Discovery Enabled"},"mock_discovery_question_limit":{"anyOf":[{"type":"integer","enum":[10,20,30]},{"type":"null"}],"title":"Mock Discovery Question Limit"},"mock_discovery_delay_seconds":{"anyOf":[{"type":"integer","enum":[5,10,20]},{"type":"null"}],"title":"Mock Discovery Delay Seconds"}},"type":"object","title":"LLMPreferenceUpdate","description":"Schema for updating LLM preferences."},"LLMUsageDetailsResponse":{"properties":{"year":{"type":"integer","title":"Year"},"month":{"type":"integer","title":"Month"},"total_usage":{"$ref":"#/components/schemas/MonthlyLLMUsage"},"by_agent":{"items":{"$ref":"#/components/schemas/AgentUsage"},"type":"array","title":"By Agent"}},"type":"object","required":["year","month","total_usage","by_agent"],"title":"LLMUsageDetailsResponse","description":"Detailed LLM usage for a specific month."},"LoadFakeUsersResponse":{"properties":{"message":{"type":"string","title":"Message"},"users_created":{"type":"integer","title":"Users Created"}},"type":"object","required":["message","users_created"],"title":"LoadFakeUsersResponse"},"LoadSampleProjectRequest":{"properties":{"sample_type":{"type":"string","title":"Sample Type","description":"Sample project type, e.g., 'flappy_mcvibe'"}},"type":"object","required":["sample_type"],"title":"LoadSampleProjectRequest","description":"Schema for loading a sample project."},"MCPCallLogDetail":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"api_key_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Api Key Id"},"api_key_name":{"type":"string","title":"Api Key Name"},"org_id":{"type":"string","format":"uuid","title":"Org Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"project_name":{"type":"string","title":"Project Name"},"tool_name":{"type":"string","title":"Tool Name"},"jsonrpc_method":{"type":"string","title":"Jsonrpc Method"},"coding_agent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coding Agent Name"},"request_params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Request Params"},"response_result":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Response Result"},"response_error":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Response Error"},"is_error":{"type":"boolean","title":"Is Error"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"finished_at":{"type":"string","format":"date-time","title":"Finished At"},"duration_ms":{"type":"integer","title":"Duration Ms"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","user_id","api_key_id","api_key_name","org_id","project_id","project_name","tool_name","jsonrpc_method","coding_agent_name","request_params","response_result","response_error","is_error","started_at","finished_at","duration_ms","created_at"],"title":"MCPCallLogDetail","description":"Full detail view including request/response."},"MCPCallLogSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"tool_name":{"type":"string","title":"Tool Name"},"jsonrpc_method":{"type":"string","title":"Jsonrpc Method"},"api_key_name":{"type":"string","title":"Api Key Name"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"project_name":{"type":"string","title":"Project Name"},"coding_agent_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Coding Agent Name"},"is_error":{"type":"boolean","title":"Is Error"},"duration_ms":{"type":"integer","title":"Duration Ms"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"finished_at":{"type":"string","format":"date-time","title":"Finished At"}},"type":"object","required":["id","tool_name","jsonrpc_method","api_key_name","project_id","project_name","coding_agent_name","is_error","duration_ms","started_at","finished_at"],"title":"MCPCallLogSummary","description":"Summary view for list display (excludes full request/response)."},"MCPConnectionConfig":{"properties":{"mcp_url":{"type":"string","title":"Mcp Url","description":"Full MCP server URL (e.g., http://localhost:8086/api/v1/projects/{id}/mcp)"},"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Project UUID"},"project_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Key","description":"Human-readable project key (e.g., 'APP:checkout')"},"instructions":{"type":"string","title":"Instructions","description":"Setup instructions","default":"Create an API key in Settings > API Keys to authenticate. Use the API key as a Bearer token in the Authorization header."}},"type":"object","required":["mcp_url","project_id"],"title":"MCPConnectionConfig","description":"MCP connection configuration for a project.\n\nThis schema provides all the information needed to configure an MCP client\nto connect to MFBT for a specific project."},"MCPImageUploadError":{"properties":{"error":{"type":"string","title":"Error"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"}},"type":"object","required":["error"],"title":"MCPImageUploadError","description":"Error response from MCP image upload."},"MCPImageUploadResponse":{"properties":{"image_id":{"type":"string","title":"Image Id"},"size_bytes":{"type":"integer","title":"Size Bytes"},"content_type":{"type":"string","title":"Content Type"},"expires_in_hours":{"type":"integer","title":"Expires In Hours"}},"type":"object","required":["image_id","size_bytes","content_type","expires_in_hours"],"title":"MCPImageUploadResponse","description":"Response from MCP image upload."},"MCPLogListResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/MCPCallLogSummary"},"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":"MCPLogListResponse","description":"Response for listing MCP logs."},"MCQAnswerContext":{"properties":{"question_text":{"type":"string","title":"Question Text"},"question_message_id":{"type":"string","title":"Question Message Id"},"choices":{"items":{"$ref":"#/components/schemas/MCQOption"},"type":"array","title":"Choices"},"selected_option_id":{"type":"string","title":"Selected Option Id"},"selected_option_text":{"type":"string","title":"Selected Option Text"}},"type":"object","required":["question_text","question_message_id","choices","selected_option_id","selected_option_text"],"title":"MCQAnswerContext","description":"MCQ answer context stored with user messages when answering an MCQ."},"MCQChoiceSchema":{"properties":{"id":{"type":"string","title":"Id"},"label":{"type":"string","title":"Label"}},"type":"object","required":["id","label"],"title":"MCQChoiceSchema","description":"Schema for an MCQ choice."},"MCQOption":{"properties":{"id":{"type":"string","title":"Id"},"text":{"type":"string","title":"Text"}},"type":"object","required":["id","text"],"title":"MCQOption","description":"Schema for an MCQ option in bot responses."},"MCQSchema":{"properties":{"question_text":{"type":"string","title":"Question Text"},"choices":{"items":{"$ref":"#/components/schemas/MCQChoiceSchema"},"type":"array","title":"Choices"},"explanation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Explanation"}},"type":"object","required":["question_text","choices"],"title":"MCQSchema","description":"Schema for an MCQ."},"MergeJobResponse":{"properties":{"job_id":{"type":"string","title":"Job Id"},"status":{"type":"string","title":"Status"}},"type":"object","required":["job_id","status"],"title":"MergeJobResponse","description":"Response schema for merge job creation."},"ModuleArchiveResponse":{"properties":{"id":{"type":"string","title":"Id"},"project_id":{"type":"string","title":"Project Id"},"title":{"type":"string","title":"Title"},"archived_at":{"type":"string","format":"date-time","title":"Archived At"},"archived_features_count":{"type":"integer","title":"Archived Features Count"}},"type":"object","required":["id","project_id","title","archived_at","archived_features_count"],"title":"ModuleArchiveResponse","description":"Response schema for archive module with cascade info."},"ModuleCreate":{"properties":{"title":{"type":"string","maxLength":255,"minLength":1,"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"provenance":{"$ref":"#/components/schemas/ModuleProvenance","default":"user"},"module_type":{"$ref":"#/components/schemas/ModuleType","default":"implementation"},"brainstorming_phase_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brainstorming Phase Id"}},"type":"object","required":["title"],"title":"ModuleCreate","description":"Schema for creating a module."},"ModuleListResponse":{"properties":{"id":{"type":"string","title":"Id"},"project_id":{"type":"string","title":"Project Id"},"brainstorming_phase_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brainstorming Phase Id"},"source_phase_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Phase Name"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"provenance":{"$ref":"#/components/schemas/ModuleProvenance"},"module_type":{"$ref":"#/components/schemas/ModuleType"},"order_index":{"type":"integer","title":"Order Index"},"module_key":{"type":"string","title":"Module Key"},"module_key_number":{"type":"integer","title":"Module Key Number"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At"},"short_id":{"type":"string","title":"Short Id"},"url_identifier":{"type":"string","title":"Url Identifier"}},"type":"object","required":["id","project_id","title","provenance","module_type","order_index","module_key","module_key_number","created_at","short_id","url_identifier"],"title":"ModuleListResponse","description":"Schema for module list item."},"ModuleProgressResponse":{"properties":{"module_id":{"type":"string","title":"Module Id"},"module_key":{"type":"string","title":"Module Key"},"title":{"type":"string","title":"Title"},"total_features":{"type":"integer","title":"Total Features","default":0},"completed_features":{"type":"integer","title":"Completed Features","default":0},"pending_features":{"type":"integer","title":"Pending Features","default":0},"in_progress_features":{"type":"integer","title":"In Progress Features","default":0},"progress_percent":{"type":"number","title":"Progress Percent","default":0.0},"next_feature":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Feature"}},"type":"object","required":["module_id","module_key","title"],"title":"ModuleProgressResponse","description":"Progress stats for a single module."},"ModuleProvenance":{"type":"string","enum":["system","user"],"title":"ModuleProvenance","description":"How the module was created."},"ModuleType":{"type":"string","enum":["conversation","implementation"],"title":"ModuleType","description":"Purpose of the module."},"ModuleUpdate":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"ModuleUpdate","description":"Schema for updating a module."},"ModulesFeaturesResponse":{"properties":{"modules":{"items":{"$ref":"#/components/schemas/app__routers__agent_api__ModuleResponse"},"type":"array","title":"Modules"}},"type":"object","required":["modules"],"title":"ModulesFeaturesResponse","description":"Response for modules-features endpoint."},"MonthlyLLMUsage":{"properties":{"total_prompt_tokens":{"type":"integer","title":"Total Prompt Tokens"},"total_completion_tokens":{"type":"integer","title":"Total Completion Tokens"},"total_tokens":{"type":"integer","title":"Total Tokens"},"total_cost_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Cost Usd"}},"type":"object","required":["total_prompt_tokens","total_completion_tokens","total_tokens","total_cost_usd"],"title":"MonthlyLLMUsage","description":"LLM usage metrics for a month."},"MyProjectRoleResponse":{"properties":{"role":{"$ref":"#/components/schemas/ProjectRole"},"is_owner":{"type":"boolean","title":"Is Owner"},"is_admin":{"type":"boolean","title":"Is Admin"},"is_member":{"type":"boolean","title":"Is Member"},"is_viewer":{"type":"boolean","title":"Is Viewer"}},"type":"object","required":["role","is_owner","is_admin","is_member","is_viewer"],"title":"MyProjectRoleResponse","description":"Schema for current user's project role response."},"OAuthConsentRequest":{"properties":{"client_id":{"type":"string","title":"Client Id"},"redirect_uri":{"type":"string","title":"Redirect Uri"},"code_challenge":{"type":"string","title":"Code Challenge"},"code_challenge_method":{"type":"string","title":"Code Challenge Method","default":"S256"},"resource":{"type":"string","title":"Resource"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"scope":{"type":"string","title":"Scope","default":"mcp:read mcp:write"},"approved":{"type":"boolean","title":"Approved"}},"type":"object","required":["client_id","redirect_uri","code_challenge","resource","approved"],"title":"OAuthConsentRequest","description":"Request body for user consent."},"OAuthConsentResponse":{"properties":{"redirect_url":{"type":"string","title":"Redirect Url"}},"type":"object","required":["redirect_url"],"title":"OAuthConsentResponse","description":"Response for consent endpoint."},"OAuthProviderInfo":{"properties":{"slug":{"type":"string","title":"Slug","description":"Provider identifier (e.g., 'google', 'github')"},"name":{"type":"string","title":"Name","description":"Display name for the provider"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon","description":"Icon identifier for UI rendering"}},"type":"object","required":["slug","name"],"title":"OAuthProviderInfo","description":"Public information about an OAuth provider.\n\nUsed for the GET /auth/providers endpoint to list available\nauthentication options."},"OrgEfficiencyResponse":{"properties":{"time_range":{"$ref":"#/components/schemas/TimeRange","description":"The time range used for the query"},"start_date":{"type":"string","format":"date","title":"Start Date","description":"Start date of the query range"},"end_date":{"type":"string","format":"date","title":"End Date","description":"End date of the query range"},"organizations":{"items":{"$ref":"#/components/schemas/OrganizationEfficiency"},"type":"array","title":"Organizations","description":"List of organizations with efficiency metrics"}},"type":"object","required":["time_range","start_date","end_date","organizations"],"title":"OrgEfficiencyResponse","description":"Response model for organization efficiency overview."},"OrgMemberResponse":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id","description":"User ID"},"email":{"type":"string","title":"Email","description":"User email address"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name","description":"User display name"},"role":{"type":"string","title":"Role","description":"Role in organization (owner, admin, member, viewer)"},"joined_at":{"type":"string","format":"date-time","title":"Joined At","description":"When user joined organization"}},"type":"object","required":["user_id","email","role","joined_at"],"title":"OrgMemberResponse","description":"Schema for organization member in list response."},"OrgMemberRoleUpdateRequest":{"properties":{"role":{"type":"string","pattern":"^(viewer|member|admin|owner)$","title":"Role","description":"New role to assign (viewer, member, admin, owner)"}},"type":"object","required":["role"],"title":"OrgMemberRoleUpdateRequest","description":"Schema for updating an organization member's role."},"OrgPlanInfo":{"properties":{"org_id":{"type":"string","format":"uuid","title":"Org Id"},"org_name":{"type":"string","title":"Org Name"},"org_created_at":{"type":"string","format":"date-time","title":"Org Created At"},"plan_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Name"},"plan_llm_tokens_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Plan Llm Tokens Total"},"plan_llm_tokens_per_month":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Plan Llm Tokens Per Month"},"plan_llm_tokens_used":{"type":"integer","title":"Plan Llm Tokens Used"},"plan_max_projects":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Plan Max Projects"},"plan_max_users":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Plan Max Users"},"plan_start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Plan Start Date"},"plan_end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Plan End Date"},"plan_billing_cycle_start":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Plan Billing Cycle Start"},"current_project_count":{"type":"integer","title":"Current Project Count"},"current_user_count":{"type":"integer","title":"Current User Count"},"cost_this_month_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost This Month Usd"}},"type":"object","required":["org_id","org_name","org_created_at","plan_name","plan_llm_tokens_total","plan_llm_tokens_per_month","plan_llm_tokens_used","plan_max_projects","plan_max_users","plan_start_date","plan_end_date","plan_billing_cycle_start","current_project_count","current_user_count","cost_this_month_usd"],"title":"OrgPlanInfo","description":"Organization plan details."},"OrgProjectChatListItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"chat_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chat Title"},"proposed_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposed Title"},"proposed_project_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposed Project Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"created_project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created Project Id"},"message_count":{"type":"integer","title":"Message Count","default":0},"short_id":{"type":"string","title":"Short Id"},"url_identifier":{"type":"string","title":"Url Identifier"}},"type":"object","required":["id","created_at","updated_at","short_id","url_identifier"],"title":"OrgProjectChatListItem","description":"Summary schema for org-scoped project chat list (sidebar)."},"OrgProjectChatListResponse":{"properties":{"project_chats":{"items":{"$ref":"#/components/schemas/OrgProjectChatListItem"},"type":"array","title":"Project Chats"},"total":{"type":"integer","title":"Total"},"has_more":{"type":"boolean","title":"Has More"}},"type":"object","required":["project_chats","total","has_more"],"title":"OrgProjectChatListResponse","description":"Paginated list response for org-scoped project chats."},"OrgResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Unique organization identifier"},"name":{"type":"string","title":"Name","description":"Organization name"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Timestamp when the organization was created"},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"Timestamp when the organization was last updated"}},"type":"object","required":["id","name","created_at","updated_at"],"title":"OrgResponse","description":"Schema for organization response."},"OrgRole":{"type":"string","enum":["owner","admin","member","viewer"],"title":"OrgRole","description":"Organization membership roles with hierarchical permissions."},"OrgShareSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"member_count":{"type":"integer","title":"Member Count","default":0}},"type":"object","required":["id","name"],"title":"OrgShareSummary","description":"Summary of an organization for share response."},"OrgSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"OrgSummary","description":"Summary of organization for invitation preview."},"OrgUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name","description":"New organization name"}},"type":"object","title":"OrgUpdateRequest","description":"Schema for updating organization details."},"OrganizationEfficiency":{"properties":{"org_id":{"type":"string","format":"uuid","title":"Org Id","description":"Organization's unique identifier"},"org_name":{"type":"string","title":"Org Name","description":"Organization's name"},"efficiency":{"$ref":"#/components/schemas/EfficiencyScore","description":"Efficiency score and metrics"},"users":{"items":{"$ref":"#/components/schemas/UserEfficiencyEntry"},"type":"array","title":"Users","description":"Top users by usage"},"projects":{"items":{"$ref":"#/components/schemas/ProjectEfficiencyEntry"},"type":"array","title":"Projects","description":"Top projects by usage"}},"type":"object","required":["org_id","org_name","efficiency"],"title":"OrganizationEfficiency","description":"Efficiency metrics for a single organization."},"OwnerInfo":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"}},"type":"object","required":["id","email"],"title":"OwnerInfo","description":"Schema for project owner information."},"PaginatedFeaturesResponse":{"properties":{"items":{"items":{"$ref":"#/components/schemas/FeatureListResponse"},"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":"PaginatedFeaturesResponse","description":"Paginated response for features list."},"PhaseContainerCreate":{"properties":{"title":{"type":"string","maxLength":500,"minLength":1,"title":"Title"},"order_index":{"type":"integer","minimum":0.0,"title":"Order Index","default":0}},"type":"object","required":["title"],"title":"PhaseContainerCreate","description":"Schema for creating a phase container."},"PhaseContainerListResponse":{"properties":{"id":{"type":"string","title":"Id"},"project_id":{"type":"string","title":"Project Id"},"title":{"type":"string","title":"Title"},"short_id":{"type":"string","title":"Short Id"},"url_identifier":{"type":"string","title":"Url Identifier"},"order_index":{"type":"integer","title":"Order Index"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","project_id","title","short_id","url_identifier","order_index","created_at"],"title":"PhaseContainerListResponse","description":"Schema for phase container list item."},"PhaseContainerResponse":{"properties":{"id":{"type":"string","title":"Id"},"project_id":{"type":"string","title":"Project Id"},"title":{"type":"string","title":"Title"},"short_id":{"type":"string","title":"Short Id"},"url_identifier":{"type":"string","title":"Url Identifier"},"order_index":{"type":"integer","title":"Order Index"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At"},"archived_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Archived By Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","project_id","title","short_id","url_identifier","order_index","created_at","updated_at"],"title":"PhaseContainerResponse","description":"Schema for phase container response."},"PhaseContainerUpdate":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"null"}],"title":"Title"},"order_index":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Order Index"}},"type":"object","title":"PhaseContainerUpdate","description":"Schema for updating a phase container."},"PhaseImplementationProgressResponse":{"properties":{"phase_id":{"type":"string","title":"Phase Id"},"total_features":{"type":"integer","title":"Total Features","default":0},"completed_features":{"type":"integer","title":"Completed Features","default":0},"pending_features":{"type":"integer","title":"Pending Features","default":0},"in_progress_features":{"type":"integer","title":"In Progress Features","default":0},"progress_percent":{"type":"number","title":"Progress Percent","default":0.0},"next_feature":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Feature"},"modules":{"items":{"$ref":"#/components/schemas/ModuleProgressResponse"},"type":"array","title":"Modules","default":[]}},"type":"object","required":["phase_id"],"title":"PhaseImplementationProgressResponse","description":"Aggregate implementation progress for a phase."},"PlanEfficiencyResponse":{"properties":{"org_id":{"type":"string","format":"uuid","title":"Org Id","description":"Organization's unique identifier"},"org_name":{"type":"string","title":"Org Name","description":"Organization's name"},"plan_type":{"$ref":"#/components/schemas/PlanType","description":"Type of plan (monthly, lifetime, unlimited)"},"efficiency_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Efficiency Percent","description":"Usage efficiency as percentage of plan limit (None for unlimited plans)"},"tokens_used":{"type":"integer","title":"Tokens Used","description":"Total tokens consumed in the period"},"tokens_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tokens Limit","description":"Plan token limit (None for unlimited)"},"tokens_remaining":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Tokens Remaining","description":"Tokens remaining in plan (None for unlimited)"},"is_over_limit":{"type":"boolean","title":"Is Over Limit","description":"Whether usage exceeds the plan limit","default":false},"period_start":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Period Start","description":"Start of current billing/tracking period"},"period_end":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Period End","description":"End of current billing/tracking period"},"credits_used":{"type":"number","title":"Credits Used","description":"Credits consumed (tokens / 100k)"},"credits_limit":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Credits Limit","description":"Plan limit in credits (None for unlimited)"}},"type":"object","required":["org_id","org_name","plan_type","tokens_used","credits_used"],"title":"PlanEfficiencyResponse","description":"Response model for organization plan efficiency calculation."},"PlanInfo":{"properties":{"plan_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plan Name"},"plan_llm_tokens_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Plan Llm Tokens Total"},"plan_llm_tokens_per_month":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Plan Llm Tokens Per Month"},"plan_llm_tokens_used":{"type":"integer","title":"Plan Llm Tokens Used"},"plan_max_projects":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Plan Max Projects"},"plan_max_users":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Plan Max Users"},"plan_start_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Plan Start Date"},"plan_end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Plan End Date"},"current_project_count":{"type":"integer","title":"Current Project Count"},"current_user_count":{"type":"integer","title":"Current User Count"}},"type":"object","required":["plan_name","plan_llm_tokens_total","plan_llm_tokens_per_month","plan_llm_tokens_used","plan_max_projects","plan_max_users","plan_start_date","plan_end_date","current_project_count","current_user_count"],"title":"PlanInfo","description":"Organization plan and trial information."},"PlanRecommendationResponse":{"properties":{"action":{"$ref":"#/components/schemas/RecommendationAction","description":"Recommended action"},"reason":{"type":"string","title":"Reason","description":"Human-readable explanation"},"consecutive_days":{"type":"integer","title":"Consecutive Days","description":"Days of consecutive pattern"},"avg_efficiency_percent":{"type":"number","title":"Avg Efficiency Percent","description":"Average efficiency percentage"},"streak_start_date":{"type":"string","format":"date","title":"Streak Start Date","description":"Start of the streak"},"streak_end_date":{"type":"string","format":"date","title":"Streak End Date","description":"End of the streak"},"tokens_allocated_at_recommendation":{"type":"integer","title":"Tokens Allocated At Recommendation","description":"Token allocation when recommendation was made"},"avg_daily_tokens_used":{"type":"integer","title":"Avg Daily Tokens Used","description":"Average daily token usage"},"recommended_allocation":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Recommended Allocation","description":"Suggested new allocation"},"savings_or_increase_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Savings Or Increase Percent","description":"Estimated savings/increase percentage"},"id":{"type":"string","format":"uuid","title":"Id","description":"Recommendation ID"},"org_id":{"type":"string","format":"uuid","title":"Org Id","description":"Organization ID"},"status":{"$ref":"#/components/schemas/RecommendationStatus","description":"Current status"},"dismissed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Dismissed At","description":"When dismissed"},"dismissed_by_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Dismissed By User Id","description":"User who dismissed"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When created"},"updated_at":{"type":"string","format":"date-time","title":"Updated At","description":"When last updated"}},"type":"object","required":["action","reason","consecutive_days","avg_efficiency_percent","streak_start_date","streak_end_date","tokens_allocated_at_recommendation","avg_daily_tokens_used","id","org_id","status","created_at","updated_at"],"title":"PlanRecommendationResponse","description":"Response schema for a plan recommendation."},"PlanType":{"type":"string","enum":["monthly","lifetime","unlimited"],"title":"PlanType","description":"Type of subscription plan based on token allocation."},"PlatformAdminCheckResponse":{"properties":{"is_admin":{"type":"boolean","title":"Is Admin"}},"type":"object","required":["is_admin"],"title":"PlatformAdminCheckResponse","description":"Schema for platform admin check response."},"PlatformConnectorCreate":{"properties":{"connector_type":{"type":"string","enum":["llm","email","object_storage","code_explorer","web_search"],"title":"Connector Type","description":"Type of connector (llm, email, object_storage)"},"provider":{"type":"string","title":"Provider","description":"Provider name (anthropic, openai, sendgrid, aws-s3, etc.)"},"display_name":{"type":"string","title":"Display Name","description":"Human-readable name for this connector"},"config_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config Json","description":"Provider-specific configuration (model, region, from_email, etc.)"},"credentials":{"type":"string","title":"Credentials","description":"API key or credentials (will be encrypted)"}},"type":"object","required":["connector_type","provider","display_name","credentials"],"title":"PlatformConnectorCreate","description":"Schema for creating a platform connector."},"PlatformConnectorResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"connector_type":{"type":"string","title":"Connector Type"},"provider":{"type":"string","title":"Provider"},"display_name":{"type":"string","title":"Display Name"},"config_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config Json"},"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","connector_type","provider","display_name","config_json","is_active","created_at","updated_at"],"title":"PlatformConnectorResponse","description":"Schema for platform connector response."},"PlatformConnectorTest":{"properties":{"connector_type":{"type":"string","enum":["llm","email","object_storage","code_explorer","web_search"],"title":"Connector Type","description":"Type of connector"},"provider":{"type":"string","title":"Provider","description":"Provider name"},"credentials":{"type":"string","title":"Credentials","description":"API key or credentials to test"},"config_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config Json","description":"Provider-specific configuration"}},"type":"object","required":["connector_type","provider","credentials"],"title":"PlatformConnectorTest","description":"Schema for testing a connector before creating."},"PlatformConnectorTestResult":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","message"],"title":"PlatformConnectorTestResult","description":"Schema for connector test result."},"PlatformConnectorUpdate":{"properties":{"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name","description":"New display name"},"credentials":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Credentials","description":"New credentials (will be encrypted)"},"config_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config Json","description":"Updated configuration"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active","description":"Active status"}},"type":"object","title":"PlatformConnectorUpdate","description":"Schema for updating a platform connector."},"PlatformProjectListResponse":{"properties":{"projects":{"items":{"$ref":"#/components/schemas/PlatformProjectSummary"},"type":"array","title":"Projects"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["projects","total"],"title":"PlatformProjectListResponse","description":"Response for listing platform projects."},"PlatformProjectSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"org_id":{"type":"string","format":"uuid","title":"Org Id"},"org_name":{"type":"string","title":"Org Name"},"status":{"type":"string","title":"Status"}},"type":"object","required":["id","name","org_id","org_name","status"],"title":"PlatformProjectSummary","description":"Summary info for a project (platform admin view)."},"PlatformSettingsResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"main_llm_connector_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Main Llm Connector Id"},"lightweight_llm_connector_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Lightweight Llm Connector Id"},"email_connector_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Email Connector Id"},"object_storage_connector_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Object Storage Connector Id"},"code_explorer_connector_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Code Explorer Connector Id"},"code_explorer_enabled":{"type":"boolean","title":"Code Explorer Enabled"},"web_search_connector_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Web Search Connector Id"},"web_search_enabled":{"type":"boolean","title":"Web Search Enabled"},"base_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Url"},"mock_discovery_enabled":{"type":"boolean","title":"Mock Discovery Enabled"},"mock_discovery_question_limit":{"type":"integer","title":"Mock Discovery Question Limit"},"mock_discovery_delay_seconds":{"type":"integer","title":"Mock Discovery Delay Seconds"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","main_llm_connector_id","lightweight_llm_connector_id","email_connector_id","object_storage_connector_id","code_explorer_connector_id","code_explorer_enabled","web_search_connector_id","web_search_enabled","base_url","mock_discovery_enabled","mock_discovery_question_limit","mock_discovery_delay_seconds","created_at","updated_at"],"title":"PlatformSettingsResponse","description":"Schema for platform settings response."},"PlatformSettingsUpdate":{"properties":{"main_llm_connector_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Main Llm Connector Id","description":"ID of main (heavy) LLM connector"},"lightweight_llm_connector_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Lightweight Llm Connector Id","description":"ID of lightweight LLM connector"},"email_connector_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Email Connector Id","description":"ID of email connector (Sendgrid)"},"object_storage_connector_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Object Storage Connector Id","description":"ID of object storage connector (S3)"},"code_explorer_connector_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Code Explorer Connector Id","description":"ID of code explorer connector (Anthropic API for Claude Code)"},"code_explorer_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Code Explorer Enabled","description":"Enable code explorer feature"},"base_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Url","description":"Base URL for the platform (e.g., https://mfbt.example.com)"},"mock_discovery_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Mock Discovery Enabled","description":"Enable mock discovery mode"},"mock_discovery_question_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mock Discovery Question Limit","description":"Question limit for mock discovery"},"mock_discovery_delay_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Mock Discovery Delay Seconds","description":"Delay in seconds for mock discovery"},"clear_main_llm":{"type":"boolean","title":"Clear Main Llm","description":"Set to true to clear main LLM connector","default":false},"clear_lightweight_llm":{"type":"boolean","title":"Clear Lightweight Llm","description":"Set to true to clear lightweight LLM connector","default":false},"clear_email":{"type":"boolean","title":"Clear Email","description":"Set to true to clear email connector","default":false},"clear_object_storage":{"type":"boolean","title":"Clear Object Storage","description":"Set to true to clear object storage connector","default":false},"clear_code_explorer":{"type":"boolean","title":"Clear Code Explorer","description":"Set to true to clear code explorer connector","default":false},"web_search_connector_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Web Search Connector Id","description":"ID of web search connector (Tavily)"},"web_search_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Web Search Enabled","description":"Enable web search feature"},"clear_web_search":{"type":"boolean","title":"Clear Web Search","description":"Set to true to clear web search connector","default":false}},"type":"object","title":"PlatformSettingsUpdate","description":"Schema for updating platform settings."},"ProcessAllOrgsResponse":{"properties":{"orgs_processed":{"type":"integer","title":"Orgs Processed","description":"Number of organizations processed"},"recommendations_created":{"type":"integer","title":"Recommendations Created","description":"Number of new recommendations created"},"recommendations_expired":{"type":"integer","title":"Recommendations Expired","description":"Number of recommendations that were expired"}},"type":"object","required":["orgs_processed","recommendations_created","recommendations_expired"],"title":"ProcessAllOrgsResponse","description":"Response from batch processing all organizations."},"ProjectAccessibleUserResponse":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"email":{"type":"string","title":"Email"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"}},"type":"object","required":["user_id","email"],"title":"ProjectAccessibleUserResponse","description":"User with access to a project - for @mention list."},"ProjectChatConversationResponse":{"properties":{"id":{"type":"string","title":"Id"},"org_id":{"type":"string","title":"Org Id"},"project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Id"},"created_by":{"type":"string","title":"Created By"},"visibility":{"type":"string","title":"Visibility"},"chat_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chat Title"},"running_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Running Summary"},"short_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Short Id"},"url_identifier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url Identifier"},"is_generating":{"type":"boolean","title":"Is Generating"},"is_exploring_code":{"type":"boolean","title":"Is Exploring Code"},"is_searching_web":{"type":"boolean","title":"Is Searching Web"},"exploring_code_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exploring Code Prompt"},"searching_web_query":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Searching Web Query"},"retry_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Retry Status"},"ai_error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Error Message"},"ai_error_job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Error Job Id"},"ai_error_user_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Error User Message"},"proposed_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposed Title"},"proposed_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposed Description"},"ready_to_create_phase":{"type":"boolean","title":"Ready To Create Phase"},"ready_to_create_feature":{"type":"boolean","title":"Ready To Create Feature"},"proposed_feature_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposed Feature Title"},"proposed_feature_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposed Feature Description"},"proposed_feature_module_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposed Feature Module Id"},"proposed_feature_module_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposed Feature Module Title"},"proposed_feature_module_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposed Feature Module Description"},"ready_to_create_project":{"type":"boolean","title":"Ready To Create Project"},"proposed_project_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposed Project Name"},"proposed_project_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposed Project Description"},"proposed_project_tech_stack":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposed Project Tech Stack"},"proposed_project_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposed Project Key"},"created_phase_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created Phase Id"},"created_project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created Project Id"},"created_feature_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Created Feature Ids"},"is_readonly":{"type":"boolean","title":"Is Readonly"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"}},"type":"object","required":["id","org_id","project_id","created_by","visibility","chat_title","running_summary","short_id","url_identifier","is_generating","is_exploring_code","is_searching_web","exploring_code_prompt","searching_web_query","retry_status","ai_error_message","ai_error_job_id","ai_error_user_message","proposed_title","proposed_description","ready_to_create_phase","ready_to_create_feature","proposed_feature_title","proposed_feature_description","proposed_feature_module_id","proposed_feature_module_title","proposed_feature_module_description","ready_to_create_project","proposed_project_name","proposed_project_description","proposed_project_tech_stack","proposed_project_key","created_phase_id","created_project_id","created_feature_ids","is_readonly","created_at","updated_at"],"title":"ProjectChatConversationResponse","description":"Response for a project chat conversation."},"ProjectChatConversationWithItems":{"properties":{"conversation":{"$ref":"#/components/schemas/ProjectChatConversationResponse"},"items":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Items"}},"type":"object","required":["conversation","items"],"title":"ProjectChatConversationWithItems","description":"Project chat conversation with its items."},"ProjectChatMessageAuthor":{"properties":{"id":{"type":"string","title":"Id"},"email":{"type":"string","title":"Email"},"display_name":{"type":"string","title":"Display Name"}},"type":"object","required":["id","email","display_name"],"title":"ProjectChatMessageAuthor","description":"Author information for project chat messages."},"ProjectChatMessageResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_chat_id":{"type":"string","format":"uuid","title":"Project Chat Id"},"message_type":{"type":"string","title":"Message Type"},"content":{"type":"string","title":"Content"},"response_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Response Data"},"images":{"anyOf":[{"items":{"$ref":"#/components/schemas/ImageAttachment"},"type":"array"},{"type":"null"}],"title":"Images"},"reactions":{"items":{"$ref":"#/components/schemas/Reaction"},"type":"array","title":"Reactions","default":[]},"job_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Job Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"author":{"anyOf":[{"$ref":"#/components/schemas/ProjectChatMessageAuthor"},{"type":"null"}]}},"type":"object","required":["id","project_chat_id","message_type","content","created_at"],"title":"ProjectChatMessageResponse","description":"Response schema for a project chat message."},"ProjectChatResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"org_id":{"type":"string","format":"uuid","title":"Org Id"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"},"created_by":{"type":"string","format":"uuid","title":"Created By"},"visibility":{"type":"string","title":"Visibility","default":"private"},"running_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Running Summary"},"chat_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chat Title"},"proposed_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposed Title"},"proposed_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposed Description"},"ready_to_create_phase":{"type":"boolean","title":"Ready To Create Phase"},"is_generating":{"type":"boolean","title":"Is Generating"},"ai_error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Error Message"},"ai_error_job_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Ai Error Job Id"},"ai_error_user_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Error User Message"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"target_container_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Target Container Id"},"target_container_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Container Title"},"created_phase_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created Phase Id"},"created_phase_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created Phase Title"},"is_readonly":{"type":"boolean","title":"Is Readonly","default":false},"ready_to_create_feature":{"type":"boolean","title":"Ready To Create Feature","default":false},"proposed_feature_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposed Feature Title"},"proposed_feature_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposed Feature Description"},"proposed_feature_module_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Proposed Feature Module Id"},"proposed_feature_module_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposed Feature Module Title"},"proposed_feature_module_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposed Feature Module Description"},"created_feature_ids":{"anyOf":[{"items":{"type":"string","format":"uuid"},"type":"array"},{"type":"null"}],"title":"Created Feature Ids"},"ready_to_create_project":{"type":"boolean","title":"Ready To Create Project","default":false},"proposed_project_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposed Project Name"},"proposed_project_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposed Project Description"},"proposed_project_tech_stack":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposed Project Tech Stack"},"proposed_project_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposed Project Key"},"created_project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created Project Id"},"created_project_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created Project Name"},"short_id":{"type":"string","title":"Short Id"},"url_identifier":{"type":"string","title":"Url Identifier"},"initial_message_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Initial Message Id"},"initial_job_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Initial Job Id"}},"type":"object","required":["id","org_id","created_by","ready_to_create_phase","is_generating","created_at","updated_at","short_id","url_identifier"],"title":"ProjectChatResponse","description":"Response schema for a project chat."},"ProjectChatStartOverResponse":{"properties":{"deleted_count":{"type":"integer","title":"Deleted Count"},"deleted_message_ids":{"items":{"type":"string"},"type":"array","title":"Deleted Message Ids"}},"type":"object","required":["deleted_count","deleted_message_ids"],"title":"ProjectChatStartOverResponse","description":"Response schema for start-over operation."},"ProjectChatWithMessages":{"properties":{"project_chat":{"$ref":"#/components/schemas/ProjectChatResponse"},"messages":{"items":{"$ref":"#/components/schemas/ProjectChatMessageResponse"},"type":"array","title":"Messages"}},"type":"object","required":["project_chat","messages"],"title":"ProjectChatWithMessages","description":"Response schema for a project chat with all messages."},"ProjectCreate":{"properties":{"type":{"$ref":"#/components/schemas/ProjectType"},"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"short_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Short Description"},"idea_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idea Text"},"key":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Key"},"project_tech_stack":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Project Tech Stack","description":"High-level tech stack type (web_fullstack, mobile, desktop, etc.)"}},"type":"object","required":["type","name"],"title":"ProjectCreate","description":"Schema for creating a new project."},"ProjectEfficiencyEntry":{"properties":{"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Project's unique identifier"},"project_name":{"type":"string","title":"Project Name","description":"Project's name"},"tokens_used":{"type":"integer","title":"Tokens Used","description":"Total tokens consumed by this project"},"percentage_of_org":{"type":"number","title":"Percentage Of Org","description":"Percentage of organization's total usage"}},"type":"object","required":["project_id","project_name","tokens_used","percentage_of_org"],"title":"ProjectEfficiencyEntry","description":"Project-level breakdown of organization usage."},"ProjectMemberCreate":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"role":{"$ref":"#/components/schemas/ProjectRole"}},"type":"object","required":["user_id","role"],"title":"ProjectMemberCreate","description":"Schema for adding a member to a project."},"ProjectMemberResponse":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"email":{"type":"string","title":"Email"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"role":{"$ref":"#/components/schemas/ProjectRole"},"joined_at":{"type":"string","format":"date-time","title":"Joined At"}},"type":"object","required":["user_id","email","display_name","role","joined_at"],"title":"ProjectMemberResponse","description":"Schema for project member list response (with user info).\n\nThis is similar to OrgMemberResponse but for projects."},"ProjectMembershipResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"role":{"$ref":"#/components/schemas/ProjectRole"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","project_id","user_id","role","created_at"],"title":"ProjectMembershipResponse","description":"Schema for project membership response (detailed)."},"ProjectRepositoryBrief":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"slug":{"type":"string","title":"Slug"},"display_name":{"type":"string","title":"Display Name"},"repo_url":{"type":"string","title":"Repo Url"},"default_branch":{"type":"string","title":"Default Branch"},"github_integration_config_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Github Integration Config Id"},"user_remarks":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Remarks"},"repo_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Repo Metadata"},"sort_order":{"type":"integer","title":"Sort Order"}},"type":"object","required":["id","slug","display_name","repo_url","default_branch","sort_order"],"title":"ProjectRepositoryBrief","description":"Brief repository info for embedding in ProjectResponse."},"ProjectRepositoryCreate":{"properties":{"github_integration_config_id":{"type":"string","format":"uuid","title":"Github Integration Config Id","description":"GitHub connector ID for authentication"},"repo_url":{"type":"string","maxLength":500,"title":"Repo Url","description":"GitHub repository URL"},"display_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Display Name","description":"Display name (defaults to repo name)"},"default_branch":{"type":"string","maxLength":100,"title":"Default Branch","description":"Default branch to use","default":"main"},"user_remarks":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Remarks","description":"User description of this repo's role in the project"}},"type":"object","required":["github_integration_config_id","repo_url"],"title":"ProjectRepositoryCreate","description":"Schema for creating a new project repository."},"ProjectRepositoryResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"slug":{"type":"string","title":"Slug"},"display_name":{"type":"string","title":"Display Name"},"repo_url":{"type":"string","title":"Repo Url"},"default_branch":{"type":"string","title":"Default Branch"},"github_integration_config_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Github Integration Config Id"},"user_remarks":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Remarks"},"repo_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Repo Metadata"},"sort_order":{"type":"integer","title":"Sort Order"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","project_id","slug","display_name","repo_url","default_branch","sort_order","created_at","updated_at"],"title":"ProjectRepositoryResponse","description":"Schema for project repository response."},"ProjectRepositoryUpdate":{"properties":{"display_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Display Name"},"default_branch":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Default Branch"},"user_remarks":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Remarks"},"github_integration_config_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Github Integration Config Id"},"clear_connector":{"type":"boolean","title":"Clear Connector","description":"Set to true to clear the GitHub connector","default":false}},"type":"object","title":"ProjectRepositoryUpdate","description":"Schema for updating a project repository."},"ProjectResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"org_id":{"type":"string","format":"uuid","title":"Org Id"},"parent_project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Parent Project Id"},"type":{"$ref":"#/components/schemas/ProjectType"},"key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Key"},"name":{"type":"string","title":"Name"},"short_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Short Description"},"idea_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idea Text"},"status":{"$ref":"#/components/schemas/ProjectStatus"},"external_ticket_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Ticket Id"},"external_system":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External System"},"project_tech_stack":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Project Tech Stack"},"discovery_intent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Discovery Intent"},"discovery_complexity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Discovery Complexity"},"created_by":{"type":"string","format":"uuid","title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"deleted_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Deleted At"},"owner":{"anyOf":[{"$ref":"#/components/schemas/OwnerInfo"},{"type":"null"}]},"short_id":{"type":"string","title":"Short Id"},"url_identifier":{"type":"string","title":"Url Identifier"},"repositories":{"items":{"$ref":"#/components/schemas/ProjectRepositoryBrief"},"type":"array","title":"Repositories","default":[]}},"type":"object","required":["id","org_id","type","name","status","created_by","created_at","updated_at","short_id","url_identifier"],"title":"ProjectResponse","description":"Schema for project response."},"ProjectRole":{"type":"string","enum":["owner","admin","member","viewer"],"title":"ProjectRole","description":"Project membership roles with hierarchical permissions."},"ProjectShareCreate":{"properties":{"subject_type":{"$ref":"#/components/schemas/ShareSubjectType","description":"Type of subject: 'user' or 'group'"},"subject_id":{"type":"string","format":"uuid","title":"Subject Id","description":"UUID of the user or group to share with"},"role":{"$ref":"#/components/schemas/ProjectRole","description":"Role to assign (viewer, member, admin, owner)","default":"viewer"}},"type":"object","required":["subject_type","subject_id"],"title":"ProjectShareCreate","description":"Schema for creating a project share."},"ProjectShareListResponse":{"properties":{"shares":{"items":{"$ref":"#/components/schemas/ProjectShareResponse"},"type":"array","title":"Shares"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["shares","total"],"title":"ProjectShareListResponse","description":"Response for listing project shares."},"ProjectShareResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"subject_type":{"$ref":"#/components/schemas/ShareSubjectType"},"subject_id":{"type":"string","format":"uuid","title":"Subject Id"},"role":{"$ref":"#/components/schemas/ProjectRole"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"created_by":{"anyOf":[{"$ref":"#/components/schemas/app__schemas__project_share__UserSummary"},{"type":"null"}]},"user":{"anyOf":[{"$ref":"#/components/schemas/app__schemas__project_share__UserSummary"},{"type":"null"}]},"group":{"anyOf":[{"$ref":"#/components/schemas/app__schemas__project_share__GroupSummary"},{"type":"null"}]},"org":{"anyOf":[{"$ref":"#/components/schemas/OrgShareSummary"},{"type":"null"}]}},"type":"object","required":["id","project_id","subject_type","subject_id","role","created_at","updated_at"],"title":"ProjectShareResponse","description":"Response for a single project share."},"ProjectShareUpdate":{"properties":{"role":{"$ref":"#/components/schemas/ProjectRole","description":"New role to assign"}},"type":"object","required":["role"],"title":"ProjectShareUpdate","description":"Schema for updating a project share role."},"ProjectStatus":{"type":"string","enum":["draft","discovery","ready_for_implementation","in_progress","completed","archived"],"title":"ProjectStatus","description":"Project status enum."},"ProjectTeamAssignmentCreate":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"role_definition_id":{"type":"string","format":"uuid","title":"Role Definition Id"}},"type":"object","required":["user_id","role_definition_id"],"title":"ProjectTeamAssignmentCreate","description":"Schema for creating a team assignment."},"ProjectTeamAssignmentResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"role_definition_id":{"type":"string","format":"uuid","title":"Role Definition Id"},"assigned_by":{"type":"string","format":"uuid","title":"Assigned By"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","project_id","user_id","role_definition_id","assigned_by","created_at"],"title":"ProjectTeamAssignmentResponse","description":"Schema for project team assignment response."},"ProjectTeamAssignmentWithUser":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"project_id":{"type":"string","format":"uuid","title":"Project Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"role_definition_id":{"type":"string","format":"uuid","title":"Role Definition Id"},"assigned_by":{"type":"string","format":"uuid","title":"Assigned By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"user":{"$ref":"#/components/schemas/TeamMemberInfo"}},"type":"object","required":["id","project_id","user_id","role_definition_id","assigned_by","created_at","user"],"title":"ProjectTeamAssignmentWithUser","description":"Schema for project team assignment with user details."},"ProjectTeamResponse":{"properties":{"roles":{"items":{"$ref":"#/components/schemas/ProjectTeamRoleGroup"},"type":"array","title":"Roles"}},"type":"object","required":["roles"],"title":"ProjectTeamResponse","description":"Schema for project team response with all roles."},"ProjectTeamRoleGroup":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"role_key":{"type":"string","title":"Role Key"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"is_default":{"type":"boolean","title":"Is Default"},"members":{"items":{"$ref":"#/components/schemas/TeamMemberInfo"},"type":"array","title":"Members"}},"type":"object","required":["id","role_key","title","is_default","members"],"title":"ProjectTeamRoleGroup","description":"Schema for a team role group with its members."},"ProjectType":{"type":"string","enum":["application","feature","bugfix"],"title":"ProjectType","description":"Project type enum."},"ProjectUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"short_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Short Description"},"idea_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idea Text"},"status":{"anyOf":[{"$ref":"#/components/schemas/ProjectStatus"},{"type":"null"}]},"key":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Key"}},"type":"object","title":"ProjectUpdate","description":"Schema for updating a project."},"PullJobResponse":{"properties":{"job_id":{"type":"string","title":"Job Id"},"status":{"type":"string","title":"Status"}},"type":"object","required":["job_id","status"],"title":"PullJobResponse","description":"Response schema for pull job creation."},"Reaction":{"properties":{"emoji":{"type":"string","title":"Emoji"},"emoji_native":{"type":"string","title":"Emoji Native"},"user_ids":{"items":{"type":"string"},"type":"array","title":"User Ids"},"user_names":{"additionalProperties":{"type":"string"},"type":"object","title":"User Names","default":{}},"count":{"type":"integer","title":"Count"}},"type":"object","required":["emoji","emoji_native","user_ids","count"],"title":"Reaction","description":"Emoji reaction on a thread item."},"RecentLLMCall":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"agent_name":{"type":"string","title":"Agent Name"},"agent_display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent Display Name"},"prompt_tokens":{"type":"integer","title":"Prompt Tokens"},"completion_tokens":{"type":"integer","title":"Completion Tokens"},"cost_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost Usd"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"project_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Project Id"},"llm_call_log_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Llm Call Log Id"},"triggered_by_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Triggered By User Id"},"triggered_by_user_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Triggered By User Name"},"duration_ms":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Ms"}},"type":"object","required":["id","agent_name","agent_display_name","prompt_tokens","completion_tokens","cost_usd","created_at","project_id","llm_call_log_id","triggered_by_user_id","triggered_by_user_name","duration_ms"],"title":"RecentLLMCall","description":"Summary of a recent LLM call for dashboard display."},"RecommendationAction":{"type":"string","enum":["upgrade","downgrade"],"title":"RecommendationAction","description":"Action type for the recommendation."},"RecommendationStatus":{"type":"string","enum":["active","dismissed","expired"],"title":"RecommendationStatus","description":"Status of the recommendation."},"RegenerateGroundingJobResponse":{"properties":{"job_id":{"type":"string","title":"Job Id"},"status":{"type":"string","title":"Status"}},"type":"object","required":["job_id","status"],"title":"RegenerateGroundingJobResponse","description":"Response schema for regenerate grounding job creation."},"RegistrationResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Unique user identifier"},"email":{"type":"string","title":"Email","description":"User's email address"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name","description":"User's display name"},"email_verification_required":{"type":"boolean","title":"Email Verification Required","description":"Whether email verification is required before login"},"email_sent":{"type":"boolean","title":"Email Sent","description":"Whether the verification email was successfully sent"}},"type":"object","required":["id","email","email_verification_required","email_sent"],"title":"RegistrationResponse","description":"Schema for user registration response (with email verification status)."},"ReorderRepositoriesRequest":{"properties":{"slug_order":{"items":{"type":"string"},"type":"array","title":"Slug Order","description":"Ordered list of repository slugs (first = primary)"}},"type":"object","required":["slug_order"],"title":"ReorderRepositoriesRequest","description":"Schema for reordering repositories."},"RepositoryInfo":{"properties":{"full_name":{"type":"string","title":"Full Name"},"name":{"type":"string","title":"Name"},"owner":{"type":"string","title":"Owner"},"private":{"type":"boolean","title":"Private"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["full_name","name","owner","private"],"title":"RepositoryInfo","description":"Repository information."},"RepositoryListRequest":{"properties":{"provider":{"type":"string","title":"Provider"},"token":{"type":"string","title":"Token"},"config_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config Json"},"page":{"type":"integer","title":"Page","default":1},"per_page":{"type":"integer","title":"Per Page","default":100}},"type":"object","required":["provider","token"],"title":"RepositoryListRequest","description":"Schema for listing GitHub repositories."},"RepositoryListResponse":{"properties":{"repositories":{"items":{"$ref":"#/components/schemas/RepositoryInfo"},"type":"array","title":"Repositories"},"has_more":{"type":"boolean","title":"Has More"}},"type":"object","required":["repositories","has_more"],"title":"RepositoryListResponse","description":"Schema for repository list response."},"ResendVerificationRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email","description":"Email address to resend verification to"}},"type":"object","required":["email"],"title":"ResendVerificationRequest","description":"Schema for resend verification email request."},"ResendVerificationResponse":{"properties":{"message":{"type":"string","title":"Message","description":"Response message"}},"type":"object","required":["message"],"title":"ResendVerificationResponse","description":"Schema for resend verification email response."},"SendTestEmailRequest":{"properties":{"to_email":{"type":"string","title":"To Email","description":"Email address to send the test email to"}},"type":"object","required":["to_email"],"title":"SendTestEmailRequest","description":"Schema for sending a test email."},"SendTestEmailResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"}},"type":"object","required":["success","message"],"title":"SendTestEmailResponse","description":"Schema for test email result."},"ShareSubjectType":{"type":"string","enum":["user","group","org"],"title":"ShareSubjectType","description":"Type of subject in a project share."},"ShareableSubject":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"type":{"$ref":"#/components/schemas/ShareableSubjectType"},"name":{"type":"string","title":"Name"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"member_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Member Count"}},"type":"object","required":["id","type","name"],"title":"ShareableSubject","description":"A user or group that can be shared with."},"ShareableSubjectType":{"type":"string","enum":["user","group"],"title":"ShareableSubjectType","description":"Type of shareable subject for search results."},"ShareableSubjectsResponse":{"properties":{"subjects":{"items":{"$ref":"#/components/schemas/ShareableSubject"},"type":"array","title":"Subjects"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["subjects","total"],"title":"ShareableSubjectsResponse","description":"Response for shareable subjects search."},"SiblingExtensionInfo":{"properties":{"phase_id":{"type":"string","title":"Phase Id"},"title":{"type":"string","title":"Title"},"extension_number":{"type":"integer","title":"Extension Number"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["phase_id","title","extension_number","created_at"],"title":"SiblingExtensionInfo","description":"Info about a sibling extension in the preview."},"SlackBotStatusResponse":{"properties":{"has_slack_bot_config":{"type":"boolean","title":"Has Slack Bot Config"},"has_slack_oauth_config":{"type":"boolean","title":"Has Slack Oauth Config"},"slack_bot_enabled":{"type":"boolean","title":"Slack Bot Enabled"},"auth_mode":{"type":"string","title":"Auth Mode"},"workspaces":{"items":{"$ref":"#/components/schemas/SlackWorkspaceInfo"},"type":"array","title":"Workspaces"},"total_channel_links":{"type":"integer","title":"Total Channel Links"},"install_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Install Url"}},"type":"object","required":["has_slack_bot_config","has_slack_oauth_config","slack_bot_enabled","auth_mode","workspaces","total_channel_links"],"title":"SlackBotStatusResponse"},"SlackWorkspaceInfo":{"properties":{"team_id":{"type":"string","title":"Team Id"},"team_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Team Name"},"installed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Installed At"}},"type":"object","required":["team_id"],"title":"SlackWorkspaceInfo"},"SortOrder":{"type":"string","enum":["asc","desc"],"title":"SortOrder","description":"Sort order options."},"SpecDraftAIMentionRequest":{"properties":{"message_text":{"type":"string","minLength":1,"title":"Message Text","description":"The message text containing @MFBTAI"},"version_id":{"type":"string","title":"Version Id","description":"Draft version ID for context"},"block_id":{"type":"string","title":"Block Id","description":"Block ID being discussed"},"block_content":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Block Content","description":"Content of the selected block/section"}},"type":"object","required":["message_text","version_id","block_id"],"title":"SpecDraftAIMentionRequest","description":"Schema for @MFBTAI mention in spec/prompt plan draft discussions."},"SpecType":{"type":"string","enum":["specification","prompt_plan"],"title":"SpecType","description":"Type of specification."},"StartOverResponse":{"properties":{"deleted_count":{"type":"integer","title":"Deleted Count"},"deleted_item_ids":{"items":{"type":"string"},"type":"array","title":"Deleted Item Ids"},"deleted_implementation_ids":{"items":{"type":"string"},"type":"array","title":"Deleted Implementation Ids","default":[]}},"type":"object","required":["deleted_count","deleted_item_ids"],"title":"StartOverResponse","description":"Response for start-over operation (bulk deletion)."},"SwitchOrgRequest":{"properties":{"org_id":{"type":"string","format":"uuid","title":"Org Id","description":"Organization ID to switch to"}},"type":"object","required":["org_id"],"title":"SwitchOrgRequest","description":"Schema for switching current organization."},"TeamMemberInfo":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"email":{"type":"string","title":"Email"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"}},"type":"object","required":["user_id","email"],"title":"TeamMemberInfo","description":"Schema for team member information."},"TeamRoleDefinitionCreate":{"properties":{"title":{"type":"string","maxLength":100,"minLength":1,"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["title"],"title":"TeamRoleDefinitionCreate","description":"Schema for creating a team role definition."},"TeamRoleDefinitionResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"org_id":{"type":"string","format":"uuid","title":"Org Id"},"role_key":{"type":"string","title":"Role Key"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"order_index":{"type":"integer","title":"Order Index"},"is_default":{"type":"boolean","title":"Is Default"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","org_id","role_key","title","order_index","is_default","created_at","updated_at"],"title":"TeamRoleDefinitionResponse","description":"Schema for team role definition response."},"TeamRoleDefinitionUpdate":{"properties":{"title":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"TeamRoleDefinitionUpdate","description":"Schema for updating a team role definition."},"ThreadCloneOption":{"type":"string","enum":["none","summary_only","full"],"title":"ThreadCloneOption","description":"Options for cloning threads."},"ThreadCreate":{"properties":{"context_type":{"$ref":"#/components/schemas/ContextType"},"context_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context Id"},"title":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Title"}},"type":"object","required":["context_type"],"title":"ThreadCreate","description":"Schema for creating a thread."},"ThreadListResponse":{"properties":{"id":{"type":"string","title":"Id"},"project_id":{"type":"string","title":"Project Id"},"context_type":{"$ref":"#/components/schemas/ContextType"},"context_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"pending_approval":{"type":"boolean","title":"Pending Approval","default":false},"created_by":{"type":"string","title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"is_exploring_code":{"type":"boolean","title":"Is Exploring Code","default":false},"is_searching_web":{"type":"boolean","title":"Is Searching Web","default":false},"exploring_code_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exploring Code Prompt"},"searching_web_query":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Searching Web Query"},"ai_error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Error Message"},"ai_error_job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Error Job Id"},"ai_error_user_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Error User Message"},"block_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Block Id"},"thread_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Thread Id"}},"type":"object","required":["id","project_id","context_type","created_by","created_at","updated_at"],"title":"ThreadListResponse","description":"Schema for thread list response (without comments)."},"ThreadResponse":{"properties":{"id":{"type":"string","title":"Id"},"project_id":{"type":"string","title":"Project Id"},"context_type":{"$ref":"#/components/schemas/ContextType"},"context_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"pending_approval":{"type":"boolean","title":"Pending Approval","default":false},"created_by":{"type":"string","title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"comments":{"items":{"$ref":"#/components/schemas/CommentResponse"},"type":"array","title":"Comments","default":[]},"items":{"items":{},"type":"array","title":"Items","default":[]},"decision_summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision Summary"},"decision_summary_short":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Decision Summary Short"},"unresolved_points":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Unresolved Points"},"last_summarized_item_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Summarized Item Id"},"suggested_implementation_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Suggested Implementation Name"},"ai_error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Error Message"},"ai_error_job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Error Job Id"},"ai_error_user_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Error User Message"},"is_generating_decision_summary":{"type":"boolean","title":"Is Generating Decision Summary","default":false},"is_generating_ai_response":{"type":"boolean","title":"Is Generating Ai Response","default":false},"is_exploring_code":{"type":"boolean","title":"Is Exploring Code","default":false},"is_searching_web":{"type":"boolean","title":"Is Searching Web","default":false},"exploring_code_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Exploring Code Prompt"},"searching_web_query":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Searching Web Query"},"show_create_implementation_button":{"type":"boolean","title":"Show Create Implementation Button","default":false}},"type":"object","required":["id","project_id","context_type","created_by","created_at","updated_at"],"title":"ThreadResponse","description":"Schema for thread response with thread items."},"ThreadUpdate":{"properties":{"title":{"type":"string","maxLength":200,"minLength":1,"title":"Title"}},"type":"object","required":["title"],"title":"ThreadUpdate","description":"Schema for updating a thread."},"ThresholdColor":{"type":"string","enum":["red","yellow","green","blue"],"title":"ThresholdColor","description":"Color-coded threshold for efficiency levels."},"TimeRange":{"type":"string","enum":["daily","weekly","monthly","yearly","all"],"title":"TimeRange","description":"Time range options for analytics queries."},"ToggleReactionRequest":{"properties":{"emoji":{"type":"string","title":"Emoji"},"emoji_native":{"type":"string","title":"Emoji Native"}},"type":"object","required":["emoji","emoji_native"],"title":"ToggleReactionRequest","description":"Request to toggle a reaction on a thread item."},"ToggleReactionResponse":{"properties":{"reactions":{"items":{"$ref":"#/components/schemas/Reaction"},"type":"array","title":"Reactions"},"action":{"type":"string","enum":["added","removed"],"title":"Action"}},"type":"object","required":["reactions","action"],"title":"ToggleReactionResponse","description":"Response from toggling a reaction."},"TokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token","description":"JWT access token"},"token_type":{"type":"string","title":"Token Type","description":"Token type (always 'bearer')","default":"bearer"}},"type":"object","required":["access_token"],"title":"TokenResponse","description":"Schema for authentication token response."},"TopProjectEntry":{"properties":{"project_id":{"type":"string","format":"uuid","title":"Project Id","description":"Project's unique identifier"},"project_name":{"type":"string","title":"Project Name","description":"Project's name"},"org_id":{"type":"string","format":"uuid","title":"Org Id","description":"Organization's unique identifier"},"org_name":{"type":"string","title":"Org Name","description":"Organization's name"},"total_tokens":{"type":"integer","title":"Total Tokens","description":"Total tokens consumed"},"total_credits":{"type":"number","title":"Total Credits","description":"Total credits (tokens / 100k)"},"total_cost_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Cost Usd","description":"Total cost in USD"},"call_count":{"type":"integer","title":"Call Count","description":"Number of LLM calls made"},"percentage_of_total":{"type":"number","title":"Percentage Of Total","description":"Percentage of total platform usage in the time range"}},"type":"object","required":["project_id","project_name","org_id","org_name","total_tokens","total_credits","call_count","percentage_of_total"],"title":"TopProjectEntry","description":"A single project entry in the top projects response."},"TopProjectsResponse":{"properties":{"time_range":{"$ref":"#/components/schemas/TimeRange","description":"The time range used for the query"},"start_date":{"type":"string","format":"date","title":"Start Date","description":"Start date of the query range"},"end_date":{"type":"string","format":"date","title":"End Date","description":"End date of the query range"},"org_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Org Id","description":"Organization filter (null for platform-wide)"},"projects":{"items":{"$ref":"#/components/schemas/TopProjectEntry"},"type":"array","title":"Projects","description":"List of top projects by usage"},"total_platform_tokens":{"type":"integer","title":"Total Platform Tokens","description":"Total tokens across all projects in the time range"},"total_platform_credits":{"type":"number","title":"Total Platform Credits","description":"Total credits across all projects in the time range"}},"type":"object","required":["time_range","start_date","end_date","projects","total_platform_tokens","total_platform_credits"],"title":"TopProjectsResponse","description":"Response model for top projects analytics endpoint."},"TopUserEntry":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id","description":"User's unique identifier"},"email":{"type":"string","title":"Email","description":"User's email address"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name","description":"User's display name"},"total_tokens":{"type":"integer","title":"Total Tokens","description":"Total tokens consumed"},"total_credits":{"type":"number","title":"Total Credits","description":"Total credits (tokens / 100k)"},"total_cost_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Cost Usd","description":"Total cost in USD"},"call_count":{"type":"integer","title":"Call Count","description":"Number of LLM calls made"},"percentage_of_total":{"type":"number","title":"Percentage Of Total","description":"Percentage of total platform usage in the time range"}},"type":"object","required":["user_id","email","total_tokens","total_credits","call_count","percentage_of_total"],"title":"TopUserEntry","description":"A single user entry in the top users response."},"TopUsersResponse":{"properties":{"time_range":{"$ref":"#/components/schemas/TimeRange","description":"The time range used for the query"},"start_date":{"type":"string","format":"date","title":"Start Date","description":"Start date of the query range"},"end_date":{"type":"string","format":"date","title":"End Date","description":"End date of the query range"},"org_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Org Id","description":"Organization filter (null for platform-wide)"},"users":{"items":{"$ref":"#/components/schemas/TopUserEntry"},"type":"array","title":"Users","description":"List of top users by usage"},"total_platform_tokens":{"type":"integer","title":"Total Platform Tokens","description":"Total tokens across all users in the time range"},"total_platform_credits":{"type":"number","title":"Total Platform Credits","description":"Total credits across all users in the time range"}},"type":"object","required":["time_range","start_date","end_date","users","total_platform_tokens","total_platform_credits"],"title":"TopUsersResponse","description":"Response model for top users analytics endpoint."},"UnresolvedPointSchema":{"properties":{"question":{"type":"string","title":"Question"},"context":{"type":"string","title":"Context"},"status":{"type":"string","title":"Status"},"last_mention":{"type":"string","title":"Last Mention"}},"type":"object","required":["question","context","status","last_mention"],"title":"UnresolvedPointSchema","description":"Schema for an unresolved decision point."},"UserCreate":{"properties":{"email":{"type":"string","format":"email","title":"Email","description":"User's email address","examples":["user@example.com"]},"password":{"type":"string","maxLength":100,"minLength":8,"title":"Password","description":"User's password (min 8 characters)","examples":["securepassword123"]},"display_name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Display Name","description":"User's display name","examples":["John Doe"]}},"type":"object","required":["email","password"],"title":"UserCreate","description":"Schema for user registration request."},"UserEfficiencyEntry":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id","description":"User's unique identifier"},"email":{"type":"string","title":"Email","description":"User's email address"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name","description":"User's display name"},"tokens_used":{"type":"integer","title":"Tokens Used","description":"Total tokens consumed by this user"},"percentage_of_org":{"type":"number","title":"Percentage Of Org","description":"Percentage of organization's total usage"}},"type":"object","required":["user_id","email","tokens_used","percentage_of_org"],"title":"UserEfficiencyEntry","description":"User-level breakdown of organization usage."},"UserGroupCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name","description":"Group name (must be unique within org)"},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Description","description":"Optional group description"}},"type":"object","required":["name"],"title":"UserGroupCreate","description":"Schema for creating a user group."},"UserGroupListResponse":{"properties":{"groups":{"items":{"$ref":"#/components/schemas/UserGroupResponse"},"type":"array","title":"Groups"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["groups","total"],"title":"UserGroupListResponse","description":"Response for listing user groups."},"UserGroupMemberAdd":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id","description":"User ID to add to group"}},"type":"object","required":["user_id"],"title":"UserGroupMemberAdd","description":"Schema for adding a member to a group."},"UserGroupResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"org_id":{"type":"string","format":"uuid","title":"Org Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"member_count":{"type":"integer","title":"Member Count"},"created_by":{"anyOf":[{"$ref":"#/components/schemas/app__schemas__user_group__UserSummary"},{"type":"null"}]},"provisioning_source":{"type":"string","title":"Provisioning Source"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","org_id","name","member_count","provisioning_source","created_at","updated_at"],"title":"UserGroupResponse","description":"Response for a user group."},"UserGroupUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name","description":"New group name"},"description":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}],"title":"Description","description":"New group description"}},"type":"object","title":"UserGroupUpdate","description":"Schema for updating a user group."},"UserPlanDetailsResponse":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"email":{"type":"string","title":"Email"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"email_verified":{"type":"boolean","title":"Email Verified"},"trial":{"$ref":"#/components/schemas/UserTrialInfo"},"org":{"anyOf":[{"$ref":"#/components/schemas/OrgPlanInfo"},{"type":"null"}]}},"type":"object","required":["user_id","email","display_name","created_at","email_verified","trial","org"],"title":"UserPlanDetailsResponse","description":"Full response for user plan lookup."},"UserPlanSearchResult":{"properties":{"user_id":{"type":"string","format":"uuid","title":"User Id"},"email":{"type":"string","title":"Email"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"email_verified":{"type":"boolean","title":"Email Verified"}},"type":"object","required":["user_id","email","display_name","created_at","email_verified"],"title":"UserPlanSearchResult","description":"Summary info returned when searching for users."},"UserPlanUpdateRequest":{"properties":{"plan_end_date":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Plan End Date","description":"Extend trial by setting new end date"},"plan_llm_tokens_total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Plan Llm Tokens Total","description":"Set total token limit"},"plan_llm_tokens_per_month":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Plan Llm Tokens Per Month","description":"Set monthly token limit"},"plan_max_projects":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Plan Max Projects","description":"Set max projects limit"},"plan_max_users":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Plan Max Users","description":"Set max users limit"},"reset_token_usage":{"type":"boolean","title":"Reset Token Usage","description":"Reset plan_llm_tokens_used to 0","default":false}},"type":"object","title":"UserPlanUpdateRequest","description":"Request to update user/org plan values."},"UserPlanUpdateResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"message":{"type":"string","title":"Message"},"updated_org":{"$ref":"#/components/schemas/OrgPlanInfo"}},"type":"object","required":["success","message","updated_org"],"title":"UserPlanUpdateResponse","description":"Response after updating plan values."},"UserQuestionMessageResponse":{"properties":{"id":{"type":"string","title":"Id"},"role":{"type":"string","title":"Role"},"content":{"type":"string","title":"Content"},"generated_questions":{"anyOf":[{"items":{"$ref":"#/components/schemas/GeneratedQuestionPreview"},"type":"array"},{"type":"null"}],"title":"Generated Questions"},"added_question_ids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Added Question Ids"},"job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Id"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","role","content","created_at"],"title":"UserQuestionMessageResponse","description":"Response schema for a user question message."},"UserQuestionSessionResponse":{"properties":{"id":{"type":"string","title":"Id"},"brainstorming_phase_id":{"type":"string","title":"Brainstorming Phase Id"},"title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title"},"status":{"type":"string","title":"Status"},"questions_added":{"type":"integer","title":"Questions Added"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"ai_error_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Error Message"},"ai_error_job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Error Job Id"},"ai_error_user_prompt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ai Error User Prompt"}},"type":"object","required":["id","brainstorming_phase_id","status","questions_added","created_at","updated_at"],"title":"UserQuestionSessionResponse","description":"Response schema for a user question session."},"UserQuestionSessionWithMessagesResponse":{"properties":{"session":{"$ref":"#/components/schemas/UserQuestionSessionResponse"},"messages":{"items":{"$ref":"#/components/schemas/UserQuestionMessageResponse"},"type":"array","title":"Messages"}},"type":"object","required":["session","messages"],"title":"UserQuestionSessionWithMessagesResponse","description":"Response schema for a session with messages."},"UserResponse":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Unique user identifier"},"email":{"type":"string","title":"Email","description":"User's email address"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name","description":"User's display name"},"org_id":{"type":"string","format":"uuid","title":"Org Id","description":"Organization ID the user belongs to"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"Timestamp when the user was created"}},"type":"object","required":["id","email","org_id","created_at"],"title":"UserResponse","description":"Schema for user response (excludes sensitive data)."},"UserTrialInfo":{"properties":{"trial_started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Trial Started At"},"is_exempt":{"type":"boolean","title":"Is Exempt"},"days_remaining":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days Remaining"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["trial_started_at","is_exempt","days_remaining","expires_at"],"title":"UserTrialInfo","description":"User trial status info."},"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"},"VersionThreadCreate":{"properties":{"block_id":{"type":"string","maxLength":100,"minLength":1,"title":"Block Id"},"title":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Title"},"context_type":{"$ref":"#/components/schemas/ContextType","default":"spec_draft"}},"type":"object","required":["block_id"],"title":"VersionThreadCreate","description":"Schema for creating a thread on a draft version block."},"WebSearchEnvConfigResponse":{"properties":{"configured":{"type":"boolean","title":"Configured","description":"Whether web search env vars are configured with non-empty values"}},"type":"object","required":["configured"],"title":"WebSearchEnvConfigResponse","description":"Schema for web search environment config check response."},"app__routers__agent_api__FeatureResponse":{"properties":{"id":{"type":"string","title":"Id"},"feature_key":{"type":"string","title":"Feature Key"},"title":{"type":"string","title":"Title"},"spec_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Spec Text"},"prompt_plan_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt Plan Text"},"implementation_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Implementation Notes"}},"type":"object","required":["id","feature_key","title"],"title":"FeatureResponse","description":"Feature data for agent consumption."},"app__routers__agent_api__FinalPromptPlanResponse":{"properties":{"content_markdown":{"type":"string","title":"Content Markdown"},"content_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Content Json"},"generated_at":{"type":"string","format":"date-time","title":"Generated At"}},"type":"object","required":["content_markdown","generated_at"],"title":"FinalPromptPlanResponse","description":"Response for final prompt plan endpoint."},"app__routers__agent_api__FinalSpecResponse":{"properties":{"content_markdown":{"type":"string","title":"Content Markdown"},"content_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Content Json"},"generated_at":{"type":"string","format":"date-time","title":"Generated At"}},"type":"object","required":["content_markdown","generated_at"],"title":"FinalSpecResponse","description":"Response for final spec endpoint."},"app__routers__agent_api__ModuleResponse":{"properties":{"id":{"type":"string","title":"Id"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"features":{"items":{"$ref":"#/components/schemas/app__routers__agent_api__FeatureResponse"},"type":"array","title":"Features"}},"type":"object","required":["id","title","features"],"title":"ModuleResponse","description":"Module with nested features for agent consumption."},"app__routers__conversations__ProjectChatListItem":{"properties":{"id":{"type":"string","title":"Id"},"chat_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chat Title"},"visibility":{"type":"string","title":"Visibility"},"short_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Short Id"},"url_identifier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url Identifier"},"created_at":{"type":"string","title":"Created At"},"updated_at":{"type":"string","title":"Updated At"},"is_readonly":{"type":"boolean","title":"Is Readonly"},"message_count":{"type":"integer","title":"Message Count"},"last_message_preview":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Message Preview"}},"type":"object","required":["id","chat_title","visibility","short_id","url_identifier","created_at","updated_at","is_readonly","message_count","last_message_preview"],"title":"ProjectChatListItem","description":"List item for project chat sidebar."},"app__routers__conversations__ProjectChatListResponse":{"properties":{"conversations":{"items":{"$ref":"#/components/schemas/app__routers__conversations__ProjectChatListItem"},"type":"array","title":"Conversations"},"total":{"type":"integer","title":"Total"},"has_more":{"type":"boolean","title":"Has More"}},"type":"object","required":["conversations","total","has_more"],"title":"ProjectChatListResponse","description":"Response for listing project chats."},"app__routers__conversations__SendMessageRequest":{"properties":{"content":{"type":"string","minLength":1,"title":"Content","description":"Message content"},"images":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Images","description":"Image attachments"}},"type":"object","required":["content"],"title":"SendMessageRequest","description":"Request to send a message in a conversation."},"app__routers__conversations__SendMessageResponse":{"properties":{"item":{"additionalProperties":true,"type":"object","title":"Item"},"job_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Job Id"}},"type":"object","required":["item"],"title":"SendMessageResponse","description":"Response after sending a message."},"app__routers__conversations__UpdateVisibilityRequest":{"properties":{"visibility":{"type":"string","title":"Visibility","description":"'private' or 'team'"}},"type":"object","required":["visibility"],"title":"UpdateVisibilityRequest","description":"Request to update conversation visibility."},"app__routers__images__ImageUrlResponse":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"ImageUrlResponse","description":"Response with S3 pre-signed URL."},"app__routers__project_chat_images__ImageUploadResponse":{"properties":{"id":{"type":"string","title":"Id"},"s3_key":{"type":"string","title":"S3 Key"},"filename":{"type":"string","title":"Filename"},"content_type":{"type":"string","title":"Content Type"},"size_bytes":{"type":"integer","title":"Size Bytes"},"width":{"type":"integer","title":"Width"},"height":{"type":"integer","title":"Height"},"thumbnail_s3_key":{"type":"string","title":"Thumbnail S3 Key"},"thumbnail_url":{"type":"string","title":"Thumbnail Url"}},"type":"object","required":["id","s3_key","filename","content_type","size_bytes","width","height","thumbnail_s3_key","thumbnail_url"],"title":"ImageUploadResponse","description":"Response from image upload."},"app__routers__project_chat_images__ImageUrlResponse":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"ImageUrlResponse","description":"Response with signed image URL."},"app__routers__project_chats__TypingIndicatorRequest":{"properties":{"typing":{"type":"boolean","title":"Typing","description":"True if user started typing, False if stopped"}},"type":"object","required":["typing"],"title":"TypingIndicatorRequest","description":"Schema for typing indicator request."},"app__routers__thread_images__ImageUrlResponse":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"ImageUrlResponse","description":"Response with signed image URL."},"app__schemas__auth__OrgMembershipResponse":{"properties":{"org_id":{"type":"string","format":"uuid","title":"Org Id","description":"Organization ID (internal UUID for API calls)"},"org_name":{"type":"string","title":"Org Name","description":"Organization name"},"role":{"type":"string","title":"Role","description":"User's role in this organization"},"organization_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Id","description":"External SSO provider organization ID (e.g., Scalekit org ID)"}},"type":"object","required":["org_id","org_name","role"],"title":"OrgMembershipResponse","description":"Schema for org membership in user's org list."},"app__schemas__feature__FeatureCreate":{"properties":{"title":{"type":"string","maxLength":255,"minLength":1,"title":"Title"},"provenance":{"$ref":"#/components/schemas/FeatureProvenance","default":"user"},"feature_type":{"$ref":"#/components/schemas/FeatureType","default":"implementation"},"priority":{"$ref":"#/components/schemas/FeaturePriority","default":"important"},"category":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Category"}},"type":"object","required":["title"],"title":"FeatureCreate","description":"Schema for creating a feature."},"app__schemas__feature__FeatureResponse":{"properties":{"id":{"type":"string","title":"Id"},"module_id":{"type":"string","title":"Module Id"},"feature_key":{"type":"string","title":"Feature Key"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"description_image_attachments":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Description Image Attachments"},"spec_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Spec Text"},"prompt_plan_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prompt Plan Text"},"implementation_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Implementation Notes"},"priority":{"$ref":"#/components/schemas/FeaturePriority"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"provenance":{"$ref":"#/components/schemas/FeatureProvenance"},"feature_type":{"$ref":"#/components/schemas/FeatureType"},"status":{"$ref":"#/components/schemas/FeatureStatus"},"created_by":{"type":"string","title":"Created By"},"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"},"completion_status":{"$ref":"#/components/schemas/FeatureCompletionStatus","default":"pending"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"completed_by_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed By Id"},"external_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Provider"},"external_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Id"},"external_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Url"},"external_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Status"},"external_state_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External State Category"},"external_author":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"External Author"},"external_labels":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"External Labels"},"external_imported_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"External Imported At"},"short_id":{"type":"string","title":"Short Id"},"url_identifier":{"type":"string","title":"Url Identifier"}},"type":"object","required":["id","module_id","feature_key","title","priority","provenance","feature_type","status","created_by","created_at","updated_at","short_id","url_identifier"],"title":"FeatureResponse","description":"Schema for feature response."},"app__schemas__final_version__FinalPromptPlanResponse":{"properties":{"id":{"type":"string","title":"Id"},"brainstorming_phase_id":{"type":"string","title":"Brainstorming Phase Id"},"content_markdown":{"type":"string","title":"Content Markdown"},"content_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Content Json"},"generated_from_version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Generated From Version Id"},"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"created_by":{"type":"string","title":"Created By"}},"type":"object","required":["id","brainstorming_phase_id","content_markdown","generated_at","created_by"],"title":"FinalPromptPlanResponse","description":"Schema for final prompt plan response."},"app__schemas__final_version__FinalSpecResponse":{"properties":{"id":{"type":"string","title":"Id"},"brainstorming_phase_id":{"type":"string","title":"Brainstorming Phase Id"},"content_markdown":{"type":"string","title":"Content Markdown"},"content_json":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Content Json"},"generated_from_version_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Generated From Version Id"},"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"created_by":{"type":"string","title":"Created By"}},"type":"object","required":["id","brainstorming_phase_id","content_markdown","generated_at","created_by"],"title":"FinalSpecResponse","description":"Schema for final spec response."},"app__schemas__invitation__GroupSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"GroupSummary","description":"Schema for group summary in invitation response."},"app__schemas__module__ModuleResponse":{"properties":{"id":{"type":"string","title":"Id"},"project_id":{"type":"string","title":"Project Id"},"brainstorming_phase_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Brainstorming Phase Id"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"provenance":{"$ref":"#/components/schemas/ModuleProvenance"},"module_type":{"$ref":"#/components/schemas/ModuleType"},"order_index":{"type":"integer","title":"Order Index"},"module_key":{"type":"string","title":"Module Key"},"module_key_number":{"type":"integer","title":"Module Key Number"},"created_by":{"type":"string","title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At"},"short_id":{"type":"string","title":"Short Id"},"url_identifier":{"type":"string","title":"Url Identifier"}},"type":"object","required":["id","project_id","title","provenance","module_type","order_index","module_key","module_key_number","created_by","created_at","short_id","url_identifier"],"title":"ModuleResponse","description":"Schema for module response."},"app__schemas__org__OrgMembershipResponse":{"properties":{"org":{"$ref":"#/components/schemas/OrgResponse","description":"Organization details"},"role":{"type":"string","title":"Role","description":"User's role in the organization (owner, admin, member, viewer)"}},"type":"object","required":["org","role"],"title":"OrgMembershipResponse","description":"Schema for organization membership response with org details and role."},"app__schemas__project__FeatureCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"short_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Short Description"},"idea_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idea Text"},"key":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Key"}},"type":"object","required":["name"],"title":"FeatureCreate","description":"Schema for creating a feature project."},"app__schemas__project_chat__ProjectChatListItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"chat_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Chat Title"},"proposed_title":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposed Title"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"created_phase_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created Phase Id"},"message_count":{"type":"integer","title":"Message Count","default":0},"created_feature_count":{"type":"integer","title":"Created Feature Count","default":0},"visibility":{"type":"string","title":"Visibility","default":"private"},"short_id":{"type":"string","title":"Short Id"},"url_identifier":{"type":"string","title":"Url Identifier"}},"type":"object","required":["id","created_at","updated_at","short_id","url_identifier"],"title":"ProjectChatListItem","description":"Summary schema for project chat list (sidebar)."},"app__schemas__project_chat__ProjectChatListResponse":{"properties":{"project_chats":{"items":{"$ref":"#/components/schemas/app__schemas__project_chat__ProjectChatListItem"},"type":"array","title":"Project Chats"},"total":{"type":"integer","title":"Total"},"has_more":{"type":"boolean","title":"Has More"}},"type":"object","required":["project_chats","total","has_more"],"title":"ProjectChatListResponse","description":"Paginated list response for project chats."},"app__schemas__project_chat__SendMessageRequest":{"properties":{"content":{"type":"string","maxLength":32000,"minLength":1,"title":"Content"},"images":{"anyOf":[{"items":{"$ref":"#/components/schemas/ImageAttachment"},"type":"array","maxItems":10},{"type":"null"}],"title":"Images"},"mcq_answer":{"anyOf":[{"$ref":"#/components/schemas/MCQAnswerContext"},{"type":"null"}]}},"type":"object","required":["content"],"title":"SendMessageRequest","description":"Request schema for sending a user message."},"app__schemas__project_chat__SendMessageResponse":{"properties":{"job_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Job Id"},"message_id":{"type":"string","format":"uuid","title":"Message Id"}},"type":"object","required":["message_id"],"title":"SendMessageResponse","description":"Response schema for send message endpoint."},"app__schemas__project_chat__UpdateVisibilityRequest":{"properties":{"visibility":{"type":"string","pattern":"^(private|team)$","title":"Visibility","description":"Visibility: 'private' (only creator) or 'team' (all project members)"}},"type":"object","required":["visibility"],"title":"UpdateVisibilityRequest","description":"Request schema for updating project chat visibility."},"app__schemas__project_share__GroupSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"member_count":{"type":"integer","title":"Member Count","default":0}},"type":"object","required":["id","name"],"title":"GroupSummary","description":"Summary of a group for share response."},"app__schemas__project_share__UserSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"}},"type":"object","required":["id","email"],"title":"UserSummary","description":"Summary of a user for share response."},"app__schemas__user_group__UserSummary":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"email":{"type":"string","title":"Email"},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name"}},"type":"object","required":["id","email"],"title":"UserSummary","description":"Summary of a user for group responses."}},"securitySchemes":{"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"/api/v1/auth/login"}}}}}}