{"openapi": "3.1.0", "info": {"title": "CodePress API", "version": "1.0.0", "description": "CodePress Backend API"}, "paths": {"/v1/": {"get": {"operationId": "codepress_api_health_check", "summary": "Health Check", "parameters": [], "responses": {"200": {"description": "OK"}}, "description": "Health check endpoint.", "tags": ["health"]}}, "/v1/me": {"get": {"operationId": "codepress_api_get_current_user", "summary": "Get Current User", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserInfo"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get information about the current authenticated user.", "tags": ["auth"], "security": [{"JWTAuth": []}]}}, "/v1/admin/users": {"get": {"operationId": "codepress_api_list_users", "summary": "List Users", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/UserInfo"}, "title": "Response", "type": "array"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List all users (admin only).", "tags": ["admin"], "security": [{"JWTAuth": []}]}}, "/v1/auth/send-verification-code": {"post": {"operationId": "apps_auth_api_send_verification_code", "summary": "Send Verification Code", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MessageResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Send a 6-digit verification code to email.", "tags": ["auth"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/SendVerificationCodeRequest"}}}, "required": true}}}, "/v1/auth/verify-email": {"post": {"operationId": "apps_auth_api_verify_email", "summary": "Verify Email", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MessageResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Verify email with 6-digit code.", "tags": ["auth"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/EmailVerificationRequest"}}}, "required": true}}}, "/v1/auth/signup": {"post": {"operationId": "apps_auth_api_signup_with_email", "summary": "Signup With Email", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoginResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Sign up with email and password after email verification.", "tags": ["auth"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/EmailSignupRequest"}}}, "required": true}}}, "/v1/auth/jwt/login": {"post": {"operationId": "apps_auth_api_login", "summary": "Login", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoginResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Login with email and password.", "tags": ["auth"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoginRequest"}}}, "required": true}}}, "/v1/auth/logout": {"post": {"operationId": "apps_auth_api_logout", "summary": "Logout", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MessageResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Logout user by blacklisting their current JWT token.", "tags": ["auth"], "security": [{"JWTAuth": []}]}}, "/v1/auth/forgot-password": {"post": {"operationId": "apps_auth_api_forgot_password", "summary": "Forgot Password", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MessageResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "429": {"description": "Too Many Requests", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Request a password reset email.", "tags": ["auth"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ForgotPasswordRequest"}}}, "required": true}}}, "/v1/auth/reset-password": {"post": {"operationId": "apps_auth_api_reset_password", "summary": "Reset Password", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MessageResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Reset password using a valid reset token.", "tags": ["auth"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ResetPasswordRequest"}}}, "required": true}}}, "/v1/auth/me": {"get": {"operationId": "apps_auth_api_get_current_user_profile", "summary": "Get Current User Profile", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserRead"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get the current authenticated user's profile information.", "tags": ["auth"], "security": [{"JWTAuth": []}]}}, "/v1/auth/users/me": {"get": {"operationId": "apps_auth_api_get_users_me", "summary": "Get Users Me", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserRead"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Alias for /me endpoint for FastAPI Users compatibility.", "tags": ["auth"], "security": [{"JWTAuth": []}]}}, "/v1/auth/refresh": {"post": {"operationId": "apps_auth_api_refresh_token", "summary": "Refresh Token", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TokenRefreshResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Refresh a valid JWT token, returning a new token with fresh expiry.\n\nOnly standard-lifetime tokens (login/OAuth) are eligible for refresh.\nShort-lived tokens (e.g. deck viewer tokens) are rejected to prevent\nprivilege escalation via lifetime extension.", "tags": ["auth"], "security": [{"JWTAuth": []}]}}, "/v1/auth/account": {"delete": {"operationId": "apps_auth_api_delete_account", "summary": "Delete Account", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MessageResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Delete the current user's account and revoke their ability to sign in.", "tags": ["auth"], "security": [{"JWTAuth": []}]}}, "/v1/auth/github/authorize-url": {"get": {"operationId": "apps_auth_api_github_authorize_url", "summary": "Github Authorize Url", "parameters": [{"in": "query", "name": "intent", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Intent"}, "required": false}, {"in": "query", "name": "redirect_uri", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Redirect Uri"}, "required": false}, {"in": "query", "name": "return_to", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Return To"}, "required": false}, {"in": "query", "name": "tunnel_url", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Tunnel Url"}, "required": false}, {"in": "query", "name": "preview_origin", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Preview Origin"}, "required": false}, {"in": "query", "name": "oauth_return_to", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Oauth Return To"}, "required": false}, {"in": "query", "name": "existing_account_only", "schema": {"default": false, "title": "Existing Account Only", "type": "boolean"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OAuthAuthorizeUrlResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Generate GitHub OAuth authorization URL.\n\nIf `redirect_uri` is provided (for desktop apps), it will be used instead of\nthe default web callback URL.\n\nIf `tunnel_url` is provided (for tunnel access), after successful OAuth\nthe user will be redirected to that URL with the JWT token. The tunnel_url\nmust be a valid *.codepress.dev HTTPS URL, and ownership will be validated\nbefore redirecting.\n\nIf `preview_origin` is provided (for Vercel preview deployments), the OAuth\ncallback is routed through the backend and then redirects back to the preview\norigin with the JWT token.\n\n`return_to` is deprecated, use `tunnel_url` instead for tunnel authentication.", "tags": ["auth"]}}, "/v1/auth/github/app-install-url": {"get": {"operationId": "apps_auth_api_github_app_install_url", "summary": "Github App Install Url", "parameters": [{"in": "query", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OAuthAuthorizeUrlResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Generate a GitHub App installation URL with signed state.\n\nThe state JWT carries the user_id and organization_id so that after\nthe user installs the GitHub App, the setup callback can automatically\nlink the GitHub org to the CodePress org.", "tags": ["auth"], "security": [{"JWTAuth": []}]}}, "/v1/auth/github/reviewer-app-install-url": {"get": {"operationId": "apps_auth_api_github_reviewer_app_install_url", "summary": "Github Reviewer App Install Url", "parameters": [{"in": "query", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OAuthAuthorizeUrlResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Generate a GitHub reviewer App installation URL with signed state.", "tags": ["auth"], "security": [{"JWTAuth": []}]}}, "/v1/auth/github/app-setup": {"post": {"operationId": "apps_auth_api_github_app_setup_callback", "summary": "Github App Setup Callback", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GitHubAppSetupResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Handle GitHub App post-installation setup.\n\nCalled by the frontend after the user installs the GitHub App and\nis redirected back with installation_id and signed state. Creates\nthe GitHubOrganization, GithubUserOrganizationAccess, and\nOrganizationGitHubLink records.", "tags": ["auth"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/GitHubAppSetupRequest"}}}, "required": true}}}, "/v1/auth/github/callback": {"post": {"operationId": "apps_auth_api_github_callback", "summary": "Github Callback", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoginResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OAuthCallbackErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Handle GitHub OAuth callback.", "tags": ["auth"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/GitHubOAuthCallbackRequest"}}}, "required": true}}}, "/v1/auth/github/callback-redirect": {"get": {"operationId": "apps_auth_api_github_callback_redirect", "summary": "Github Callback Redirect", "parameters": [{"in": "query", "name": "code", "schema": {"title": "Code", "type": "string"}, "required": true}, {"in": "query", "name": "state", "schema": {"title": "State", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK"}}, "description": "Handle GitHub OAuth callback redirect for tunnel and Vercel preview authentication.\n\nThis endpoint is called by GitHub after the user authorizes the app.\nIt validates the state token, exchanges the code for an access token,\ncreates/gets the user, and redirects with the JWT token.\n\nFor tunnel URLs, ownership is validated before redirecting.\nFor Vercel preview origins, the domain is validated and the user is\nredirected to the preview's callback page with the token.", "tags": ["auth"]}}, "/v1/auth/github-profile": {"get": {"operationId": "apps_auth_api_get_github_profile", "summary": "Get Github Profile", "parameters": [{"in": "query", "name": "token", "schema": {"title": "Token", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK"}}, "description": "Get GitHub profile info using the provided access token.", "tags": ["auth"]}}, "/v1/auth/extension-token": {"post": {"operationId": "apps_auth_api_get_extension_token", "summary": "Get Extension Token", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ExtensionTokenResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get a token for the browser extension.", "tags": ["auth"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ExtensionTokenRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/auth/logout-all": {"post": {"operationId": "apps_auth_api_logout_all_devices", "summary": "Logout All Devices", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MessageResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Logout user from all devices by creating a force logout entry.", "tags": ["auth"], "security": [{"JWTAuth": []}]}}, "/v1/auth/apple/authorize-url": {"get": {"operationId": "apps_auth_api_apple_authorize_url", "summary": "Apple Authorize Url", "parameters": [{"in": "query", "name": "redirect_uri", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Redirect Uri"}, "required": false}, {"in": "query", "name": "return_to", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Return To"}, "required": false}, {"in": "query", "name": "tunnel_url", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Tunnel Url"}, "required": false}, {"in": "query", "name": "preview_origin", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Preview Origin"}, "required": false}, {"in": "query", "name": "oauth_return_to", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Oauth Return To"}, "required": false}, {"in": "query", "name": "existing_account_only", "schema": {"default": false, "title": "Existing Account Only", "type": "boolean"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OAuthAuthorizeUrlResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Generate Sign in with Apple authorization URL for web clients.", "tags": ["auth"]}}, "/v1/auth/apple/callback": {"post": {"operationId": "apps_auth_api_apple_callback", "summary": "Apple Callback", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoginResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Handle native and web Sign in with Apple callbacks.", "tags": ["auth"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/AppleOAuthCallbackRequest"}}}, "required": true}}}, "/v1/auth/apple/callback-redirect": {"get": {"operationId": "apps_auth_api_apple_callback_redirect", "summary": "Apple Callback Redirect", "parameters": [{"in": "query", "name": "code", "schema": {"title": "Code", "type": "string"}, "required": true}, {"in": "query", "name": "state", "schema": {"title": "State", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK"}}, "description": "Handle query-based Sign in with Apple callbacks for compatibility.", "tags": ["auth"]}, "post": {"operationId": "apps_auth_api_apple_callback_redirect_form_post", "summary": "Apple Callback Redirect Form Post", "parameters": [], "responses": {"200": {"description": "OK"}}, "description": "Handle Apple's form_post callback for web Sign in with Apple.", "tags": ["auth"]}}, "/v1/auth/google/authorize-url": {"get": {"operationId": "apps_auth_api_google_authorize_url", "summary": "Google Authorize Url", "parameters": [{"in": "query", "name": "redirect_uri", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Redirect Uri"}, "required": false}, {"in": "query", "name": "return_to", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Return To"}, "required": false}, {"in": "query", "name": "tunnel_url", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Tunnel Url"}, "required": false}, {"in": "query", "name": "preview_origin", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Preview Origin"}, "required": false}, {"in": "query", "name": "oauth_return_to", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Oauth Return To"}, "required": false}, {"in": "query", "name": "existing_account_only", "schema": {"default": false, "title": "Existing Account Only", "type": "boolean"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OAuthAuthorizeUrlResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Generate Google OAuth authorization URL.\n\nIf `redirect_uri` is provided (for desktop apps), it will be used instead of\nthe default web callback URL.\n\nIf `tunnel_url` is provided (for tunnel access), after successful OAuth\nthe user will be redirected to that URL with the JWT token. The tunnel_url\nmust be a valid *.codepress.dev HTTPS URL, and ownership will be validated\nbefore redirecting.\n\nIf `preview_origin` is provided (for Vercel preview deployments), the OAuth\ncallback is routed through the backend and then redirects back to the preview\norigin with the JWT token.\n\n`return_to` is deprecated, use `tunnel_url` instead for tunnel authentication.", "tags": ["auth"]}}, "/v1/auth/google/callback": {"post": {"operationId": "apps_auth_api_google_callback", "summary": "Google Callback", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoginResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OAuthCallbackErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Handle Google OAuth callback.", "tags": ["auth"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/GoogleOAuthCallbackRequest"}}}, "required": true}}}, "/v1/auth/google/callback-redirect": {"get": {"operationId": "apps_auth_api_google_callback_redirect", "summary": "Google Callback Redirect", "parameters": [{"in": "query", "name": "code", "schema": {"title": "Code", "type": "string"}, "required": true}, {"in": "query", "name": "state", "schema": {"title": "State", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK"}}, "description": "Handle Google OAuth callback redirect for tunnel and Vercel preview authentication.\n\nThis endpoint is called by Google after the user authorizes the app.\nIt validates the state token, exchanges the code for an access token,\ncreates/gets the user, and redirects with the JWT token.\n\nFor tunnel URLs, ownership is validated before redirecting.\nFor Vercel preview origins, the domain is validated and the user is\nredirected to the preview's callback page with the token.", "tags": ["auth"]}}, "/v1/auth/github/disconnect": {"post": {"operationId": "apps_auth_api_disconnect_github", "summary": "Disconnect personal GitHub account", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MessageResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Remove the user's personal GitHub connection.\n\nOnly allowed when the user has an alternative login method\n(Google OAuth or email/password) so they don't get locked out.", "tags": ["auth"], "security": [{"JWTAuth": []}]}}, "/v1/auth/deck-token": {"post": {"operationId": "apps_auth_api_get_deck_token", "summary": "Get Deck Token", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DeckTokenResponse"}}}}}, "description": "Issue a JWT for anonymous deck viewers. Creates a system user\nif the viewer doesn't exist yet. Rate limited per viewer.", "tags": ["auth"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/DeckTokenRequest"}}}, "required": true}}}, "/v1/auth/recipient-token": {"post": {"operationId": "apps_auth_api_get_recipient_token", "summary": "Get Recipient Token", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RecipientTokenResponse"}}}}}, "description": "Issue a JWT for anonymous viewers of `/for/<slug>` recipient proposal pages.\n\nThe token is bound to a specific proposal ``slug``. Repository-access\nchecks restrict the resulting principal to that slug's allowlisted repo\n(see ``apps.auth.recipient_scope.RECIPIENT_PROPOSAL_REPO_ALLOWLIST``), so\na token issued for one proposal cannot drive sessions against any other\nrepo. Identity is server-minted and never accepted from the client\nunless it matches an existing row for the same slug; this prevents\nvisitors of the same page from sharing or hijacking each other's\nsynthetic principal.", "tags": ["auth"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/RecipientTokenRequest"}}}, "required": true}}}, "/v1/organizations/onboarding": {"post": {"operationId": "apps_organizations_api_create_organization_onboarding", "summary": "Create Organization Onboarding", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrganizationResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Create organization during onboarding flow.", "tags": ["organizations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateOrganizationRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/organizations/{org_id}/setup-status": {"get": {"operationId": "apps_organizations_api_get_org_setup_status", "summary": "Get Org Setup Status", "parameters": [{"in": "path", "name": "org_id", "schema": {"format": "uuid", "title": "Org Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrgSetupStatusResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Check if org provisioning (Redis ACL user) is complete.", "tags": ["organizations"], "security": [{"JWTAuth": []}]}}, "/v1/organizations/{org_id}/onboarding-paths": {"post": {"operationId": "apps_organizations_api_save_onboarding_paths", "summary": "Save Onboarding Paths", "parameters": [{"in": "path", "name": "org_id", "schema": {"format": "uuid", "title": "Org Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SaveOnboardingPathsResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Save onboarding path selections for the user's membership.", "tags": ["organizations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/SaveOnboardingPathsRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/organizations": {"post": {"operationId": "apps_organizations_api_create_organization", "summary": "Create Organization", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrganizationResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Create a new organization.", "tags": ["organizations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateOrganizationRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}, "get": {"operationId": "apps_organizations_api_get_user_organizations", "summary": "Get User Organizations", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/OrganizationMembershipResponse"}, "title": "Response", "type": "array"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get all organizations the current user belongs to.", "tags": ["organizations"], "security": [{"JWTAuth": []}]}}, "/v1/organizations/reorder": {"put": {"operationId": "apps_organizations_api_reorder_organizations", "summary": "Reorder Organizations", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MessageResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Reorder the current user's organization list.", "tags": ["organizations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ReorderOrganizationsRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/organizations/{organization_id}": {"put": {"operationId": "apps_organizations_api_update_organization", "summary": "Update Organization", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrganizationResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Update an organization.", "tags": ["organizations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateOrganizationRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}, "get": {"operationId": "apps_organizations_api_get_organization_detail", "summary": "Get Organization Detail", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrganizationDetailResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get detailed information about an organization.", "tags": ["organizations"], "security": [{"JWTAuth": []}]}}, "/v1/organizations/members/search": {"get": {"operationId": "apps_organizations_api_search_members", "summary": "Search Members", "parameters": [{"in": "query", "name": "q", "schema": {"title": "Q", "type": "string"}, "required": true}, {"in": "query", "name": "limit", "schema": {"default": 10, "title": "Limit", "type": "integer"}, "required": false}, {"in": "query", "name": "organization_id", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Organization Id"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/MemberSearchResult"}, "title": "Response", "type": "array"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Search organization members by name, email, or GitHub username.", "tags": ["organizations"], "security": [{"JWTAuth": []}]}}, "/v1/organizations/{organization_id}/invite": {"post": {"operationId": "apps_organizations_api_invite_user", "summary": "Invite User", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK"}}, "description": "Invite user(s) to an organization. Supports single and bulk payloads.", "tags": ["organizations"], "requestBody": {"content": {"application/json": {"schema": {"anyOf": [{"$ref": "#/components/schemas/InviteUserRequest"}, {"$ref": "#/components/schemas/BulkInviteRequest"}], "title": "Payload"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/organizations/{organization_id}/members/{user_id}/role": {"put": {"operationId": "apps_organizations_api_update_member_role", "summary": "Update Member Role", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}, {"in": "path", "name": "user_id", "schema": {"format": "uuid", "title": "User Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrganizationMemberResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Update a member's role in an organization.", "tags": ["organizations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateMemberRoleRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/organizations/{organization_id}/members/{user_id}": {"delete": {"operationId": "apps_organizations_api_remove_member", "summary": "Remove Member", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}, {"in": "path", "name": "user_id", "schema": {"format": "uuid", "title": "User Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK"}}, "description": "Remove a member from an organization.", "tags": ["organizations"], "security": [{"JWTAuth": []}]}}, "/v1/organizations/{organization_id}/invitations/{invitation_id}": {"delete": {"operationId": "apps_organizations_api_cancel_invitation", "summary": "Cancel Invitation", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}, {"in": "path", "name": "invitation_id", "schema": {"format": "uuid", "title": "Invitation Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK"}}, "description": "Cancel a pending organization invitation.", "tags": ["organizations"], "security": [{"JWTAuth": []}]}}, "/v1/organizations/invitations/accept": {"post": {"operationId": "apps_organizations_api_accept_invitation", "summary": "Accept Invitation", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AcceptInvitationResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Accept an organization invitation.", "tags": ["organizations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/AcceptInvitationRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/organizations/invitations/pending": {"get": {"operationId": "apps_organizations_api_get_pending_invitations", "summary": "Get Pending Invitations", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/OrganizationInvitationResponse"}, "title": "Response", "type": "array"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get pending invitations for the current user.", "tags": ["organizations"], "security": [{"JWTAuth": []}]}}, "/v1/organizations/invitations/{invitation_id}": {"get": {"operationId": "apps_organizations_api_get_invitation_details", "summary": "Get Invitation Details", "parameters": [{"in": "path", "name": "invitation_id", "schema": {"format": "uuid", "title": "Invitation Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrganizationInvitationResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get invitation details by ID (public endpoint for invitation links).", "tags": ["organizations"]}}, "/v1/organizations/github/available": {"get": {"operationId": "apps_organizations_api_get_available_github_organizations", "summary": "Get Available Github Organizations", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/GitHubOrganizationResponse"}, "title": "Response", "type": "array"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get GitHub organizations available for linking.", "tags": ["organizations"], "security": [{"JWTAuth": []}]}}, "/v1/organizations/{organization_id}/github-status": {"get": {"operationId": "apps_organizations_api_get_github_status", "summary": "Get Github Status", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GitHubStatusResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get GitHub integration status for an organization.", "tags": ["organizations"], "security": [{"JWTAuth": []}]}}, "/v1/organizations/{organization_id}/link-github": {"post": {"operationId": "apps_organizations_api_link_github_organization", "summary": "Link Github Organization", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrganizationResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Link a GitHub organization to this organization.", "tags": ["organizations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/LinkGitHubOrganizationRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/organizations/{organization_id}/unlink-github/{github_org_id}": {"post": {"operationId": "apps_organizations_api_unlink_github_organization", "summary": "Unlink Github Organization", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}, {"in": "path", "name": "github_org_id", "schema": {"title": "Github Org Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrganizationResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Unlink a GitHub organization from this organization.", "tags": ["organizations"], "security": [{"JWTAuth": []}]}}, "/v1/organizations/{organization_id}/connected-repositories": {"get": {"operationId": "apps_organizations_api_get_connected_repositories", "summary": "Get Connected Repositories", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ConnectedRepositoriesResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get repositories connected to this organization (DB only, no GitHub API call).", "tags": ["organizations"], "security": [{"JWTAuth": []}]}}, "/v1/organizations/{organization_id}/app-design-guide": {"get": {"operationId": "apps_organizations_api_get_app_design_guide_status", "summary": "Get App Design Guide Status", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AppDesignGuideStatusResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Return the generated App design guide setup/readiness status.", "tags": ["organizations"], "security": [{"JWTAuth": []}]}}, "/v1/organizations/{organization_id}/app-design-guide/sync": {"post": {"operationId": "apps_organizations_api_sync_app_design_guide", "summary": "Sync App Design Guide", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AppDesignGuideStatusResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Sync the managed App DESIGN.md from the selected source repos.", "tags": ["organizations"], "security": [{"JWTAuth": []}]}}, "/v1/organizations/{organization_id}/repositories/{repository_id}/design-source": {"patch": {"operationId": "apps_organizations_api_update_repository_design_source", "summary": "Update Repository Design Source", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}, {"in": "path", "name": "repository_id", "schema": {"title": "Repository Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AppDesignGuideStatusResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Choose whether a connected repo should supply generated App design guidance.", "tags": ["organizations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateRepositoryDesignSourceRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/organizations/{organization_id}/available-repositories": {"get": {"operationId": "apps_organizations_api_get_available_repositories", "summary": "Get Available Repositories", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}, {"in": "query", "name": "page", "schema": {"default": 1, "title": "Page", "type": "integer"}, "required": false}, {"in": "query", "name": "per_page", "schema": {"default": 30, "title": "Per Page", "type": "integer"}, "required": false}, {"in": "query", "name": "search", "schema": {"default": "", "title": "Search", "type": "string"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AvailableRepositoriesResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get repositories the user has access to with server-side pagination and search.", "tags": ["organizations"], "security": [{"JWTAuth": []}]}}, "/v1/organizations/{organization_id}/repositories/add": {"post": {"operationId": "apps_organizations_api_add_repository_to_installation", "summary": "Add Repository To Installation", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AddRepositoryResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Connect a repository to this CodePress organization.", "tags": ["organizations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/AddRepositoryRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/organizations/{organization_id}/repositories/{repository_id}": {"delete": {"operationId": "apps_organizations_api_remove_repository_from_installation", "summary": "Remove Repository From Installation", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}, {"in": "path", "name": "repository_id", "schema": {"title": "Repository Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RemoveRepositoryResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Disconnect a repository from this CodePress organization.", "tags": ["organizations"], "security": [{"JWTAuth": []}]}}, "/v1/organizations/internal/bootstrap-skill": {"post": {"operationId": "apps_organizations_api_trigger_bootstrap_skill", "summary": "Trigger Bootstrap Skill", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BootstrapSkillResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Internal endpoint to dispatch a skill bootstrap agent session.\n\nCalled by the Celery bootstrap_repo_skill_task because start_session()\nrequires async Redis connections that aren't available in Celery's\nforked worker context.", "tags": ["organizations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/BootstrapSkillRequest"}}}, "required": true}}}, "/v1/organizations/internal/auto-document": {"post": {"operationId": "apps_organizations_api_trigger_auto_document", "summary": "Trigger Auto Document", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AutoDocResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Internal endpoint to dispatch an auto-document agent session.\n\nCalled by Celery setup_auto_document_task and the GitHub push handler\nbecause start_session() requires async Redis connections that aren't\navailable in Celery's forked worker context.", "tags": ["organizations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/AutoDocRequest"}}}, "required": true}}}, "/v1/organizations/{organization_id}/repositories/{repository_id}/trigger": {"post": {"operationId": "apps_organizations_api_trigger_repo_action", "summary": "Trigger Repo Action", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}, {"in": "path", "name": "repository_id", "schema": {"title": "Repository Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TriggerRepoActionResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Trigger a repo setup action.\n\nActions: ``dep_install``, ``bootstrap_skills``, ``refresh_style_analysis``,\n``build_microvm_image``. Allows re-running setup steps \u2014 or kicking a MicroVM\nimage build \u2014 without removing and re-adding the repo or starting a claim.", "tags": ["organizations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/TriggerRepoActionRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/organizations/{organization_id}/dev-server-setup": {"post": {"operationId": "apps_organizations_api_trigger_dev_server_setup", "summary": "Trigger Dev Server Setup", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DevServerSetupResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Dispatch the dev_server bootstrap (frontend discovery + recipe/Dockerfiles).\n\nOn-demand counterpart to the ``backfill_dev_server_setup`` management command:\nre-run the connect-time discovery for an already-connected repo (or every\nconnected repo) so the committed ``.codepress/dev-server/recipe.json`` and\nper-repo dev Dockerfiles can be refreshed.\n\nThe Celery ``bootstrap_repo_skill_task`` owns the real dedup (for dev_server\nit skips fresh RUNNING|PENDING runs and same-commit CONVERGENT runs \u2014 any\nstructured outcome pinned to the current head SHA \u2014 and retries FAILED /\nSKIPPED / stale / old-SHA / null-outcome rows). ``force`` re-runs even a\nsame-commit convergent run by SUPERSEDING the prior terminal/stale dev_server\n``SkillBootstrapRun`` rows first (stamping ``superseded_at`` rather than\ndeleting them, so the historical commit-scoped outcome audit trail survives).\nEvery dedup / terminal / budget query excludes superseded rows, so a\nsuperseded terminal run no longer blocks the fresh dispatch. ``force`` still\nskips a repo whose bootstrap is genuinely in flight (PENDING or fresh RUNNING)\nrather than superseding that row out from under its live agent. We never\nmodify the task's dedup logic.", "tags": ["organizations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/DevServerSetupRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/organizations/{organization_id}/settings": {"get": {"operationId": "apps_organizations_api_get_organization_settings", "summary": "Get Organization Settings", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrganizationSettingsResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get organization settings.", "tags": ["organizations"], "security": [{"JWTAuth": []}]}, "patch": {"operationId": "apps_organizations_api_update_organization_settings", "summary": "Update Organization Settings", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrganizationSettingsResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Update organization settings. Requires admin access.", "tags": ["organizations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateOrganizationSettingsRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/organizations/{organization_id}/feature-flag-access": {"post": {"operationId": "apps_organizations_api_set_organization_feature_flag_access", "summary": "Set Organization Feature Flag Access", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrganizationSettingsResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Grant or revoke an organization's access to the in-app feature-flags panel.\n\nInternal-only and cross-org: any internal user may set this for ANY org,\nwithout org membership or admin role (unlike the admin-gated settings PATCH).\nThis is how internal staff allow specific organizations to use feature flags.", "tags": ["organizations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/SetFeatureFlagAccessRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/organizations/{organization_id}/usage-billing-overrides": {"post": {"operationId": "apps_organizations_api_set_organization_usage_billing_overrides", "summary": "Set Organization Usage Billing Overrides", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrganizationSettingsResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Set organization usage billing controls without changing entitlement.\n\nInternal-only and cross-org. Changes apply to model usage recorded and\nagent workers launched after this write; immutable usage/launch snapshots\nprevent retroactive billing changes.", "tags": ["organizations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/SetUsageBillingOverridesRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/organizations/{organization_id}/agent-capacity-access": {"post": {"operationId": "apps_organizations_api_set_organization_agent_capacity_access", "summary": "Set Organization Agent Capacity Access", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentCapacityReservationResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Enable or disable self-service reservations for an organization.\n\nInternal-only and cross-org: this audited circuit breaker can stop nonzero\nreservation writes for a specific organization without weakening the paid-plan,\nStripe, or oversell checks. Disabling does not release an existing reservation \u2014\nrelease stays available to org admins regardless of the flag.", "tags": ["organizations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/SetAgentCapacityAccessRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/organizations/{organization_id}/agent-capacity": {"get": {"operationId": "apps_organizations_api_get_agent_capacity_reservation", "summary": "Get Agent Capacity Reservation", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentCapacityReservationResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get agent capacity pricing, workload recommendation, and saved reservation.", "tags": ["organizations"], "security": [{"JWTAuth": []}]}, "patch": {"operationId": "apps_organizations_api_update_agent_capacity_reservation", "summary": "Update Agent Capacity Reservation", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentCapacityReservationResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Update reserved agent capacity. Requires admin access.", "tags": ["organizations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateAgentCapacityReservationRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/organizations/{organization_id}/agent-intelligence-preferences": {"get": {"operationId": "apps_organizations_api_get_agent_intelligence_preferences", "summary": "Get Agent Intelligence Preferences", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentIntelligencePreferencesResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get the current user's effective agent model defaults.", "tags": ["organizations"], "security": [{"JWTAuth": []}]}, "patch": {"operationId": "apps_organizations_api_update_agent_intelligence_preferences", "summary": "Update Agent Intelligence Preferences", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentIntelligencePreferencesResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Update the current user's agent preferences for this organization.", "tags": ["organizations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateAgentIntelligencePreferenceRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/organizations/{organization_id}/openrouter-models": {"get": {"operationId": "apps_organizations_api_list_openrouter_models", "summary": "List Openrouter Models", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}, {"in": "query", "name": "query", "schema": {"default": "", "title": "Query", "type": "string"}, "required": false}, {"in": "query", "name": "limit", "schema": {"default": 50, "title": "Limit", "type": "integer"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OpenRouterModelsResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Return curated and searchable OpenRouter models through the backend.", "tags": ["organizations"], "security": [{"JWTAuth": []}]}}, "/v1/organizations/{organization_id}/avatar": {"post": {"operationId": "apps_organizations_api_upload_organization_avatar", "summary": "Upload Organization Avatar", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrganizationResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Upload an avatar image for the organization.", "tags": ["organizations"], "requestBody": {"content": {"multipart/form-data": {"schema": {"properties": {"file": {"format": "binary", "title": "File", "type": "string"}}, "required": ["file"], "title": "FileParams", "type": "object"}}}, "required": true}, "security": [{"JWTAuth": []}]}, "delete": {"operationId": "apps_organizations_api_delete_organization_avatar", "summary": "Delete Organization Avatar", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrganizationResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Remove the organization avatar.", "tags": ["organizations"], "security": [{"JWTAuth": []}]}}, "/v1/organizations/{organization_id}/provider-keys": {"put": {"operationId": "apps_organizations_api_set_provider_api_key", "summary": "Set Provider Api Key", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ProviderApiKeyResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Set (create or update) a provider API key for the org. Admin+ only.", "tags": ["organizations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/SetProviderApiKeyRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}, "get": {"operationId": "apps_organizations_api_list_provider_api_keys", "summary": "List Provider Api Keys", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ProviderApiKeyListResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List configured provider API keys (values are never returned). Admin+ only.", "tags": ["organizations"], "security": [{"JWTAuth": []}]}}, "/v1/organizations/{organization_id}/provider-keys/refresh-usage": {"post": {"operationId": "apps_organizations_api_refresh_provider_api_key_usage", "summary": "Refresh Provider Api Key Usage", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}, {"in": "query", "name": "force", "schema": {"default": false, "title": "Force", "type": "boolean"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ProviderApiKeyListResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "429": {"description": "Too Many Requests", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Refresh live usage for the organization's pooled OAuth subscriptions.\n\n``force=true`` bypasses the per-credential refresh cooldown (manual refresh\nbutton) and is throttled per user instead.", "tags": ["organizations"], "security": [{"JWTAuth": []}]}}, "/v1/organizations/{organization_id}/provider-keys/{provider}": {"delete": {"operationId": "apps_organizations_api_delete_provider_api_key", "summary": "Delete Provider Api Key", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}, {"in": "path", "name": "provider", "schema": {"title": "Provider", "type": "string"}, "required": true}, {"in": "query", "name": "credential_id", "schema": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Credential Id"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MessageResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Delete provider API key(s) for the org. Admin+ only.\n\nWithout ``credential_id`` every credential for the provider at org scope\nis removed; with it, only that pooled entry is removed.", "tags": ["organizations"], "security": [{"JWTAuth": []}]}}, "/v1/organizations/{organization_id}/my-provider-keys": {"put": {"operationId": "apps_organizations_api_set_my_provider_api_key", "summary": "Set My Provider Api Key", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ProviderApiKeyResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Set a provider API key for the current user within this org.", "tags": ["organizations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/SetProviderApiKeyRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}, "get": {"operationId": "apps_organizations_api_list_my_provider_api_keys", "summary": "List My Provider Api Keys", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ProviderApiKeyListResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List the current user's configured provider keys for this org.", "tags": ["organizations"], "security": [{"JWTAuth": []}]}}, "/v1/organizations/{organization_id}/my-provider-keys/refresh-usage": {"post": {"operationId": "apps_organizations_api_refresh_my_provider_api_key_usage", "summary": "Refresh My Provider Api Key Usage", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}, {"in": "query", "name": "force", "schema": {"default": false, "title": "Force", "type": "boolean"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ProviderApiKeyListResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "429": {"description": "Too Many Requests", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Refresh live usage for the current user's pooled OAuth subscriptions.\n\n``force=true`` bypasses the per-credential refresh cooldown (manual refresh\nbutton) and is throttled per user instead.", "tags": ["organizations"], "security": [{"JWTAuth": []}]}}, "/v1/organizations/{organization_id}/my-provider-keys/{provider}": {"delete": {"operationId": "apps_organizations_api_delete_my_provider_api_key", "summary": "Delete My Provider Api Key", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}, {"in": "path", "name": "provider", "schema": {"title": "Provider", "type": "string"}, "required": true}, {"in": "query", "name": "credential_id", "schema": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Credential Id"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MessageResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Delete the current user's provider API key(s) for this org.\n\nWithout ``credential_id`` every credential for the provider at user scope\nis removed; with it, only that pooled entry is removed.", "tags": ["organizations"], "security": [{"JWTAuth": []}]}}, "/v1/organizations/{organization_id}/provider-keys/openai/oauth/start": {"post": {"operationId": "apps_organizations_api_start_openai_oauth", "summary": "Start Openai Oauth", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OpenAIOAuthStartResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Generate an OpenAI OAuth authorization URL for ChatGPT login (Codex BYOK).", "tags": ["organizations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/OpenAIOAuthStartRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/organizations/{organization_id}/provider-keys/openai/oauth/exchange": {"post": {"operationId": "apps_organizations_api_exchange_openai_oauth", "summary": "Exchange Openai Oauth", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ProviderApiKeyResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Exchange an OpenAI OAuth authorization code for tokens and store as BYOK credential.", "tags": ["organizations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/OpenAIOAuthExchangeRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/organizations/{organization_id}/provider-keys/openai/device-auth/start": {"post": {"operationId": "apps_organizations_api_start_device_auth", "summary": "Start Device Auth", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}, {"in": "query", "name": "scope", "schema": {"default": "org", "title": "Scope", "type": "string"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DeviceAuthStartResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Launch an ECS container to run codex login --device-auth.", "tags": ["organizations"], "security": [{"JWTAuth": []}]}}, "/v1/organizations/{organization_id}/provider-keys/openai/device-auth/poll": {"post": {"operationId": "apps_organizations_api_poll_device_auth", "summary": "Poll Device Auth", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DeviceAuthPollResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Poll device auth status. Returns code, then tokens when user completes auth.", "tags": ["organizations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/DeviceAuthPollRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/organizations/{organization_id}/teams": {"get": {"operationId": "apps_organizations_teams_api_list_teams", "summary": "List Teams", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/TeamResponse"}, "title": "Response", "type": "array"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List teams in the organization. Requires org membership.", "tags": ["teams"], "security": [{"JWTAuth": []}]}, "post": {"operationId": "apps_organizations_teams_api_create_team_endpoint", "summary": "Create Team Endpoint", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateTeamResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Create a new team. Requires org admin/owner.", "tags": ["teams"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateTeamRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/organizations/{organization_id}/teams/{team_id}/members": {"get": {"operationId": "apps_organizations_teams_api_list_team_members", "summary": "List Team Members", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}, {"in": "path", "name": "team_id", "schema": {"format": "uuid", "title": "Team Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/TeamMemberResponse"}, "title": "Response", "type": "array"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List members of a team. Any org member may call.", "tags": ["teams"], "security": [{"JWTAuth": []}]}, "post": {"operationId": "apps_organizations_teams_api_add_team_member_endpoint", "summary": "Add Team Member Endpoint", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}, {"in": "path", "name": "team_id", "schema": {"format": "uuid", "title": "Team Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AddTeamMemberResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Add a user to a team. Requires team lead or org admin.", "tags": ["teams"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/AddTeamMemberRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/organizations/{organization_id}/teams/{team_id}/members/{user_id}": {"delete": {"operationId": "apps_organizations_teams_api_remove_team_member_endpoint", "summary": "Remove Team Member Endpoint", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}, {"in": "path", "name": "team_id", "schema": {"format": "uuid", "title": "Team Id", "type": "string"}, "required": true}, {"in": "path", "name": "user_id", "schema": {"format": "uuid", "title": "User Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RemoveTeamMemberResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Remove a user from a team. Requires team lead or org admin.", "tags": ["teams"], "security": [{"JWTAuth": []}]}}, "/v1/organizations/{organization_id}/members/{target_user_id}/manager": {"put": {"operationId": "apps_organizations_teams_api_set_manager_endpoint", "summary": "Set Manager Endpoint", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}, {"in": "path", "name": "target_user_id", "schema": {"format": "uuid", "title": "Target User Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SetManagerResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Set (or clear) the manager of a target user within the organization.", "tags": ["teams"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/SetManagerRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/organizations/{organization_id}/my-reports": {"get": {"operationId": "apps_organizations_teams_api_list_my_reports", "summary": "List My Reports", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/ReportResponse"}, "title": "Response", "type": "array"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Return the caller's direct + transitive reports in the org.", "tags": ["teams"], "security": [{"JWTAuth": []}]}}, "/v1/organizations/{organization_id}/my-scope": {"get": {"operationId": "apps_organizations_teams_api_list_my_scope", "summary": "List My Scope", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/ScopeEntryResponse"}, "title": "Response", "type": "array"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Return the caller's full delegation scope.\n\nFor org admins/owners this is every org member (``source=\"admin\"``),\nmatching the unlimited-scope short-circuit in\n``assert_grantor_ceiling``. For everyone else it is the union of\ntransitive reports (``source=\"report\"``) and members of led teams\n(``source=\"team_member\"``).", "tags": ["teams"], "security": [{"JWTAuth": []}]}}, "/v1/organizations/{organization_id}/audit-events": {"get": {"operationId": "apps_audit_api_list_organization_audit_events", "summary": "List Organization Audit Events", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}, {"in": "query", "name": "limit", "schema": {"default": 50, "maximum": 100, "minimum": 1, "title": "Limit", "type": "integer"}, "required": false}, {"in": "query", "name": "offset", "schema": {"default": 0, "minimum": 0, "title": "Offset", "type": "integer"}, "required": false}, {"in": "query", "name": "sort", "schema": {"default": "-created_at", "title": "Sort", "type": "string"}, "required": false}, {"in": "query", "name": "action", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Action"}, "required": false}, {"in": "query", "name": "source", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Source"}, "required": false}, {"in": "query", "name": "event_kind", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Event Kind"}, "required": false}, {"in": "query", "name": "resource_type", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Resource Type"}, "required": false}, {"in": "query", "name": "resource_id", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Resource Id"}, "required": false}, {"in": "query", "name": "actor_user_id", "schema": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Actor User Id"}, "required": false}, {"in": "query", "name": "q", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Q"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrganizationAuditEventListSchema"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["audit"], "security": [{"JWTAuth": []}]}}, "/v1/github": {"post": {"operationId": "apps_github_api_create_repository", "summary": "Create Repository", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GitHubRepositoryRead"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Create a new GitHub repository record.", "tags": ["github"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/GitHubRepositoryCreate"}}}, "required": true}, "security": [{"JWTAuth": []}]}, "get": {"operationId": "apps_github_api_get_repositories", "summary": "Get Repositories", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/GitHubRepositoryRead"}, "title": "Response", "type": "array"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get all repositories for the current user.", "tags": ["github"], "security": [{"JWTAuth": []}]}}, "/v1/github/check-access": {"post": {"operationId": "apps_github_api_check_repository_access_endpoint", "summary": "Check Repository Access Endpoint", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GitHubRepositoryAccessResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Check if the current user has access to a specific GitHub repository.", "tags": ["github"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/GitHubRepositoryAccessRequest"}}}, "required": true}, "security": [{"OptionalJWTAuth": []}]}}, "/v1/github/repositories/files/search": {"get": {"operationId": "apps_github_api_search_repository_files", "summary": "Search Repository Files", "parameters": [{"in": "query", "name": "repo_full_name", "schema": {"title": "Repo Full Name", "type": "string"}, "required": true}, {"in": "query", "name": "q", "schema": {"default": "", "title": "Q", "type": "string"}, "required": false}, {"in": "query", "name": "limit", "schema": {"default": 10, "title": "Limit", "type": "integer"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RepoFileSearchResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Fuzzy-search file paths on a repository's default branch.\n\nPowers the chat @-mention file picker for project-scoped chats. The\nbranch's blob list comes from the GitHub git-trees API and is cached in\nRedis for a few minutes, so results may lag pushes slightly.", "tags": ["github"], "security": [{"JWTAuth": []}]}}, "/v1/github/{repository_id}": {"get": {"operationId": "apps_github_api_get_repository", "summary": "Get Repository", "parameters": [{"in": "path", "name": "repository_id", "schema": {"title": "Repository Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GitHubRepositoryRead"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get a repository by ID.", "tags": ["github"], "security": [{"JWTAuth": []}]}, "put": {"operationId": "apps_github_api_update_repository", "summary": "Update Repository", "parameters": [{"in": "path", "name": "repository_id", "schema": {"title": "Repository Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GitHubRepositoryRead"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Update a repository by ID.", "tags": ["github"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/GitHubRepositoryUpdate"}}}, "required": true}, "security": [{"JWTAuth": []}]}, "delete": {"operationId": "apps_github_api_delete_repository", "summary": "Delete Repository", "parameters": [{"in": "path", "name": "repository_id", "schema": {"title": "Repository Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SuccessMessageResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Delete a repository by ID.", "tags": ["github"], "security": [{"JWTAuth": []}]}}, "/v1/github/by-name/{owner}/{repo}": {"get": {"operationId": "apps_github_api_get_repository_by_name", "summary": "Get Repository By Name", "parameters": [{"in": "path", "name": "owner", "schema": {"title": "Owner", "type": "string"}, "required": true}, {"in": "path", "name": "repo", "schema": {"title": "Repo", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GitHubRepositoryRead"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get a repository by owner and name.", "tags": ["github"], "security": [{"JWTAuth": []}]}}, "/v1/github/organizations/with-repositories": {"get": {"operationId": "apps_github_api_get_organizations_with_repositories", "summary": "Get Organizations With Repositories", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/GitHubOrganizationWithRepos"}, "title": "Response", "type": "array"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get all GitHub organizations the user has access to with their repositories.", "tags": ["github"], "security": [{"JWTAuth": []}]}}, "/v1/github/organizations/{organization_id}/repositories": {"get": {"operationId": "apps_github_api_get_organization_repositories", "summary": "Get Organization Repositories", "parameters": [{"in": "path", "name": "organization_id", "schema": {"title": "Organization Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/GitHubRepositoryRead"}, "title": "Response", "type": "array"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get repositories that have been manually added for a specific GitHub organization.", "tags": ["github"], "security": [{"JWTAuth": []}]}}, "/v1/github/organizations/{organization_id}/available-repositories": {"get": {"operationId": "apps_github_api_get_available_repositories", "summary": "Get Available Repositories", "parameters": [{"in": "path", "name": "organization_id", "schema": {"title": "Organization Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/AvailableGitHubRepository"}, "title": "Response", "type": "array"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "502": {"description": "Bad Gateway", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Fetch all repositories from GitHub that the installation has access to (not persisted).", "tags": ["github"], "security": [{"JWTAuth": []}]}}, "/v1/github/organizations/{organization_id}/repositories/{repository_id}/remove": {"post": {"operationId": "apps_github_api_remove_repository", "summary": "Remove Repository", "parameters": [{"in": "path", "name": "organization_id", "schema": {"title": "Organization Id", "type": "integer"}, "required": true}, {"in": "path", "name": "repository_id", "schema": {"title": "Repository Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SuccessMessageResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Remove a repository from CodePress (deletes the GitHubRepository record).", "tags": ["github"], "security": [{"JWTAuth": []}]}}, "/v1/github/organizations": {"get": {"operationId": "apps_github_api_get_user_organizations", "summary": "Get User Organizations", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/GitHubOrganizationRead"}, "title": "Response", "type": "array"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get all GitHub organizations the user has access to where GitHub App is installed.", "tags": ["github"], "security": [{"JWTAuth": []}]}}, "/v1/github/organizations/{organization_id}/api-keys": {"post": {"operationId": "apps_github_api_create_api_key", "summary": "Create Api Key", "parameters": [{"in": "path", "name": "organization_id", "schema": {"title": "Organization Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiKeyResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Create a new API key for an organization.", "tags": ["github"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiKeyCreate"}}}, "required": true}, "security": [{"JWTAuth": []}]}, "get": {"operationId": "apps_github_api_get_organization_api_keys", "summary": "Get Organization Api Keys", "parameters": [{"in": "path", "name": "organization_id", "schema": {"title": "Organization Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/ApiKeyRead"}, "title": "Response", "type": "array"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get all API keys for an organization.", "tags": ["github"], "security": [{"JWTAuth": []}]}}, "/v1/github/organizations/{organization_id}/api-keys/{key_id}": {"get": {"operationId": "apps_github_api_get_api_key", "summary": "Get Api Key", "parameters": [{"in": "path", "name": "organization_id", "schema": {"title": "Organization Id", "type": "integer"}, "required": true}, {"in": "path", "name": "key_id", "schema": {"title": "Key Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiKeyRead"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get a specific API key.", "tags": ["github"], "security": [{"JWTAuth": []}]}, "delete": {"operationId": "apps_github_api_revoke_api_key", "summary": "Revoke Api Key", "parameters": [{"in": "path", "name": "organization_id", "schema": {"title": "Organization Id", "type": "integer"}, "required": true}, {"in": "path", "name": "key_id", "schema": {"title": "Key Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SuccessMessageResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Revoke (deactivate) an API key.", "tags": ["github"], "security": [{"JWTAuth": []}]}}, "/v1/github/webhook": {"post": {"operationId": "apps_github_api_github_webhook", "summary": "Github Webhook", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GitHubWebhookResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Handle GitHub webhook events.", "tags": ["github"]}}, "/v1/github/publish": {"post": {"operationId": "apps_github_api_publish_to_production", "summary": "Publish To Production", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PublishToProductionResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Publish changes from a branch to production (main).\n\nThis endpoint:\n1. If unsaved changes are provided, commits them to the branch first\n2. Checks if a PR exists for the given branch to main\n3. If PR exists, merges it\n4. If no PR exists, creates one and then merges it", "tags": ["github"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/PublishToProductionRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agents/codex/start": {"post": {"operationId": "apps_agents_api_start_codex_session", "summary": "Start Codex Session", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/StartCodexSessionResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Start a legacy backend-managed Codex CLI session.\n\nNew product chat sessions should use POST /agents/start with\nagent_type=\"codex\", which runs through the unified agent-runner path.\nThis endpoint remains for older clients until that flow is fully retired.", "tags": ["agents"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/StartCodexSessionRequest"}}}, "required": true}, "security": [{"OptionalJWTAuth": []}]}}, "/v1/agents/provision": {"post": {"operationId": "apps_agents_api_provision_workspace", "summary": "Provision Workspace", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ProvisionWorkspaceResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Pre-provision workspace infrastructure (Redis ACL + EFS) for an organization.\n\nIdempotent \u2014 returns in ~1ms for existing orgs with cached credentials.\nFor new orgs, creates Redis ACL user and EFS access point.", "tags": ["agents"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ProvisionWorkspaceRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agents/start": {"post": {"operationId": "apps_agents_api_start_agent_session", "summary": "Start Agent Session", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/StartAgentSessionResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"anyOf": [{"$ref": "#/components/schemas/OrgRedisProvisioningPendingResponse"}, {"$ref": "#/components/schemas/ApiErrorResponse"}], "title": "Response"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Initialize a new agent chat session.\n\nSessions can be started with or without a repo:\n- With repo: Provide github_repo_name for repo-specific session\n- Without repo: Provide organization_id for general chat (agent clones repos as needed)", "tags": ["agents"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/StartAgentSessionRequest"}}}, "required": true}, "security": [{"OptionalJWTAuth": []}]}}, "/v1/agents/ws-token": {"post": {"operationId": "apps_agents_api_create_ws_token", "summary": "Create Ws Token", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WsTokenResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Exchange a valid JWT for a short-lived, single-use WebSocket connection token.\n\nThe returned token should be used as the ?token= query param when opening a\nWebSocket connection. It expires after 30 seconds and can only be used once.", "tags": ["agents"], "security": [{"JWTAuth": []}]}}, "/v1/agents/chats": {"get": {"operationId": "apps_agents_api_list_agent_chat_sessions", "summary": "List Agent Chat Sessions", "parameters": [{"in": "query", "name": "github_repo_name", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Github Repo Name"}, "required": false}, {"in": "query", "name": "organization_id", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Organization Id"}, "required": false}, {"in": "query", "name": "source", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Source"}, "required": false}, {"in": "query", "name": "domain", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Domain"}, "required": false}, {"in": "query", "name": "agent_teammate_id", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Agent Teammate Id"}, "required": false}, {"in": "query", "name": "parent_session_id", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Parent Session Id"}, "required": false}, {"in": "query", "name": "q", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Q"}, "required": false}, {"in": "query", "name": "picker", "schema": {"default": false, "title": "Picker", "type": "boolean"}, "required": false}, {"in": "query", "name": "limit", "schema": {"default": 20, "title": "Limit", "type": "integer"}, "required": false}, {"in": "query", "name": "offset", "schema": {"default": 0, "title": "Offset", "type": "integer"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentChatListResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List agent chat sessions for the current user.", "tags": ["agents"], "security": [{"JWTAuth": []}]}}, "/v1/agents/chats/{session_id}": {"get": {"operationId": "apps_agents_api_get_agent_chat_session", "summary": "Get Agent Chat Session", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}, {"in": "query", "name": "limit", "schema": {"default": 200, "title": "Limit", "type": "integer"}, "required": false}, {"in": "query", "name": "before", "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Before"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentChatDetailResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get a specific chat session with its messages.\n\nSupports cursor-based pagination:\n- ``limit``: max messages to return (default 200)\n- ``before``: return messages with ``id < before`` (for loading older messages)\n\nMessages are always returned in chronological order.", "tags": ["agents"], "security": [{"JWTAuth": []}]}, "patch": {"operationId": "apps_agents_chat_management_api_rename_agent_chat_session", "summary": "Rename Agent Chat Session", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentChatSummary"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Rename a chat session's title (owner-only).", "tags": ["agents"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/RenameChatRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}, "delete": {"operationId": "apps_agents_chat_management_api_delete_agent_chat_session", "summary": "Delete Agent Chat Session", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SuccessMessageResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Soft-delete a chat session (owner-only).\n\nSets ``deleted_at = now()`` so the row is hidden from list views but\nretained for audit. If the agent is currently running, stops it so the\nECS task is released.", "tags": ["agents"], "security": [{"JWTAuth": []}]}}, "/v1/agents/chats/{session_id}/subagents/{parent_tool_use_id}/messages": {"get": {"operationId": "apps_agents_api_get_subagent_messages", "summary": "Get Subagent Messages", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}, {"in": "path", "name": "parent_tool_use_id", "schema": {"title": "Parent Tool Use Id", "type": "string"}, "required": true}, {"in": "query", "name": "limit", "schema": {"default": 200, "title": "Limit", "type": "integer"}, "required": false}, {"in": "query", "name": "before", "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Before"}, "required": false}, {"in": "query", "name": "through_event_id", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Through Event Id"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SubAgentMessagesResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get the transcript of a single subagent run within a chat session.\n\nReturns only messages attributed to ``parent_tool_use_id`` \u2014 these rows\nare excluded from the main chat detail transcript. Supports the same\ncursor pagination as the chat detail endpoint (``before``: id cursor,\nmessages returned in chronological order).", "tags": ["agents"], "security": [{"JWTAuth": []}]}}, "/v1/agents/chats/{session_id}/resolve-branch": {"post": {"operationId": "apps_agents_api_resolve_working_branch", "summary": "Resolve Working Branch", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ResolveWorkingBranchResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Resolve the working branch for a chat session when resuming.\n\nIf the session has a working_branch:\n- Check if a PR was created and merged for that branch\n- If merged: create a new branch and update working_branch in DB\n- If not merged or no PR: return the existing working_branch", "tags": ["agents"], "security": [{"JWTAuth": []}]}}, "/v1/agents/finalize/{session_id}": {"post": {"operationId": "apps_agents_api_finalize_agent_session", "summary": "Finalize Agent Session", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}, {"in": "query", "name": "branch", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Branch"}, "required": false}, {"in": "query", "name": "commit_message", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Commit Message"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/FinalizeAgentSessionResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Alternative HTTP endpoint to finalize a session (for clients not using WebSocket finalize).\nThis commits changes and creates a PR.", "tags": ["agents"], "security": [{"OptionalJWTAuth": []}]}}, "/v1/agents/session/{session_id}": {"delete": {"operationId": "apps_agents_api_cancel_agent_session", "summary": "Cancel Agent Session", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SuccessMessageResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Cancel and cleanup an agent session without committing changes.", "tags": ["agents"], "security": [{"OptionalJWTAuth": []}]}}, "/v1/agents/sessions/{session_id}/database-connection": {"post": {"operationId": "apps_agents_api_session_database_connection", "summary": "Session Database Connection", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SessionActionResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Create a database connection from the inline chat UI (SSE action endpoint).\n\nThe user enters credentials in the chat UI \u2014 they are sent directly here\nand encrypted immediately.  The agent only receives the database_connection_id.", "tags": ["agents"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/DatabaseConnectionRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agents/session/{session_id}/has-uncommitted-changes": {"get": {"operationId": "apps_agents_api_check_session_uncommitted_changes", "summary": "Check Session Uncommitted Changes", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UncommittedChangesResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Check whether a session's worktree has uncommitted changes.\n\nCompares timestamps of file_update and auto_commit messages to determine\nif all file changes have been committed.", "tags": ["agents"], "security": [{"JWTAuth": []}]}}, "/v1/agents/sessions/{session_id}/status": {"get": {"operationId": "apps_agents_api_get_agent_chat_status", "summary": "Get Agent Chat Status", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentChatStatusSummary"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Return the current user-facing status for a chat session.", "tags": ["agents"], "security": [{"JWTAuth": []}]}}, "/v1/agents/sessions/{session_id}/display": {"get": {"operationId": "apps_agents_api_get_session_display_status", "summary": "Get Session Display Status", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DisplayStatusResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Report whether this session currently has a live browser display.\n\nLets the web UI decide when to show the Live Browser button across page\nreloads and session switches \u2014 the chat WS tool_use event is ephemeral\nand not replayed from history. Source of truth is the Redis pointer the\nagent publishes via `start_browser_display` (1h TTL).", "tags": ["agents"], "security": [{"JWTAuth": []}]}}, "/v1/agents/sessions/{session_id}/finish-mode": {"get": {"operationId": "apps_agents_api_get_session_finish_mode", "summary": "Get Session Finish Mode", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/FinishModeResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Hydrate the authoritative finish state after reload or reconnect.", "tags": ["agents"], "security": [{"JWTAuth": []}]}, "post": {"operationId": "apps_agents_api_set_session_finish_mode", "summary": "Set Session Finish Mode", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/FinishModeResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Arm or disarm PR creation for a pr_on_finish project session.", "tags": ["agents"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/FinishModeRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agents/chats/{session_id}/cloud-takeover": {"post": {"operationId": "apps_agents_api_cloud_takeover_agent_session", "summary": "Cloud Takeover Agent Session", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SuccessMessageResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Move a local-device session to the cloud runtime.\n\nFences the device's runner (dispatch-generation bump + tunnel force-close\n+ best-effort supervisor stop), clears local-only resume state, and flips\nthe session to runtime_target=\"cloud\". The next message relaunches on the\nnormal cloud resume path with a DB transcript tail seeded as\nprior_messages \u2014 provider-native resume is impossible because the SDK\ntranscript lives on the user's disk. Uncommitted local work is NOT\ncarried over; a persisted divider message records that.", "tags": ["agents"], "requestBody": {"content": {"application/json": {"schema": {"anyOf": [{"$ref": "#/components/schemas/CloudTakeoverRequest"}, {"type": "null"}]}}}, "required": false}, "security": [{"JWTAuth": []}]}}, "/v1/agents/dev-servers/{session_id}/visual-edit-token": {"post": {"operationId": "apps_agents_api_dev_server_visual_edit_token", "summary": "Dev Server Visual Edit Token", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DevServerVisualEditTokenResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Mint a short-lived visual-edit capability for the in-page editor runtime.\n\nThe dashboard (which holds the user's JWT) calls this when the user enters\nedit mode and hands the returned token \u2014 NOT the JWT \u2014 to the runtime in the\ncross-origin preview. The token is the only credential that ever reaches the\nuntrusted preview page; it authorizes solely the visual-edit endpoint for\nthis session and expires quickly.", "tags": ["agents"], "security": [{"JWTAuth": []}]}}, "/v1/agents/dev-servers/{session_id}/visual-edit": {"post": {"operationId": "apps_agents_api_dev_server_visual_edit", "summary": "Dev Server Visual Edit", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DevServerVisualEditResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Apply a point-and-click visual edit to the live dev server (no extension).\n\nAuthorized by the visual-edit CAPABILITY TOKEN in the ``X-CP-Edit-Token``\nheader, NOT the user's JWT \u2014 so the untrusted preview page never holds a\nbroad credential. The backend reads the LIVE on-disk file from the running\ncheckout via the engine ``/read-files`` receiver (uncommitted dev-server\nstate, not a stale GitHub HEAD), runs the visual-edit LLM diff in-process,\nand writes the result back via ``/write-files`` for HMR. No GitHub commit\n(a separate, additive step). Works for agent-backed and standalone previews.", "tags": ["agents"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/DevServerVisualEditRequest"}}}, "required": true}, "security": [{"OptionalJWTAuth": []}]}}, "/v1/agents/sessions/{session_id}/dev-server": {"post": {"operationId": "apps_agents_api_start_session_dev_server", "summary": "Start Session Dev Server", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DevServerStatusResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Start (or reuse) the live dev server for a session, from the dashboard.\n\nThe claim itself can take minutes (clone + install + dev-server boot), so\nit runs in a background task; poll ``GET .../dev-server`` for the outcome.\nThe shared service is idempotent, so a racing agent-side\n``start_dev_server`` call cannot double-claim a pool container.", "tags": ["agents"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/DevServerStartRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}, "get": {"operationId": "apps_agents_api_get_session_dev_server", "summary": "Get Session Dev Server", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DevServerStatusResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Current live dev server state for a session (status \"none\" when absent).", "tags": ["agents"], "security": [{"JWTAuth": []}]}, "delete": {"operationId": "apps_agents_api_stop_session_dev_server", "summary": "Stop Session Dev Server", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DevServerStatusResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Stop a session's live dev server and recycle its pool container.", "tags": ["agents"], "security": [{"JWTAuth": []}]}}, "/v1/agents/repositories/{repository_id}/frontends": {"get": {"operationId": "apps_agents_api_list_repository_frontends", "summary": "List Repository Frontends", "parameters": [{"in": "path", "name": "repository_id", "schema": {"title": "Repository Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RepoFrontendsResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List a repository's runnable frontends for the Dev page selector.\n\nReads the committed ``.codepress/dev-server/recipe.json`` (on the repo's\ndefault branch), so the dashboard can start one standalone \u2014 without\nspawning an agent. Auth mirrors ``start_standalone_dev_server``: the caller\nmust belong to a CodePress org with access to the repo.", "tags": ["agents"], "security": [{"JWTAuth": []}]}}, "/v1/agents/repositories/{repository_id}/branches": {"get": {"operationId": "apps_agents_api_list_repository_branches", "summary": "List Repository Branches", "parameters": [{"in": "path", "name": "repository_id", "schema": {"title": "Repository Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RepoBranchesResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "502": {"description": "Bad Gateway", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List a repository's git branches for the Dev page branch selector.\n\nNo branch-listing endpoint existed, so this adds a minimal one backed by the\nGitHub installation API. Auth mirrors ``start_standalone_dev_server``; the\nrepo's ``default_branch`` is returned so the dashboard can default the\nselection to it.", "tags": ["agents"], "security": [{"JWTAuth": []}]}}, "/v1/agents/repositories/{repository_id}/dev-server/qa-promotion-barrier": {"post": {"operationId": "apps_agents_api_arm_microvm_promotion_qa_barrier", "summary": "Arm Microvm Promotion Qa Barrier", "parameters": [{"in": "path", "name": "repository_id", "schema": {"title": "Repository Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MicrovmPromotionQaBarrierResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Pause one exact pending candidate before canary-backed promotion.", "tags": ["agents"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/MicrovmPromotionQaBarrierRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}, "get": {"operationId": "apps_agents_api_get_microvm_promotion_qa_barrier", "summary": "Get Microvm Promotion Qa Barrier", "parameters": [{"in": "path", "name": "repository_id", "schema": {"title": "Repository Id", "type": "integer"}, "required": true}, {"in": "query", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}, {"in": "query", "name": "frontend_label", "schema": {"title": "Frontend Label", "type": "string"}, "required": true}, {"in": "query", "name": "candidate_content_key", "schema": {"title": "Candidate Content Key", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MicrovmPromotionQaBarrierResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agents"], "security": [{"JWTAuth": []}]}, "delete": {"operationId": "apps_agents_api_release_microvm_promotion_qa_barrier", "summary": "Release Microvm Promotion Qa Barrier", "parameters": [{"in": "path", "name": "repository_id", "schema": {"title": "Repository Id", "type": "integer"}, "required": true}, {"in": "query", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}, {"in": "query", "name": "frontend_label", "schema": {"title": "Frontend Label", "type": "string"}, "required": true}, {"in": "query", "name": "candidate_content_key", "schema": {"title": "Candidate Content Key", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MicrovmPromotionQaBarrierResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agents"], "security": [{"JWTAuth": []}]}}, "/v1/agents/repositories/{repository_id}/dev-server/qa-launch-fixture": {"post": {"operationId": "apps_agents_api_start_microvm_launch_qa_fixture", "summary": "Start Microvm Launch Qa Fixture", "parameters": [{"in": "path", "name": "repository_id", "schema": {"title": "Repository Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MicrovmLaunchQaFixtureResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Create one disposable staging branch and launch one bounded QA claim.", "tags": ["agents"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/MicrovmLaunchQaFixtureRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agents/repositories/{repository_id}/dev-server/qa-launch-fixture/{session_id}": {"get": {"operationId": "apps_agents_api_get_microvm_launch_qa_fixture", "summary": "Get Microvm Launch Qa Fixture", "parameters": [{"in": "path", "name": "repository_id", "schema": {"title": "Repository Id", "type": "integer"}, "required": true}, {"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}, {"in": "query", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MicrovmLaunchQaFixtureEvidenceResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agents"], "security": [{"JWTAuth": []}]}}, "/v1/agents/repositories/{repository_id}/dev-server/env-vars": {"get": {"operationId": "apps_agents_api_list_dev_server_env_vars", "summary": "List Dev Server Env Vars", "parameters": [{"in": "path", "name": "repository_id", "schema": {"title": "Repository Id", "type": "integer"}, "required": true}, {"in": "query", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}, {"in": "query", "name": "working_dir", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Working Dir"}, "required": false}, {"in": "query", "name": "branch", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Branch"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DevServerEnvVarsResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List a repo's dev-server env vars (org-scoped).\n\nOptional ``working_dir`` and ``branch`` query params narrow to one scope\n(\"\" = defaults). Secret values are never returned \u2014 only their presence.", "tags": ["agents"], "security": [{"JWTAuth": []}]}, "put": {"operationId": "apps_agents_api_set_dev_server_env_vars", "summary": "Set Dev Server Env Vars", "parameters": [{"in": "path", "name": "repository_id", "schema": {"title": "Repository Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DevServerEnvVarsResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Upsert a batch of PUBLIC env vars for one frontend scope.\n\nEvery value is validated server-side BEFORE any write (a secret-shaped value\nor reserved/invalid key rejects the whole batch), so a real credential can\nnever be persisted as a public var and injected into the untrusted dev\ncontainer. Secret-visibility writes are refused for now \u2014 secret storage and\ndelivery are a later, gated phase. Returns the resulting set for the scope.", "tags": ["agents"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/SetDevServerEnvVarsRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}, "delete": {"operationId": "apps_agents_api_delete_dev_server_env_var", "summary": "Delete Dev Server Env Var", "parameters": [{"in": "path", "name": "repository_id", "schema": {"title": "Repository Id", "type": "integer"}, "required": true}, {"in": "query", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}, {"in": "query", "name": "key", "schema": {"title": "Key", "type": "string"}, "required": true}, {"in": "query", "name": "working_dir", "schema": {"default": "", "title": "Working Dir", "type": "string"}, "required": false}, {"in": "query", "name": "branch", "schema": {"default": "", "title": "Branch", "type": "string"}, "required": false}, {"in": "query", "name": "replace_branch_overrides", "schema": {"default": false, "title": "Replace Branch Overrides", "type": "boolean"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DevServerEnvVarsResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Delete one env var by ``key`` within a ``working_dir`` scope (org-scoped).\n\nWhen ``replace_branch_overrides`` is set on a repo-wide (``branch == \"\"``)\ndelete, this app's branch-specific public overrides of the same key are\nremoved too, so the deleted value cannot silently resurrect via a\nhigher-precedence branch row the editor promises no longer applies. Only the\nfrontend's own ``working_dir`` is reconciled; a repo-default\n(``working_dir == \"\"``) branch override is shared across every app on that\nbranch and is left in place. The delete is validated against the projected\npost-delete rows and rejected atomically (nothing removed) when un-shadowing\nan inherited value would leave a launch's resolved env over the size limit.\nReturns the remaining vars for the scope.", "tags": ["agents"], "security": [{"JWTAuth": []}]}}, "/v1/agents/repositories/{repository_id}/dev-server": {"post": {"operationId": "apps_agents_api_start_standalone_dev_server", "summary": "Start Standalone Dev Server", "parameters": [{"in": "path", "name": "repository_id", "schema": {"title": "Repository Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/StandaloneDevServerStatusResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Start a live dev server directly from a recipe frontend \u2014 no agent.\n\nUnlike ``start_session_dev_server``, no AgentChatSession is involved: the\ndashboard picks a frontend from the committed recipe (by ``working_dir``)\nand a branch, and the backend claims a dev-server container with that\nfrontend's dev command, working directory, and system packages. An opaque,\nsubdomain-safe session id is\nminted (it becomes ``{session_id}.preview.codepress.dev``); the slow claim\nruns in the background, so poll\n``GET .../repositories/{repository_id}/dev-server/{session_id}``.", "tags": ["agents"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/StandaloneDevServerStartRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agents/repositories/{repository_id}/dev-server/{session_id}": {"get": {"operationId": "apps_agents_api_get_standalone_dev_server", "summary": "Get Standalone Dev Server", "parameters": [{"in": "path", "name": "repository_id", "schema": {"title": "Repository Id", "type": "integer"}, "required": true}, {"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}, {"in": "query", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/StandaloneDevServerStatusResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Poll a standalone dev server's status (status \"none\" when absent).\n\nA standalone start has no AgentChatSession, so authorization resolves the\nrepo's CodePress org via membership (not session participation) AND requires\nthat ``session_id`` was started standalone for this exact repository (the\nbinding written at start). Repo-only membership would otherwise let any org\nmember read an unrelated org dev server; see\n``_standalone_dev_server_binding_key``. The status snapshot is read from the\nshared claim service's Redis registration, which is written \"starting\" the\nmoment the claim begins \u2014 so this reports the full provisioning \u2192 running\nlifecycle, unlike the ``DevServerInstance`` row whose ``session_id`` is only\npopulated once the claim succeeds.", "tags": ["agents"], "security": [{"JWTAuth": []}]}, "delete": {"operationId": "apps_agents_api_stop_standalone_dev_server", "summary": "Stop Standalone Dev Server", "parameters": [{"in": "path", "name": "repository_id", "schema": {"title": "Repository Id", "type": "integer"}, "required": true}, {"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}, {"in": "query", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/StandaloneDevServerStatusResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Stop a standalone (agent-less) dev server and recycle its container.\n\nThe session-scoped ``DELETE .../sessions/{session_id}/dev-server`` can't be\nused here because a standalone start has no ``AgentChatSession``; this stops\nby the opaque session id under the repo's CodePress org. Authorization\nrequires both org membership for the repo AND that ``session_id`` was\nstarted standalone for this exact repository (the binding written at start),\nso a caller can't stop an unrelated org dev server via repo-only membership;\nsee ``_standalone_dev_server_binding_key``.", "tags": ["agents"], "security": [{"JWTAuth": []}]}}, "/v1/agents/repositories/{repository_id}/dev-server/{session_id}/agent": {"put": {"operationId": "apps_agents_api_set_standalone_dev_server_agent", "summary": "Set Standalone Dev Server Agent", "parameters": [{"in": "path", "name": "repository_id", "schema": {"title": "Repository Id", "type": "integer"}, "required": true}, {"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}, {"in": "query", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/StandaloneDevServerStatusResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Persist the assistant chat paired with a standalone dev server.\n\nThe dashboard stores the dev-server\u2194assistant pairing here (not just in the\nbrowser) so a returned or shared preview deep link restores the same\nassistant panel on any device. Authorization mirrors the other standalone\nendpoints: org membership for the repo AND that ``session_id`` was started\nstandalone for this exact repository (the binding written at start), so a\ncaller can't re-point an unrelated org dev server; see\n``_standalone_dev_server_binding_key``.", "tags": ["agents"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/DevServerAgentPairingRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}, "delete": {"operationId": "apps_agents_api_clear_standalone_dev_server_agent", "summary": "Clear Standalone Dev Server Agent", "parameters": [{"in": "path", "name": "repository_id", "schema": {"title": "Repository Id", "type": "integer"}, "required": true}, {"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}, {"in": "query", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/StandaloneDevServerStatusResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Clear the assistant pairing for a standalone dev server.\n\nUsed when the user detaches the assistant from a still-running dev server\n(the pairing is also cleared automatically when the server is stopped).\nAuthorization matches ``set_standalone_dev_server_agent``.", "tags": ["agents"], "security": [{"JWTAuth": []}]}}, "/v1/agents/dev-servers": {"get": {"operationId": "apps_agents_api_list_org_dev_servers_endpoint", "summary": "List Org Dev Servers Endpoint", "parameters": [{"in": "query", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrgDevServersResponseWithSource"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Merged Dev-page list: live dev servers PLUS reinstatable history.\n\nUnions the org's live registrations (``status`` ready/starting/suspended/building,\nsigned ``preview_url`` only while iframeable by the UI) with durable\nMicrovmDevServer rows that have no live box \u2014 surfaced as ``status=\"paused\"`` (idle spun-down,\nreconnectable) or ``status=\"terminated\"`` (torn down, reinstatable). Deduped\nto one row per worktree (a live box hides its stale siblings) and newest\nfirst, so the dashboard shows the last worktrees a user connected to whether\nor not a box is currently up. Participant-scoped like before: agent-backed\nrows (live or historical) stay invisible to non-participants.", "tags": ["agents"], "security": [{"JWTAuth": []}]}}, "/v1/agents/dev-servers/archived": {"get": {"operationId": "apps_agents_api_list_archived_dev_servers_endpoint", "summary": "List Archived Dev Servers Endpoint", "parameters": [{"in": "query", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}, {"in": "query", "name": "days", "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Days"}, "required": false}, {"in": "query", "name": "page", "schema": {"default": 1, "title": "Page", "type": "integer"}, "required": false}, {"in": "query", "name": "page_size", "schema": {"default": 10, "title": "Page Size", "type": "integer"}, "required": false}, {"in": "query", "name": "repository_id", "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Repository Id"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ArchivedDevServersResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Paginated Dev-page shipped projects, backed by archived durable rows.\n\nWhen ``repository_id`` is supplied the results are scoped to that single\nconnected repository, so a per-repo shipped view is complete within the\nscan valve instead of being crowded out by other repos' newer archives.", "tags": ["agents"], "security": [{"JWTAuth": []}]}}, "/v1/agents/dev-servers/{session_id}": {"get": {"operationId": "apps_agents_api_resolve_org_dev_server", "summary": "Resolve Org Dev Server", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}, {"in": "query", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrgDevServerEntryWithSource"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Resolve one dev server by session_id for a (possibly shared) deep link.\n\nThe Dev page list contains only LIVE servers, so a shared\n``/dev/:session_id`` link whose preview has spun down isn't in it and the\npage would otherwise bounce back to the picker. This resolves the id\ndirectly: the live status when its Redis registration is present, else\n``status=\"paused\"`` plus the repo/branch from the durable MicrovmDevServer\npointer so the page can offer a one-click reconnect, else ``status=\"none\"``.", "tags": ["agents"], "security": [{"JWTAuth": []}]}}, "/v1/agents/dev-servers/{session_id}/reconnect": {"post": {"operationId": "apps_agents_api_reconnect_org_dev_server", "summary": "Reconnect Org Dev Server", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}, {"in": "query", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/StandaloneDevServerStatusResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Reconnect a spun-down MicroVM preview under its ORIGINAL session_id.\n\nA shared ``/dev/:session_id`` link survives idle spin-down via the durable\nMicrovmDevServer pointer. This replays that pointer's last claim under the\nSAME session_id \u2014 so the shared URL stays valid \u2014 cold-starting a fresh VM on\nthe same worktree (repo / branch / frontend). The slow claim runs in the\nbackground; poll ``GET /agents/dev-servers/{session_id}`` for the outcome.\nIdempotent: returns the live preview when one is already up.", "tags": ["agents"], "security": [{"JWTAuth": []}]}}, "/v1/agents/dev-servers/{session_id}/rename": {"post": {"operationId": "apps_agents_api_rename_org_dev_server", "summary": "Rename Org Dev Server", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}, {"in": "query", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RenameDevServerResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Rename a Dev-page project without changing its claim identity.", "tags": ["agents"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/RenameDevServerRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agents/dev-servers/{session_id}/forget": {"post": {"operationId": "apps_agents_api_forget_org_dev_server", "summary": "Forget Org Dev Server", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}, {"in": "query", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DevServerInstanceActionResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Remove a terminated/paused worktree from the dashboard's recent list.\n\nTerminate soft-deletes so a box stays reinstatable; this is the explicit\n\"forget\" that hard-deletes the durable pointer. Org-scoped via\n``_resolve_durable_microvm_or_none`` (namespace + repo-still-connected), and\nparticipant-scoped for agent-backed rows. Refuses a still-live box\n(``error=\"instance_live\"``) \u2014 terminate it first, or forgetting would orphan\nthe running VM.", "tags": ["agents"], "security": [{"JWTAuth": []}]}}, "/v1/agents/dev-server-instances": {"get": {"operationId": "apps_agents_api_list_org_dev_server_instances_endpoint", "summary": "List Org Dev Server Instances Endpoint", "parameters": [{"in": "query", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DevServerInstancesResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "All live dev servers in an org (management list, newest first).", "tags": ["agents"], "security": [{"JWTAuth": []}]}}, "/v1/agents/dev-server-instances/{session_id}/terminate": {"post": {"operationId": "apps_agents_api_terminate_org_dev_server_instance_endpoint", "summary": "Terminate Org Dev Server Instance Endpoint", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}, {"in": "query", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}, {"in": "query", "name": "force", "schema": {"default": false, "title": "Force", "type": "boolean"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DevServerInstanceActionResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Terminate one live dev server (org-scoped, destructive).\n\nReuses the authoritative ``stop_dev_server`` teardown \u2014 for a MicroVM box\nthat calls ``TerminateMicrovm`` and clears all of its Redis state. Double\norg-scoping: the caller must be a member of ``organization_id`` AND the\nbox's registration must exist under that org \u2014 a cross-org ``session_id``\nreturns 404.\n\nIn-use guard: if a client is connected to the preview right now the call\nreturns ``ok=False, error=\"instance_in_use\"`` (HTTP 200) instead of tearing\nit down; the dashboard re-confirms and retries with ``force=true``.", "tags": ["agents"], "security": [{"JWTAuth": []}]}}, "/v1/agents/dev-server-instances/{session_id}/rebuild": {"post": {"operationId": "apps_agents_api_rebuild_org_dev_server_instance_endpoint", "summary": "Rebuild Org Dev Server Instance Endpoint", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}, {"in": "query", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}, {"in": "query", "name": "force", "schema": {"default": false, "title": "Force", "type": "boolean"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DevServerInstanceActionResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Rebuild one live dev server (org-scoped, destructive).\n\nRebuild = TERMINATE so the next claim provisions a brand-new box \u2014 for a\nMicroVM there is no persistent checkout to resume, so tear-down + fresh claim\nIS the rebuild. Same double org-scoping / IDOR protection and in-use guard\n(``error=\"instance_in_use\"`` unless ``force=true``) as terminate. Recovering\na wedged box \u2014 rebuild's main use \u2014 may need the override since a stuck tab\ncan still show presence.", "tags": ["agents"], "security": [{"JWTAuth": []}]}}, "/v1/agents/dev-server-instances/{session_id}/stop": {"post": {"operationId": "apps_agents_api_stop_org_dev_server_instance_endpoint", "summary": "Stop Org Dev Server Instance Endpoint", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}, {"in": "query", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}, {"in": "query", "name": "force", "schema": {"default": false, "title": "Force", "type": "boolean"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DevServerInstanceActionResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Stop one live dev server WITHOUT tearing it down (org-scoped, recoverable).\n\nStop suspends the MicroVM in place (``suspend_dev_server``): the box keeps\nits endpoint, tokens, and claim identity under ``status=\"stopped\"``, so the\nnext start resumes the same VM in seconds instead of cold-provisioning.\nTerminate (above) remains the destructive teardown. Same double org-scoping\n/ IDOR protection and in-use guard (``error=\"instance_in_use\"`` unless\n``force=true``) as terminate; a non-ready box has no serving runtime to\nsuspend and returns ``error=\"not_running\"``.", "tags": ["agents"], "security": [{"JWTAuth": []}]}}, "/v1/agents/dev-servers/{session_id}/chats": {"get": {"operationId": "apps_agents_api_list_dev_server_chats_endpoint", "summary": "List Dev Server Chats Endpoint", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}, {"in": "query", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DevServerChatsResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List the assistant chats associated with one dev-server preview, newest first.\n\nThe append-only ``AgentChatDevServerLink`` rows keep chats listed after\nthe 1:1 Redis pairing is re-pointed (at a newer chat, or the chat at a\ndifferent preview); the currently paired chat is flagged ``is_active`` and\nunioned in even when it predates the link stamp (backfilled so it survives\nthe next re-pair), sorted with the same recency key as the rest. Org\nmembers see every chat \u2014 ``is_participant`` tells the Design tab which\nones the viewer can actually send to (the rest are view-only) \u2014 with\nautomation explicit-denies excluded. ``has_more`` reports when the bounded\npage truncated older chats.", "tags": ["agents"], "security": [{"JWTAuth": []}]}}, "/v1/agents/preview-module": {"post": {"operationId": "apps_agents_api_agent_preview_module", "summary": "Agent Preview Module", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PreviewModuleResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Build preview micro-bundles using esbuild in the session workspace.", "tags": ["agents"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/PreviewModuleRequest"}}}, "required": true}, "security": [{"OptionalJWTAuth": []}]}}, "/v1/agents/preview/state": {"get": {"operationId": "apps_agents_api_get_preview_state", "summary": "Get Preview State", "parameters": [{"in": "query", "name": "repo", "schema": {"title": "Repo", "type": "string"}, "required": true}, {"in": "query", "name": "branch", "schema": {"title": "Branch", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PreviewStateResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Fetch collaborative preview state from S3.", "tags": ["agents"], "security": [{"OptionalJWTAuth": []}]}}, "/v1/agents/preview/copy": {"post": {"operationId": "apps_agents_api_copy_preview_state", "summary": "Copy Preview State", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PreviewStateResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Copy preview state from one branch to another.", "tags": ["agents"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CopyPreviewRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agents/preview/share": {"post": {"operationId": "apps_agents_api_create_preview_share_link", "summary": "Create Preview Share Link", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PreviewShareLinkResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Create a shareable link for a preview build.", "tags": ["agents"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreatePreviewShareLinkRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agents/preview/share/{link_id}": {"get": {"operationId": "apps_agents_api_get_shared_preview", "summary": "Get Shared Preview", "parameters": [{"in": "path", "name": "link_id", "schema": {"title": "Link Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PreviewStateResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Resolve a preview share link and return the preview state.", "tags": ["agents"], "security": [{"OptionalJWTAuth": []}]}}, "/v1/agents/packets/{packet_id}": {"get": {"operationId": "apps_agents_api_get_handoff_packet", "summary": "Get Handoff Packet", "parameters": [{"in": "path", "name": "packet_id", "schema": {"title": "Packet Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HandoffPacketResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Return handoff packet metadata and its signed inline view URL.", "tags": ["agents"], "security": [{"JWTAuth": []}]}}, "/v1/agents/packets/{packet_id}/view": {"get": {"operationId": "apps_agents_api_view_handoff_packet", "summary": "View Handoff Packet", "parameters": [{"in": "path", "name": "packet_id", "schema": {"title": "Packet Id", "type": "string"}, "required": true}, {"in": "query", "name": "sig", "schema": {"default": "", "title": "Sig", "type": "string"}, "required": false}], "responses": {"200": {"description": "OK"}}, "description": "Permanent signed inline handoff packet view (no user auth required).", "tags": ["agents"]}}, "/v1/agents/artifacts/{artifact_id}/download": {"get": {"operationId": "apps_agents_api_download_artifact", "summary": "Download Artifact", "parameters": [{"in": "path", "name": "artifact_id", "schema": {"title": "Artifact Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK"}}, "description": "Return a presigned S3 URL for downloading an agent-generated artifact.\n\nThe frontend calls this with a normal Authorization header (via fetch),\nreceives the presigned URL, and opens it directly. This avoids putting\nJWT tokens in URLs.", "tags": ["agents"], "security": [{"JWTAuth": []}]}}, "/v1/agents/artifacts/{artifact_id}/dl": {"get": {"operationId": "apps_agents_api_download_artifact_signed", "summary": "Download Artifact Signed", "parameters": [{"in": "path", "name": "artifact_id", "schema": {"title": "Artifact Id", "type": "string"}, "required": true}, {"in": "query", "name": "sig", "schema": {"default": "", "title": "Sig", "type": "string"}, "required": false}], "responses": {"200": {"description": "OK"}}, "description": "Permanent signed download link (no user auth required).\n\nUsed by Slack messages and other contexts where the link must work\nindefinitely without a logged-in session. The HMAC signature proves the\nlink was generated by our backend.  On valid signature we generate a\nfresh short-lived presigned S3 URL and 302 redirect to it.", "tags": ["agents"]}}, "/v1/agents/design-comments": {"get": {"operationId": "apps_agents_api_list_design_comments", "summary": "List Design Comments", "parameters": [{"in": "query", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}, {"in": "query", "name": "repository_id", "schema": {"title": "Repository Id", "type": "integer"}, "required": true}, {"in": "query", "name": "branch", "schema": {"title": "Branch", "type": "string"}, "required": true}, {"in": "query", "name": "working_dir", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Working Dir"}, "required": false}, {"in": "query", "name": "status", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Status"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DesignCommentListResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List the comment threads for one design branch (the branch overview).\n\nOptional ``working_dir`` narrows to a single frontend's preview surface (omit\nto get every frontend on the branch; each thread carries its own\n``working_dir`` so the UI can group). Optional ``status`` (``open``/\n``resolved``) narrows too. Threads carry nested ``replies`` in ``created_at``\norder.", "tags": ["agents"], "security": [{"JWTAuth": []}]}, "post": {"operationId": "apps_agents_api_create_design_comment", "summary": "Create Design Comment", "parameters": [], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DesignCommentOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "410": {"description": "Gone", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Create a pin through the backward-compatible route.", "tags": ["agents"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/DesignCommentCreate"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agents/design-comments/idempotent": {"post": {"operationId": "apps_agents_api_create_design_comment_idempotent", "summary": "Create Design Comment Idempotent", "parameters": [], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DesignCommentOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "410": {"description": "Gone", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Create through a rollout-safe path that older backends cannot mutate.\n\nThe ordinary POST remains backward compatible for existing API callers. The\nweb client uses this distinct path so a request routed to an older task is a\nharmless 404 instead of a non-idempotent create that silently ignores the\nnew payload field.", "tags": ["agents"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/DesignCommentCreate"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agents/design-comments/agent-dispatch": {"post": {"operationId": "apps_agents_api_authorize_design_comment_agent_dispatch", "summary": "Authorize Design Comment Agent Dispatch", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DesignCommentAgentDispatchResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Prepare exact open comments for the paired assistant that will address them.\n\nThe browser still sends an ordinary visible chat message. This preflight\npersists the authorization fact the later runner RPC needs, so resolution\ndoes not reconstruct authority from whichever preview happens to be paired\nwhen the agent finishes. The selected preview may differ from the preview on\nwhich a comment was created, but both must share the same durable\n``(organization, repository, branch, working_dir)`` scope.", "tags": ["agents"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/DesignCommentAgentDispatchRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agents/design-comments/agent-dispatch/commit": {"post": {"operationId": "apps_agents_api_commit_design_comment_agent_dispatch", "summary": "Commit Design Comment Agent Dispatch", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DesignCommentAgentDispatchFinalizeResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Activate every prepared capability after the visible chat send succeeds.", "tags": ["agents"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/DesignCommentAgentDispatchFinalizeRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agents/design-comments/agent-dispatch/abort": {"post": {"operationId": "apps_agents_api_abort_design_comment_agent_dispatch", "summary": "Abort Design Comment Agent Dispatch", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DesignCommentAgentDispatchFinalizeResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Revoke a failed preparation/send while preserving active capabilities.", "tags": ["agents"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/DesignCommentAgentDispatchFinalizeRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agents/design-comments/{comment_id}": {"get": {"operationId": "apps_agents_api_get_design_comment", "summary": "Get Design Comment", "parameters": [{"in": "path", "name": "comment_id", "schema": {"title": "Comment Id", "type": "string"}, "required": true}, {"in": "query", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}, {"in": "query", "name": "repository_id", "schema": {"title": "Repository Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DesignCommentOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Fetch one comment thread (with replies).", "tags": ["agents"], "security": [{"JWTAuth": []}]}, "delete": {"operationId": "apps_agents_api_delete_design_comment", "summary": "Delete Design Comment", "parameters": [{"in": "path", "name": "comment_id", "schema": {"title": "Comment Id", "type": "string"}, "required": true}, {"in": "query", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}, {"in": "query", "name": "repository_id", "schema": {"title": "Repository Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DesignCommentDeleteResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Hard-delete a comment (replies cascade).\n\nRestricted to the comment's author or an org admin/owner \u2014 a plain member\ncannot delete another member's thread. (The ``author`` FK is ``SET_NULL``, so\na comment orphaned by a deleted user is deletable only via the admin path.)", "tags": ["agents"], "security": [{"JWTAuth": []}]}}, "/v1/agents/design-comments/{comment_id}/replies": {"post": {"operationId": "apps_agents_api_reply_design_comment", "summary": "Reply Design Comment", "parameters": [{"in": "path", "name": "comment_id", "schema": {"title": "Comment Id", "type": "string"}, "required": true}, {"in": "query", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}, {"in": "query", "name": "repository_id", "schema": {"title": "Repository Id", "type": "integer"}, "required": true}], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DesignCommentOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "410": {"description": "Gone", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Append a human reply through the backward-compatible route.", "tags": ["agents"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/DesignCommentReplyCreate"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agents/design-comments/{comment_id}/replies/idempotent": {"post": {"operationId": "apps_agents_api_reply_design_comment_idempotent", "summary": "Reply Design Comment Idempotent", "parameters": [{"in": "path", "name": "comment_id", "schema": {"title": "Comment Id", "type": "string"}, "required": true}, {"in": "query", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}, {"in": "query", "name": "repository_id", "schema": {"title": "Repository Id", "type": "integer"}, "required": true}], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DesignCommentOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "410": {"description": "Gone", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Append through the rollout-safe idempotent reply path.", "tags": ["agents"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/DesignCommentReplyCreate"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agents/design-comments/{comment_id}/resolve": {"post": {"operationId": "apps_agents_api_resolve_design_comment", "summary": "Resolve Design Comment", "parameters": [{"in": "path", "name": "comment_id", "schema": {"title": "Comment Id", "type": "string"}, "required": true}, {"in": "query", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}, {"in": "query", "name": "repository_id", "schema": {"title": "Repository Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DesignCommentOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Mark a comment resolved (human). Idempotent \u2014 an already-resolved comment\nkeeps its original ``resolved_at``/``resolved_by``. Slice 4's agent path sets\n``resolution_source=AGENT`` through an RPC handler instead of this route.", "tags": ["agents"], "security": [{"JWTAuth": []}]}}, "/v1/agents/design-comments/{comment_id}/reopen": {"post": {"operationId": "apps_agents_api_reopen_design_comment", "summary": "Reopen Design Comment", "parameters": [{"in": "path", "name": "comment_id", "schema": {"title": "Comment Id", "type": "string"}, "required": true}, {"in": "query", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}, {"in": "query", "name": "repository_id", "schema": {"title": "Repository Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DesignCommentOut"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Reopen a resolved comment, clearing the resolution fields. Idempotent.", "tags": ["agents"], "security": [{"JWTAuth": []}]}}, "/v1/agents/devices/register": {"post": {"operationId": "apps_agents_api_register_agent_device", "summary": "Register Agent Device", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RegisterAgentDeviceResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Register (or re-register) this machine as a local-session runner.\n\nUpserts by device_id. A device belongs to the registering user; another\nuser re-registering the same machine id is rejected. A REVOKED device\nid is rejected outright: the Terminal re-registers automatically on\nevery startup, so an upsert that flipped the status back to active\nwould let an ordinary restart (or a stolen machine holding the user's\nJWT) silently undo revocation. Re-enabling requires the explicit\nreactivate endpoint.", "tags": ["agents"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/RegisterAgentDeviceRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agents/devices": {"get": {"operationId": "apps_agents_api_list_agent_devices", "summary": "List Agent Devices", "parameters": [{"in": "query", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}, {"in": "query", "name": "repo_full_name", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Repo Full Name"}, "required": false}, {"in": "query", "name": "online", "schema": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Online"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentDeviceListResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List the caller's registered devices for the run-target picker.\n\nOwner-scoped by design: dispatch is owner-only (a local session runs\nwith the device owner's machine credentials), so other members'\ndevices would be unusable \u2014 and their hostnames/absolute checkout\npaths are not the caller's business.", "tags": ["agents"], "security": [{"JWTAuth": []}]}}, "/v1/agents/devices/{device_id}/checkouts": {"post": {"operationId": "apps_agents_api_update_agent_device_checkouts", "summary": "Update Agent Device Checkouts", "parameters": [{"in": "path", "name": "device_id", "schema": {"title": "Device Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentDeviceListResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Full-replace the device's advertised checkouts.", "tags": ["agents"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentDeviceCheckoutsRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agents/devices/{device_id}": {"delete": {"operationId": "apps_agents_api_delete_agent_device", "summary": "Delete Agent Device", "parameters": [{"in": "path", "name": "device_id", "schema": {"title": "Device Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Revoke a device so it can no longer run local sessions.\n\nRevocation must actually remove execution and Redis access, not just\nflag the row: every active local session on the device is fenced\n(generation bump + live-tunnel force-close), the supervisor is told to\nstop each runner, presence is cleared, and the command channel is told\nit's revoked (its handler also stops all runners device-side).", "tags": ["agents"], "security": [{"JWTAuth": []}]}}, "/v1/agents/devices/{device_id}/reactivate": {"post": {"operationId": "apps_agents_api_reactivate_agent_device", "summary": "Reactivate Agent Device", "parameters": [{"in": "path", "name": "device_id", "schema": {"title": "Device Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentDeviceListResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Explicitly re-enable a revoked device.\n\nDeliberately a separate endpoint from register: the Terminal calls\nregister automatically on every startup, so registration must never\nflip a revoked device back to active \u2014 only this explicit,\nowner-initiated action does. The device still has to re-register (and\nreconnect its command channel) afterwards to come back online.", "tags": ["agents"], "security": [{"JWTAuth": []}]}}, "/v1/agents/repositories/{repository_id}/local-preview": {"post": {"operationId": "apps_agents_api_start_local_preview", "summary": "Start Local Preview", "parameters": [{"in": "path", "name": "repository_id", "schema": {"title": "Repository Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LocalPreviewStatusResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "503": {"description": "Service Unavailable", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agents"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/LocalPreviewStartRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agents/repositories/{repository_id}/local-preview/{preview_id}": {"get": {"operationId": "apps_agents_api_get_local_preview", "summary": "Get Local Preview", "parameters": [{"in": "path", "name": "repository_id", "schema": {"title": "Repository Id", "type": "integer"}, "required": true}, {"in": "path", "name": "preview_id", "schema": {"title": "Preview Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LocalPreviewStatusResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "503": {"description": "Service Unavailable", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agents"], "security": [{"JWTAuth": []}]}, "delete": {"operationId": "apps_agents_api_stop_local_preview", "summary": "Stop Local Preview", "parameters": [{"in": "path", "name": "repository_id", "schema": {"title": "Repository Id", "type": "integer"}, "required": true}, {"in": "path", "name": "preview_id", "schema": {"title": "Preview Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LocalPreviewStatusResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "503": {"description": "Service Unavailable", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agents"], "security": [{"JWTAuth": []}]}}, "/v1/agents/chats/{session_id}/model": {"patch": {"operationId": "apps_agents_chat_management_api_update_agent_chat_session_model", "summary": "Update Agent Chat Session Model", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentChatSummary"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Persist the chat's agent_type/model so every surface sees the same pick.\n\nAny user with write access to the session can change these fields. The\nupdate is non-destructive (no participant or transcript changes), so we\nuse the broader write-access check rather than owner-only \u2014 switching\nmodels is a normal in-conversation action, not a destructive one.", "tags": ["agents"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateChatModelRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agents/chats/{session_id}/notification-preference": {"patch": {"operationId": "apps_agents_chat_management_api_update_agent_chat_notification_preference", "summary": "Update Agent Chat Notification Preference", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentChatSummary"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Persist where this chat should notify the user when an answer is required.", "tags": ["agents"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateChatNotificationPreferenceRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agents/chat-hide-rules": {"get": {"operationId": "apps_agents_chat_hide_rules_api_list_chat_hide_rules", "summary": "List Chat Hide Rules", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ChatHideRuleListResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List the requesting user's chat hide rules, newest first.", "tags": ["agents"], "security": [{"JWTAuth": []}]}, "post": {"operationId": "apps_agents_chat_hide_rules_api_create_chat_hide_rule", "summary": "Create Chat Hide Rule", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ChatHideRuleSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Create a new hide rule. At least one match field must be set.", "tags": ["agents"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateChatHideRuleRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agents/chat-hide-rules/{rule_id}": {"patch": {"operationId": "apps_agents_chat_hide_rules_api_update_chat_hide_rule", "summary": "Update Chat Hide Rule", "parameters": [{"in": "path", "name": "rule_id", "schema": {"title": "Rule Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ChatHideRuleSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Update an existing hide rule. Owner-only.", "tags": ["agents"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateChatHideRuleRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}, "delete": {"operationId": "apps_agents_chat_hide_rules_api_delete_chat_hide_rule", "summary": "Delete Chat Hide Rule", "parameters": [{"in": "path", "name": "rule_id", "schema": {"title": "Rule Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SuccessMessageResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Delete a hide rule. Owner-only.", "tags": ["agents"], "security": [{"JWTAuth": []}]}}, "/v1/agents/chats/{session_id}/hide": {"post": {"operationId": "apps_agents_chat_hide_rules_api_hide_chat_session", "summary": "Hide Chat Session", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ChatHideRuleSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "One-click hide: create a rule from this chat's current title.\n\nThe rule matches the exact (case-insensitive) title, scoped to the\norganization the caller passed in (defaults to the chat's org). The\nchat row itself is not deleted \u2014 direct URLs still work.", "tags": ["agents"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/HideChatRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agents/my-work": {"get": {"operationId": "apps_agents_my_work_api_list_my_work", "summary": "List My Work", "parameters": [{"in": "query", "name": "organization_id", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Organization Id"}, "required": false}, {"in": "query", "name": "tab", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Tab"}, "required": false}, {"in": "query", "name": "state", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "State"}, "required": false}, {"in": "query", "name": "repo", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Repo"}, "required": false}, {"in": "query", "name": "age", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Age"}, "required": false}, {"in": "query", "name": "q", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Q"}, "required": false}, {"in": "query", "name": "sort", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Sort"}, "required": false}, {"in": "query", "name": "direction", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Direction"}, "required": false}, {"in": "query", "name": "scope", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Scope"}, "required": false}, {"in": "query", "name": "limit", "schema": {"default": 25, "title": "Limit", "type": "integer"}, "required": false}, {"in": "query", "name": "offset", "schema": {"default": 0, "title": "Offset", "type": "integer"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MyWorkListResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List owned agent chats with delivery/work signals for the My Work page.", "tags": ["agents"], "security": [{"JWTAuth": []}]}}, "/v1/agents/my-work/{session_id}": {"get": {"operationId": "apps_agents_my_work_api_get_my_work_item", "summary": "Get My Work Item", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}, {"in": "query", "name": "scope", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Scope"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MyWorkDetailResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Return one My Work item plus recent transcript context.", "tags": ["agents"], "security": [{"JWTAuth": []}]}}, "/v1/agents/my-work/{session_id}/archive": {"post": {"operationId": "apps_agents_my_work_api_archive_my_work_item", "summary": "Archive My Work Item", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SuccessMessageResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agents"], "security": [{"JWTAuth": []}]}, "delete": {"operationId": "apps_agents_my_work_api_unarchive_my_work_item", "summary": "Unarchive My Work Item", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SuccessMessageResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agents"], "security": [{"JWTAuth": []}]}}, "/v1/agents/my-work/{session_id}/cancel": {"post": {"operationId": "apps_agents_my_work_api_cancel_my_work_item", "summary": "Cancel My Work Item", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}, {"in": "query", "name": "scope", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Scope"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SuccessMessageResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "502": {"description": "Bad Gateway", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agents"], "security": [{"JWTAuth": []}]}}, "/v1/agents/sessions/{session_id}/participants": {"get": {"operationId": "apps_agents_group_chat_api_list_session_participants", "summary": "List Session Participants", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SessionParticipantsResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List participants of a session. Requires participant or org member access.", "tags": ["group-chat"], "security": [{"JWTAuth": []}]}, "post": {"operationId": "apps_agents_group_chat_api_add_session_participant", "summary": "Add Session Participant", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SessionParticipantSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Add a participant to a session. Any participant of the session can add users.", "tags": ["group-chat"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/AddParticipantRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agents/sessions/{session_id}/participants/{user_id}": {"delete": {"operationId": "apps_agents_group_chat_api_remove_session_participant", "summary": "Remove Session Participant", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}, {"in": "path", "name": "user_id", "schema": {"title": "User Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SuccessMessageResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Remove a participant from a session. Owner can remove anyone; participants can remove themselves.", "tags": ["group-chat"], "security": [{"JWTAuth": []}]}}, "/v1/agents/usage/orgs": {"get": {"operationId": "apps_agents_usage_api_list_org_usage", "summary": "List Org Usage", "parameters": [{"in": "query", "name": "search", "schema": {"default": "", "title": "Search", "type": "string"}, "required": false}, {"in": "query", "name": "limit", "schema": {"default": 25, "title": "Limit", "type": "integer"}, "required": false}, {"in": "query", "name": "offset", "schema": {"default": 0, "title": "Offset", "type": "integer"}, "required": false}, {"in": "query", "name": "weeks", "schema": {"default": 8, "title": "Weeks", "type": "integer"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrgUsageListResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List all organizations with their usage summaries (internal only).", "tags": ["usage"], "security": [{"JWTAuth": []}]}}, "/v1/agents/usage/orgs/{org_id}/weekly": {"get": {"operationId": "apps_agents_usage_api_get_org_weekly_usage", "summary": "Get Org Weekly Usage", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "query", "name": "weeks", "schema": {"default": 12, "title": "Weeks", "type": "integer"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrgWeeklyUsageResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get weekly usage breakdown for an organization.\n\nInternal users can view any org. Org admins/owners can view their own.", "tags": ["usage"], "security": [{"JWTAuth": []}]}}, "/v1/agents/database-connections": {"post": {"operationId": "apps_agents_database_api_create_database_connection", "summary": "Create Database Connection", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DatabaseConnectionResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Create a new database connection as MCP infrastructure records.", "tags": ["database-connections"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateDatabaseConnectionRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}, "get": {"operationId": "apps_agents_database_api_list_database_connections", "summary": "List Database Connections", "parameters": [{"in": "query", "name": "organization_id", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Organization Id"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DatabaseConnectionListResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List all database connections accessible to the current user.", "tags": ["database-connections"], "security": [{"JWTAuth": []}]}}, "/v1/agents/database-connections/{connection_id}": {"get": {"operationId": "apps_agents_database_api_get_database_connection", "summary": "Get Database Connection", "parameters": [{"in": "path", "name": "connection_id", "schema": {"title": "Connection Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DatabaseConnectionResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get a specific database connection by MCPServer ID.", "tags": ["database-connections"], "security": [{"JWTAuth": []}]}, "patch": {"operationId": "apps_agents_database_api_update_database_connection", "summary": "Update Database Connection", "parameters": [{"in": "path", "name": "connection_id", "schema": {"title": "Connection Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DatabaseConnectionResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Update an existing database connection.", "tags": ["database-connections"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateDatabaseConnectionRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}, "delete": {"operationId": "apps_agents_database_api_delete_database_connection", "summary": "Delete Database Connection", "parameters": [{"in": "path", "name": "connection_id", "schema": {"title": "Connection Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DeletedResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Delete a database connection (cascades to all related MCP records).", "tags": ["database-connections"], "security": [{"JWTAuth": []}]}}, "/v1/agents/database-connections/{connection_id}/test": {"post": {"operationId": "apps_agents_database_api_test_database_connection", "summary": "Test Database Connection", "parameters": [{"in": "path", "name": "connection_id", "schema": {"title": "Connection Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DatabaseConnectionTestResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Test a database connection by attempting a simple query.", "tags": ["database-connections"], "security": [{"JWTAuth": []}]}}, "/v1/agents/chats/sync/import": {"post": {"operationId": "apps_agents_terminal_sync_api_import_terminal_transcript", "summary": "Import Terminal Transcript", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TerminalTranscriptImportResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["terminal-sync"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/TerminalTranscriptImportRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agents/chats/sync/import/raw": {"post": {"operationId": "apps_agents_terminal_sync_api_import_terminal_transcript_raw", "summary": "Import Terminal Transcript Raw", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TerminalTranscriptImportResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "413": {"description": "Content Too Large", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["terminal-sync"], "security": [{"JWTAuth": []}]}}, "/v1/agents/chats/{session_id}/sync/export": {"get": {"operationId": "apps_agents_terminal_sync_api_export_terminal_transcript", "summary": "Export Terminal Transcript", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TerminalTranscriptExportResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["terminal-sync"], "security": [{"JWTAuth": []}]}}, "/v1/agents/chats/{session_id}/sync/state": {"get": {"operationId": "apps_agents_terminal_sync_api_get_chat_sync_state", "summary": "Get Chat Sync State", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SyncStateResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["terminal-sync"], "security": [{"JWTAuth": []}]}}, "/v1/agents/chats/{session_id}/sync/lease/acquire": {"post": {"operationId": "apps_agents_terminal_sync_api_acquire_chat_sync_lease", "summary": "Acquire Chat Sync Lease", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SyncStateResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["terminal-sync"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/SyncLeaseAcquireRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agents/chats/{session_id}/sync/lease/release": {"post": {"operationId": "apps_agents_terminal_sync_api_release_chat_sync_lease", "summary": "Release Chat Sync Lease", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SyncStateResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["terminal-sync"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/SyncLeaseReleaseRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agents/chats/{session_id}/sync/presence": {"post": {"operationId": "apps_agents_terminal_sync_api_update_chat_sync_presence", "summary": "Update Chat Sync Presence", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SyncStateResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["terminal-sync"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/SyncPresenceRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agents/chats/{session_id}/sync/handoff": {"post": {"operationId": "apps_agents_terminal_sync_api_handoff_chat_to_web", "summary": "Handoff Chat To Web", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SyncHandoffResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Hand a terminal-synced chat off to a cloud runner (\"continue in web\").\n\nThe terminal stops its local agent, pushes the working branch, and runs a\nfinal transcript import before calling this. We dispatch a cloud worker\nwith a kickoff message via a forced rehydration (any live idle worker is\nstopped and cached launch state cleared, so the worker rebuilds from the\njust-imported transcript and pushed branch), and only after the dispatch\nsucceeds take the web lease and mark the session active, so a failed\ndispatch never strands the chat locked behind a web lease with no agent\nrunning.", "tags": ["terminal-sync"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/SyncHandoffRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agents/sessions/{session_id}/message": {"post": {"operationId": "apps_agents_sse_actions_session_send_message", "summary": "Session Send Message", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SessionActionResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Send a follow-up chat message (lean SSE reimplementation of the WS ``message`` branch).\n\nUnlike the WS path there is no stream-task lifecycle here \u2014 the SSE GET\nstream forwards the agent's output. We still ensure/restart the worker and\nrun the full follow-up pipeline (attachments, mentions, optimistic update,\nenqueue, persist + echo).", "tags": ["agents-sse"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/SendMessageRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agents/sessions/{session_id}/user-question-response": {"post": {"operationId": "apps_agents_sse_actions_session_user_question_response", "summary": "Session User Question Response", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SessionActionResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Deliver an AskUserQuestion answer (lean SSE version of the WS branch).", "tags": ["agents-sse"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserQuestionResponseRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agents/sessions/{session_id}/stop": {"post": {"operationId": "apps_agents_sse_actions_session_stop", "summary": "Session Stop", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SessionActionResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Abort the in-flight turn (WS ``stop`` branch).", "tags": ["agents-sse"], "security": [{"JWTAuth": []}]}}, "/v1/agents/sessions/{session_id}/compact": {"post": {"operationId": "apps_agents_sse_actions_session_compact", "summary": "Session Compact", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SessionActionResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Request a context compaction (WS ``compact`` branch).", "tags": ["agents-sse"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CompactRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agents/sessions/{session_id}/focus": {"post": {"operationId": "apps_agents_sse_actions_session_focus", "summary": "Session Focus", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SessionActionResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Persist client focus state to Redis (WS ``focus_state`` branch).\n\nNo live runner session required \u2014 just the chat session (for org + access).", "tags": ["agents-sse"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/FocusStateRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agents/sessions/{session_id}/vault-secrets-response": {"post": {"operationId": "apps_agents_sse_actions_session_vault_secrets_response", "summary": "Session Vault Secrets Response", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SessionActionResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Push a vault-secrets response into Redis (WS ``vault_secrets_response`` branch).", "tags": ["agents-sse"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/VaultSecretsResponseRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agents/sessions/{session_id}/vault-action-response": {"post": {"operationId": "apps_agents_sse_actions_session_vault_action_response", "summary": "Session Vault Action Response", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SessionActionResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Push a vault management action response into Redis (WS ``vault_action_response``).", "tags": ["agents-sse"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/VaultActionResponseRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agents/sessions/{session_id}/fork": {"post": {"operationId": "apps_agents_sse_actions_session_fork", "summary": "Session Fork", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SessionActionResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Fork the conversation from an earlier user message (WS ``_handle_fork``).\n\nReuses the consumer's building blocks (``agent_session.truncate_jsonl`` +\nsoft-delete) and then runs the shared ``_process_follow_up`` pipeline. The\nWS version re-enters ``receive_json`` with the edited payload to get full\nfollow-up handling; here we call the same pipeline directly so the forked\nturn preserves permission mode, attachments, mentions, and context.", "tags": ["agents-sse"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ForkRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/admin/release-announcements/": {"post": {"operationId": "apps_agents_release_announcements_api_create_release_announcement", "summary": "Create Release Announcement", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ReleaseAnnouncementOut"}}}}, "201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ReleaseAnnouncementOut"}}}}}, "description": "Create or fetch a release announcement. Superuser only.", "tags": ["admin"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ReleaseAnnouncementCreate"}}}, "required": true}, "security": [{"JWTAuth": []}]}, "get": {"operationId": "apps_agents_release_announcements_api_list_release_announcements", "summary": "List Release Announcements", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/ReleaseAnnouncementOut"}, "title": "Response", "type": "array"}}}}}, "description": "List all release announcements. Superuser only.", "tags": ["admin"], "security": [{"JWTAuth": []}]}}, "/v1/billing/plans": {"get": {"operationId": "apps_billing_api_list_active_plans", "summary": "List Active Plans", "parameters": [{"in": "query", "name": "prefixes", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Prefixes"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ListPlansResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List active plan prices with interval and unit_amount.", "tags": ["billing"]}}, "/v1/billing/checkout-session": {"post": {"operationId": "apps_billing_api_create_checkout_session", "summary": "Create Checkout Session", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateCheckoutSessionResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Create a Stripe checkout session for subscription.", "tags": ["billing"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateCheckoutSessionRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/billing/portal-session": {"post": {"operationId": "apps_billing_api_create_portal_session", "summary": "Create Portal Session", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreatePortalSessionResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Create a Stripe billing portal session.", "tags": ["billing"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreatePortalSessionRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/billing/organizations/{organization_id}/billing-status": {"get": {"operationId": "apps_billing_api_get_billing_status", "summary": "Get Billing Status", "parameters": [{"in": "path", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BillingStatusResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get billing status for an organization.", "tags": ["billing"], "security": [{"JWTAuth": []}]}}, "/v1/billing/organizations/{organization_id}/stripe-summary": {"get": {"operationId": "apps_billing_api_get_stripe_summary", "summary": "Get Stripe Summary", "parameters": [{"in": "path", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/StripeSummaryResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Return Stripe customer, subscription, and invoice summary.", "tags": ["billing"], "security": [{"JWTAuth": []}]}}, "/v1/billing/organizations/{organization_id}/invoices": {"get": {"operationId": "apps_billing_api_list_invoices", "summary": "List Invoices", "parameters": [{"in": "path", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}, {"in": "query", "name": "limit", "schema": {"default": 10, "title": "Limit", "type": "integer"}, "required": false}, {"in": "query", "name": "starting_after", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Starting After"}, "required": false}, {"in": "query", "name": "ending_before", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Ending Before"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ListInvoicesResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List invoices for an organization with cursor pagination.", "tags": ["billing"], "security": [{"JWTAuth": []}]}}, "/v1/billing/organizations/{organization_id}/schedule-plan-change": {"post": {"operationId": "apps_billing_api_schedule_plan_change", "summary": "Schedule Plan Change", "parameters": [{"in": "path", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SchedulePlanChangeResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Schedule a plan price change to take effect at the end of the current period.", "tags": ["billing"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/SchedulePlanChangeRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/billing/organizations/{organization_id}/update-seats": {"post": {"operationId": "apps_billing_api_update_seats", "summary": "Update Seats", "parameters": [{"in": "path", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OkResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Update seat quantity on the organization's active subscription.", "tags": ["billing"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateSeatsRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/billing/organizations/{organization_id}/cancel-at-period-end": {"post": {"operationId": "apps_billing_api_cancel_at_period_end", "summary": "Cancel At Period End", "parameters": [{"in": "path", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CancelAtPeriodEndResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Mark all subscriptions to cancel at the end of the current billing period.", "tags": ["billing"], "security": [{"JWTAuth": []}]}}, "/v1/billing/organizations/{organization_id}/resume-subscriptions": {"post": {"operationId": "apps_billing_api_resume_subscriptions", "summary": "Resume Subscriptions", "parameters": [{"in": "path", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ResumeSubscriptionsResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Undo scheduled cancellation across all subscriptions for this customer.", "tags": ["billing"], "security": [{"JWTAuth": []}]}}, "/v1/billing/webhook": {"post": {"operationId": "apps_billing_api_stripe_webhook", "summary": "Stripe Webhook", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ReceivedResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Handle Stripe webhook events.", "tags": ["billing"]}}, "/v1/vercel/status": {"get": {"operationId": "apps_vercel_api_get_vercel_status", "summary": "Get Vercel Status", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VercelInstallationStatus"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get the current user's Vercel connection status across all their organizations.", "tags": ["vercel"], "security": [{"JWTAuth": []}]}}, "/v1/vercel/generate-state": {"post": {"operationId": "apps_vercel_api_generate_oauth_state", "summary": "Generate Oauth State", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VercelOAuthStateResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Generate a secure OAuth state token for Vercel integration.\n\nThis endpoint creates a signed, time-limited state token that includes\nthe user and organization information. The frontend should call this\nbefore redirecting to Vercel OAuth.", "tags": ["vercel"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/VercelOAuthStateRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/vercel/callback": {"get": {"operationId": "apps_vercel_api_vercel_oauth_callback", "summary": "Vercel Oauth Callback", "parameters": [{"in": "query", "name": "code", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Code"}, "required": false}, {"in": "query", "name": "state", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "State"}, "required": false}, {"in": "query", "name": "error", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error"}, "required": false}, {"in": "query", "name": "error_description", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error Description"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VercelOAuthConnectResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Handle Vercel OAuth callback.", "tags": ["vercel"]}}, "/v1/vercel/oauth-token": {"post": {"operationId": "apps_vercel_api_exchange_oauth_token", "summary": "Exchange Oauth Token", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VercelOAuthConnectResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Exchange OAuth authorization code for access token.\nThis endpoint is called by the frontend after handling the OAuth callback.", "tags": ["vercel"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/VercelOAuthTokenRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/vercel/disconnect": {"post": {"operationId": "apps_vercel_api_disconnect_vercel", "summary": "Disconnect Vercel", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VercelDisconnectResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Disconnect an organization's Vercel account.", "tags": ["vercel"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/VercelDisconnectRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/vercel/deployments": {"get": {"operationId": "apps_vercel_api_get_organization_deployments", "summary": "Get Organization Deployments", "parameters": [{"in": "query", "name": "organization_id", "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Organization Id"}, "required": false}, {"in": "query", "name": "limit", "schema": {"default": 50, "title": "Limit", "type": "integer"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/VercelDeploymentRead"}, "title": "Response", "type": "array"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get recent Vercel deployments for user's organizations.\nIf organization_id is provided, filter to that organization only.", "tags": ["vercel"], "security": [{"JWTAuth": []}]}}, "/v1/vercel/webhook": {"post": {"operationId": "apps_vercel_api_vercel_webhook", "summary": "Vercel Webhook", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VercelWebhookResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Handle incoming Vercel webhooks for deployment events.", "tags": ["vercel"]}}, "/v1/vercel/webhook/health": {"get": {"operationId": "apps_vercel_api_webhook_health", "summary": "Webhook Health", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VercelWebhookHealthResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Health check endpoint for Vercel webhook configuration.", "tags": ["vercel"]}}, "/v1/waitlist": {"post": {"operationId": "apps_waitlist_api_join_waitlist", "summary": "Join Waitlist", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WaitlistSignupResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "429": {"description": "Too Many Requests", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Join the waitlist.", "tags": ["waitlist"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/WaitlistSignupRequest"}}}, "required": true}}}, "/v1/support": {"post": {"operationId": "apps_support_api_create_support_ticket", "summary": "Create Support Ticket", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SupportTicketResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "429": {"description": "Too Many Requests", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Create a new support ticket.", "tags": ["support"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/SupportTicketCreate"}}}, "required": true}}}, "/v1/code-sync/update-file": {"post": {"operationId": "apps_code_sync_api_update_file_endpoint", "summary": "Update File Endpoint", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateFileBatchResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Batch visual-editor changes across one or more files and open a single PR.", "tags": ["code-sync"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateFileBatchRequest"}}}, "required": true}, "security": [{"OptionalJWTAuth": []}]}}, "/v1/code-sync/file-content": {"post": {"operationId": "apps_code_sync_api_get_file_content", "summary": "Get File Content", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/FileContentResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get the content of a file from a GitHub repository.", "tags": ["code-sync"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/FileContentRequest"}}}, "required": true}, "security": [{"OptionalJWTAuth": []}]}}, "/v1/code-sync/preview": {"post": {"operationId": "apps_code_sync_api_get_preview_from_github", "summary": "Get Preview From Github", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PreviewResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "429": {"description": "Too Many Requests", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get preview link from GitHub deployment.", "tags": ["code-sync"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/PreviewRequest"}}}, "required": true}, "security": [{"OptionalJWTAuth": []}]}}, "/v1/code-sync/deployment-events": {"get": {"operationId": "apps_code_sync_api_deployment_events_sse", "summary": "Deployment Events Sse", "parameters": [{"in": "query", "name": "repo_name", "schema": {"title": "Repo Name", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK"}}, "description": "Stream deployment status events via Server-Sent Events.\n\nSubscribes to the Redis pub/sub channel for the given repository and\nforwards deployment events to the client in real time.", "tags": ["code-sync"], "security": [{"OptionalJWTAuth": []}]}}, "/v1/code-sync/delete": {"post": {"operationId": "apps_code_sync_api_delete_branch_from_github", "summary": "Delete Branch From Github", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DeleteResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Delete a branch from GitHub.", "tags": ["code-sync"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/DeleteRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/code-sync/get-changes": {"post": {"operationId": "apps_code_sync_api_get_file_changes", "summary": "Get File Changes", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GetChangesResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get pattern-based code changes from LLM for a batch of files and return the modified content.", "tags": ["code-sync"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/GetChangesRequest"}}}, "required": true}, "security": [{"OptionalJWTAuth": []}]}}, "/v1/code-sync/get-agent-changes": {"post": {"operationId": "apps_code_sync_api_get_agent_file_changes", "summary": "Get Agent File Changes", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GetAgentChangesResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get code changes from coding agent without applying them to GitHub.\nSupports both streaming (Accept: text/event-stream) and non-streaming modes.", "tags": ["code-sync"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/GetAgentChangesRequest"}}}, "required": true}, "security": [{"OptionalJWTAuth": []}]}}, "/v1/code-sync/agent-changes-commit": {"post": {"operationId": "apps_code_sync_api_agent_changes_commit", "summary": "Agent Changes Commit", "parameters": [], "responses": {"200": {"description": "OK"}}, "description": "Generate code changes using the coding agent and commit them to GitHub.\nSupports both streaming (Accept: text/event-stream) and non-streaming modes.", "tags": ["code-sync"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentChangesCommitRequest"}}}, "required": true}, "security": [{"OptionalJWTAuth": []}]}}, "/v1/code-sync/analyze-repository-style": {"post": {"operationId": "apps_code_sync_api_analyze_repository_style", "summary": "Analyze Repository Style", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AnalyzeRepoStyleResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Return cached style analysis if fresh, else dispatch the analysis agent.\n\nThe agent run takes minutes, so this endpoint never blocks on it. Clients\nshould treat a ``status=\"queued\"`` response as \"check back in a few minutes\"\nand poll the cached ``style_analysis`` field via the repositories listing.", "tags": ["code-sync"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/AnalyzeRepoStyleRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/slack/install": {"post": {"operationId": "apps_slack_api_initiate_slack_install", "summary": "Initiate Slack Install", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SlackInstallResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Initiate Slack OAuth flow for installing the app to a workspace.", "tags": ["slack"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/SlackInstallRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/slack/callback": {"get": {"operationId": "apps_slack_api_slack_oauth_callback", "summary": "Slack Oauth Callback", "parameters": [{"in": "query", "name": "code", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Code"}, "required": false}, {"in": "query", "name": "state", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "State"}, "required": false}, {"in": "query", "name": "error", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error"}, "required": false}, {"in": "query", "name": "error_description", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error Description"}, "required": false}], "responses": {"200": {"description": "OK"}}, "description": "Handle Slack OAuth callback after user authorizes the app.", "tags": ["slack"]}}, "/v1/slack/status": {"get": {"operationId": "apps_slack_api_get_slack_status", "summary": "Get Slack Status", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SlackStatusResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get Slack installation status for user's organizations.", "tags": ["slack"], "security": [{"JWTAuth": []}]}}, "/v1/slack/disconnect": {"post": {"operationId": "apps_slack_api_disconnect_slack", "summary": "Disconnect Slack", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SlackDisconnectResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Disconnect Slack from an organization.", "tags": ["slack"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/SlackDisconnectRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/slack/link/status": {"get": {"operationId": "apps_slack_api_get_link_status", "summary": "Get Link Status", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SlackLinkStatusResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Check if current user has any Slack accounts linked.", "tags": ["slack"], "security": [{"JWTAuth": []}]}}, "/v1/slack/link/oauth/callback": {"get": {"operationId": "apps_slack_api_slack_link_oauth_callback", "summary": "Slack Link Oauth Callback", "parameters": [{"in": "query", "name": "state", "schema": {"title": "State", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK"}}, "description": "Complete OAuth linking after user authenticates with CodePress.", "tags": ["slack"], "security": [{"JWTAuth": []}]}}, "/v1/slack/link/disconnect": {"post": {"operationId": "apps_slack_api_disconnect_slack_link", "summary": "Disconnect Slack Link", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SuccessMessageResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Disconnect the current user's Slack link for a given organization.\nDeletes the SlackUserLink so the user is no longer associated with a Slack identity.", "tags": ["slack"], "security": [{"JWTAuth": []}]}}, "/v1/slack/link/complete": {"post": {"operationId": "apps_slack_api_complete_slack_link", "summary": "Complete Slack Link", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SuccessMessageResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Complete Slack user linking from the frontend.\nReceives the state token and links the Slack user to the authenticated CodePress user.", "tags": ["slack"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/SlackLinkCompleteRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/slack/notifications/preferences": {"get": {"operationId": "apps_slack_api_get_notification_preferences", "summary": "Get Notification Preferences", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SlackNotificationPreferenceResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get the current user's Slack notification preferences.", "tags": ["slack"], "security": [{"JWTAuth": []}]}, "post": {"operationId": "apps_slack_api_update_notification_preferences", "summary": "Update Notification Preferences", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SlackNotificationPreferenceResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Update the current user's Slack notification preferences.", "tags": ["slack"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/SlackNotificationPreferenceUpdate"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/slack/events": {"post": {"operationId": "apps_slack_api_slack_events_webhook", "summary": "Slack Events Webhook", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SlackWebhookResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Handle incoming Slack events.\n\nThis endpoint receives all Slack events (messages, mentions, etc.)\nand must respond within 3 seconds per Slack requirements.", "tags": ["slack"]}}, "/v1/slack/interactive": {"post": {"operationId": "apps_slack_api_slack_interactive_endpoint", "summary": "Slack Interactive Endpoint", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SlackWebhookResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Handle Slack interactive component payloads (button clicks, modals).\n\nSlack sends interactivity payloads as application/x-www-form-urlencoded\nwith a 'payload' field containing JSON. Signature is verified on raw bytes\nbefore any parsing.", "tags": ["slack"]}}, "/v1/slack/commands": {"post": {"operationId": "apps_slack_api_slack_slash_command_endpoint", "summary": "Slack Slash Command Endpoint", "parameters": [], "responses": {"200": {"description": "OK"}}, "description": "Handle Slack slash command payloads (/codepress, /model).\n\nSlack sends slash commands as application/x-www-form-urlencoded.\nThe handler is awaited directly (not fire-and-forget) because:\n- The trigger_id for opening modals expires in 3 seconds\n- We want to return error messages to the user\n\nMultiple slash commands can point to this endpoint \u2014 the ``command``\nfield in the payload is used to dispatch to the right handler.", "tags": ["slack"]}}, "/v1/slack/agent-identity/oauth/start": {"post": {"operationId": "apps_slack_api_start_agent_slack_identity_oauth", "summary": "Start Agent Slack Identity Oauth", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentSlackIdentityStartResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Mint an OAuth state token and return the Slack consent URL.\n\nThe frontend opens the URL in a popup. The user authenticates as the\nagent's Slack user (signing up first if the email isn't yet a Slack\nmember) and grants user scopes; Slack then redirects to our callback\nwith a code + state.", "tags": ["slack"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentSlackIdentityStartRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/slack/agent-identity/oauth/callback": {"get": {"operationId": "apps_slack_api_agent_slack_identity_oauth_callback", "summary": "Agent Slack Identity Oauth Callback", "parameters": [{"in": "query", "name": "code", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Code"}, "required": false}, {"in": "query", "name": "state", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "State"}, "required": false}, {"in": "query", "name": "error", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error"}, "required": false}], "responses": {"200": {"description": "OK"}}, "description": "Slack redirects here after the user grants user-scope consent.\n\nNo JWTAuth on this endpoint \u2014 the user is mid-popup and Slack only\nknows the `state` we issued. We trust the state token to identify the\nAgentTeammate, then exchange the code for a user OAuth token.\n\nA single redirect URI is registered with Slack across all staging\nnamespaces (``api-staging.codepress.dev/...``); the shared backend\nparses the namespace prefix from ``state`` and 302-forwards to the\nnamespace that started the flow when the prefix doesn't match here.", "tags": ["slack"]}}, "/v1/slack/agent-identity/{agent_teammate_id}": {"get": {"operationId": "apps_slack_api_get_agent_slack_identity_status", "summary": "Get Agent Slack Identity Status", "parameters": [{"in": "path", "name": "agent_teammate_id", "schema": {"title": "Agent Teammate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentSlackIdentityStatusResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Return all per-workspace Slack identity rows for the agent.", "tags": ["slack"], "security": [{"JWTAuth": []}]}}, "/v1/staging/environments": {"get": {"operationId": "apps_staging_api_get_staging_environments", "summary": "Get Staging Environments", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/StagingEnvironmentsResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Return authenticated, internal-only staging API targets.", "tags": ["staging"], "security": [{"JWTAuth": []}]}}, "/v1/staging/environments/{namespace}/partial-teardown": {"post": {"operationId": "apps_staging_api_partial_teardown_staging_environment", "summary": "Partial Teardown Staging Environment", "parameters": [{"in": "path", "name": "namespace", "schema": {"title": "Namespace", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/StagingNamespacePartialTeardownResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Queue the low-latency partial teardown for one staging namespace.", "tags": ["staging"], "security": [{"JWTAuth": []}]}}, "/v1/staging/global-provider-keys": {"put": {"operationId": "apps_staging_api_set_global_provider_key", "summary": "Set Global Provider Key", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GlobalProviderKeyResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Create or update the deployment-wide global provider credential (staging).", "tags": ["staging"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/SetGlobalProviderKeyRequest"}}}, "required": true}, "security": [{"GlobalByosAuth": []}]}, "get": {"operationId": "apps_staging_api_list_global_provider_keys", "summary": "List Global Provider Keys", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GlobalProviderKeyListResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List configured global provider credentials (token values never returned).", "tags": ["staging"], "security": [{"GlobalByosAuth": []}]}}, "/v1/staging/global-provider-keys/{provider}": {"delete": {"operationId": "apps_staging_api_delete_global_provider_key", "summary": "Delete Global Provider Key", "parameters": [{"in": "path", "name": "provider", "schema": {"title": "Provider", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GlobalProviderKeyMessageResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Delete the deployment-wide global provider credential for a provider (staging).", "tags": ["staging"], "security": [{"GlobalByosAuth": []}]}}, "/v1/staging/global-provider-keys/openai/device-auth/start": {"post": {"operationId": "apps_staging_api_start_global_openai_device_auth", "summary": "Start Global Openai Device Auth", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DeviceAuthStartResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Launch OpenAI device auth for the deployment-wide staging BYOS fallback.", "tags": ["staging"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/GlobalOpenAIDeviceAuthStartRequest"}}}, "required": true}, "security": [{"GlobalByosAuth": []}]}}, "/v1/staging/global-provider-keys/openai/device-auth/poll": {"post": {"operationId": "apps_staging_api_poll_global_openai_device_auth", "summary": "Poll Global Openai Device Auth", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DeviceAuthPollResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Poll OpenAI device auth and persist completed tokens globally for staging.", "tags": ["staging"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/DeviceAuthPollRequest"}}}, "required": true}, "security": [{"GlobalByosAuth": []}]}}, "/v1/google-workspace/setup-info": {"get": {"operationId": "apps_google_workspace_api_get_setup_info", "summary": "Get Setup Info", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SetupInfoResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "410": {"description": "Gone", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Reject new domain-wide delegation setup attempts.", "tags": ["google-workspace"], "security": [{"JWTAuth": []}]}}, "/v1/google-workspace/connect": {"post": {"operationId": "apps_google_workspace_api_connect_google_workspace", "summary": "Connect Google Workspace", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ConnectResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "410": {"description": "Gone", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Reject new domain-wide delegation connections.", "tags": ["google-workspace"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ConnectRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/google-workspace/org/{org_id}/status": {"get": {"operationId": "apps_google_workspace_api_get_status", "summary": "Get Status", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/StatusResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Return the Google Workspace connection status for an organization.", "tags": ["google-workspace"], "security": [{"JWTAuth": []}]}}, "/v1/google-workspace/org/{org_id}/verify": {"post": {"operationId": "apps_google_workspace_api_verify_connection", "summary": "Verify Connection", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VerifyResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "410": {"description": "Gone", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Reject domain-wide delegation verification attempts.", "tags": ["google-workspace"], "security": [{"JWTAuth": []}]}}, "/v1/google-workspace/org/{org_id}/disconnect": {"post": {"operationId": "apps_google_workspace_api_disconnect_google_workspace", "summary": "Disconnect Google Workspace", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DisconnectResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Remove the Google Workspace connection.", "tags": ["google-workspace"], "security": [{"JWTAuth": []}]}}, "/v1/google-workspace/org/{org_id}/update-services": {"post": {"operationId": "apps_google_workspace_api_update_services", "summary": "Update Services", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateServicesResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "410": {"description": "Gone", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Reject domain-wide delegation service updates.", "tags": ["google-workspace"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateServicesRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/mcp/internal/sidecar/activation": {"post": {"operationId": "apps_mcp_api_get_sidecar_activation", "summary": "Get Sidecar Activation", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MCPSidecarActivationResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "410": {"description": "Gone", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "424": {"description": "Failed Dependency", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Return a credentialed executable MCP activation spec for the trusted sidecar.", "tags": ["mcp"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/MCPSidecarActivationRequest"}}}, "required": true}}}, "/v1/mcp/internal/sidecar/tools": {"post": {"operationId": "apps_mcp_api_record_sidecar_tools", "summary": "Record Sidecar Tools", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MCPSidecarToolsRecordResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Persist executable MCP tool metadata observed by the trusted sidecar.", "tags": ["mcp"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/MCPSidecarToolsRecordRequest"}}}, "required": true}}}, "/v1/mcp/servers": {"get": {"operationId": "apps_mcp_api_list_global_mcp_servers", "summary": "List Global Mcp Servers", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/MCPServerListRead"}, "title": "Response", "type": "array"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List all global MCP servers in the catalog.\nAny authenticated user can view the catalog.", "tags": ["mcp"], "security": [{"JWTAuth": []}]}}, "/v1/mcp/servers/{server_id}": {"get": {"operationId": "apps_mcp_api_get_global_mcp_server", "summary": "Get Global Mcp Server", "parameters": [{"in": "path", "name": "server_id", "schema": {"title": "Server Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MCPServerRead"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get a specific global MCP server.", "tags": ["mcp"], "security": [{"JWTAuth": []}]}}, "/v1/mcp/organizations/{organization_id}/mcps": {"get": {"operationId": "apps_mcp_api_list_organization_mcps", "summary": "List Organization Mcps", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/OrganizationMCPListRead"}, "title": "Response", "type": "array"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List all MCPs enabled for an organization.", "tags": ["mcp"], "security": [{"JWTAuth": []}]}, "post": {"operationId": "apps_mcp_api_enable_mcp_for_organization", "summary": "Enable Mcp For Organization", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrganizationMCPRead"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Enable an MCP server for an organization.\nAdmin access required.", "tags": ["mcp"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrganizationMCPCreate"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/mcp/organizations/{organization_id}/mcps/quick-add": {"post": {"operationId": "apps_mcp_api_quick_add_mcp_for_organization", "summary": "Quick Add Mcp For Organization", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrganizationMCPRead"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Quick-add an MCP server for an organization.\n\nThis will:\n1. Create the global MCPServer if it doesn't exist\n2. Enable it for the organization\n\nLike: claude mcp add --transport http linear https://mcp.linear.app/mcp", "tags": ["mcp"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/MCPServerQuickAdd"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/mcp/organizations/{organization_id}/mcps/add-executable": {"post": {"operationId": "apps_mcp_api_add_executable_mcp_for_organization", "summary": "Add Executable Mcp For Organization", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrganizationMCPRead"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Add an executable MCP server for an organization.\n\nThis will:\n1. Create the global MCPServer with an executable:// URL\n2. Create the MCPExecutableConfig with execution details\n3. Enable it for the organization", "tags": ["mcp"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/MCPExecutableCreate"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/mcp/organizations/{organization_id}/mcps/{org_mcp_id}": {"get": {"operationId": "apps_mcp_api_get_organization_mcp", "summary": "Get Organization Mcp", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}, {"in": "path", "name": "org_mcp_id", "schema": {"title": "Org Mcp Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrganizationMCPRead"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get a specific organization MCP configuration.", "tags": ["mcp"], "security": [{"JWTAuth": []}]}, "put": {"operationId": "apps_mcp_api_update_organization_mcp", "summary": "Update Organization Mcp", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}, {"in": "path", "name": "org_mcp_id", "schema": {"title": "Org Mcp Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrganizationMCPRead"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Update an organization's MCP configuration.", "tags": ["mcp"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrganizationMCPUpdate"}}}, "required": true}, "security": [{"JWTAuth": []}]}, "delete": {"operationId": "apps_mcp_api_disable_mcp_for_organization", "summary": "Disable Mcp For Organization", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}, {"in": "path", "name": "org_mcp_id", "schema": {"title": "Org Mcp Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK"}}, "description": "Disable/remove an MCP from an organization.\nThis also removes the requesting user's credentials for this MCP.", "tags": ["mcp"], "security": [{"JWTAuth": []}]}}, "/v1/mcp/organizations/{organization_id}/mcps/{org_mcp_id}/my-credentials": {"get": {"operationId": "apps_mcp_api_get_my_credential_status", "summary": "Get My Credential Status", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}, {"in": "path", "name": "org_mcp_id", "schema": {"title": "Org Mcp Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MCPCredentialStatusResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get current user's credential status for an MCP.\n\nShows:\n- Whether user has personal credentials\n- Whether they're sharing with org\n- What credential would be used (and whose)", "tags": ["mcp"], "security": [{"JWTAuth": []}]}}, "/v1/mcp/organizations/{organization_id}/mcps/{org_mcp_id}/my-credentials/api-key": {"post": {"operationId": "apps_mcp_api_set_my_api_key", "summary": "Set My Api Key", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}, {"in": "path", "name": "org_mcp_id", "schema": {"title": "Org Mcp Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK"}}, "description": "Set API key credentials for the current user.", "tags": ["mcp"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/MCPUserCredentialCreate"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/mcp/organizations/{organization_id}/mcps/{org_mcp_id}/my-credentials/env-vars": {"post": {"operationId": "apps_mcp_api_set_my_env_vars", "summary": "Set My Env Vars", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}, {"in": "path", "name": "org_mcp_id", "schema": {"title": "Org Mcp Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MCPUserEnvVarsResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Set environment variable credentials for the current user.\n\nMerges with existing env vars (updates, doesn't replace).\nReturns warnings for unrecognized variable names.", "tags": ["mcp"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/MCPUserEnvVarsCreate"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/mcp/organizations/{organization_id}/mcps/{org_mcp_id}/credential-fields": {"get": {"operationId": "apps_mcp_api_get_credential_fields", "summary": "Get Credential Fields", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}, {"in": "path", "name": "org_mcp_id", "schema": {"title": "Org Mcp Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MCPCredentialFieldsResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get credential field requirements for an MCP.\n\nReturns the list of required env vars and which ones the user\nhas already configured, so the frontend can render the form.", "tags": ["mcp"], "security": [{"JWTAuth": []}]}}, "/v1/mcp/organizations/{organization_id}/mcps/{org_mcp_id}/my-credentials/revoke": {"post": {"operationId": "apps_mcp_api_revoke_my_credentials", "summary": "Revoke My Credentials", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}, {"in": "path", "name": "org_mcp_id", "schema": {"title": "Org Mcp Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK"}}, "description": "Revoke the current user's credentials for an MCP.", "tags": ["mcp"], "security": [{"JWTAuth": []}]}}, "/v1/mcp/organizations/{organization_id}/mcps/{org_mcp_id}/credentials/summary": {"get": {"operationId": "apps_mcp_api_get_org_credential_summary", "summary": "Get Org Credential Summary", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}, {"in": "path", "name": "org_mcp_id", "schema": {"title": "Org Mcp Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MCPOrgCredentialSummary"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get summary of all credentials for an org's MCP.\nAdmin only - for transparency.", "tags": ["mcp"], "security": [{"JWTAuth": []}]}}, "/v1/mcp/organizations/{organization_id}/mcps/{org_mcp_id}/test": {"post": {"operationId": "apps_mcp_api_test_mcp_connection", "summary": "Test Mcp Connection", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}, {"in": "path", "name": "org_mcp_id", "schema": {"title": "Org Mcp Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MCPServerTestResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Test connection to an MCP server using current user's credentials.", "tags": ["mcp"], "security": [{"JWTAuth": []}]}}, "/v1/mcp/organizations/{organization_id}/mcps/{org_mcp_id}/oauth/discover": {"post": {"operationId": "apps_mcp_api_oauth_discover_mcp_oauth", "summary": "Discover Mcp Oauth", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}, {"in": "path", "name": "org_mcp_id", "schema": {"title": "Org Mcp Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK"}}, "description": "Discover OAuth requirements for an MCP server.", "tags": ["mcp-oauth"], "security": [{"JWTAuth": []}]}}, "/v1/mcp/organizations/{organization_id}/mcps/{org_mcp_id}/oauth/start": {"post": {"operationId": "apps_mcp_api_oauth_start_user_oauth_flow", "summary": "Start User Oauth Flow", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}, {"in": "path", "name": "org_mcp_id", "schema": {"title": "Org Mcp Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MCPOAuthStartResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Start OAuth flow for current user to get their own credentials.", "tags": ["mcp-oauth"], "security": [{"JWTAuth": []}]}}, "/v1/mcp/oauth/callback/pkce": {"post": {"operationId": "apps_mcp_api_oauth_complete_oauth_with_pkce", "summary": "Complete Oauth With Pkce", "parameters": [{"in": "query", "name": "code", "schema": {"title": "Code", "type": "string"}, "required": true}, {"in": "query", "name": "state", "schema": {"title": "State", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MCPOAuthCallbackResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Complete OAuth flow using PKCE - creates user-level credentials.", "tags": ["mcp-oauth"], "security": [{"JWTAuth": []}]}}, "/v1/mcp/oauth/callback": {"get": {"operationId": "apps_mcp_api_oauth_oauth_callback_redirect", "summary": "Oauth Callback Redirect", "parameters": [{"in": "query", "name": "code", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Code"}, "required": false}, {"in": "query", "name": "state", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "State"}, "required": false}, {"in": "query", "name": "error", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error"}, "required": false}, {"in": "query", "name": "error_description", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error Description"}, "required": false}], "responses": {"200": {"description": "OK"}}, "description": "OAuth callback endpoint that receives the authorization code directly from\nthe OAuth provider. No JWT auth required \u2014 the state token provides CSRF\nprotection. User/org/server are derived from the DB credential lookup.\n\nExchanges the code for tokens, stores credentials, and redirects to the\nweb app success page.", "tags": ["mcp-oauth"]}}, "/v1/mcp/organizations/{organization_id}/mcps/{org_mcp_id}/oauth/status": {"get": {"operationId": "apps_mcp_api_oauth_get_oauth_status", "summary": "Get Oauth Status", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}, {"in": "path", "name": "org_mcp_id", "schema": {"title": "Org Mcp Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MCPOAuthStatusResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get OAuth status for current user's credentials.", "tags": ["mcp-oauth"], "security": [{"JWTAuth": []}]}}, "/v1/mcp/organizations/{organization_id}/mcps/{org_mcp_id}/oauth/google/start": {"post": {"operationId": "apps_mcp_api_provider_oauth_start_google_oauth_flow", "summary": "Start Google Oauth Flow", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}, {"in": "path", "name": "org_mcp_id", "schema": {"title": "Org Mcp Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MCPGoogleOAuthStartResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "410": {"description": "Gone", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Start Google OAuth for provider-based executable MCP integrations.", "tags": ["mcp-provider-oauth"], "security": [{"JWTAuth": []}]}}, "/v1/mcp/oauth/google/callback": {"get": {"operationId": "apps_mcp_api_provider_oauth_google_oauth_callback_redirect", "summary": "Google Oauth Callback Redirect", "parameters": [{"in": "query", "name": "code", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Code"}, "required": false}, {"in": "query", "name": "state", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "State"}, "required": false}, {"in": "query", "name": "error", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error"}, "required": false}, {"in": "query", "name": "error_description", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error Description"}, "required": false}], "responses": {"200": {"description": "OK"}}, "description": "Provider-specific Google OAuth callback.\n\nThis endpoint exchanges code -> tokens and redirects directly to MCP success page.", "tags": ["mcp-provider-oauth"]}}, "/v1/mcp/organizations/{organization_id}/mcps/{org_mcp_id}/oauth/google/status": {"get": {"operationId": "apps_mcp_api_provider_oauth_get_google_oauth_status", "summary": "Get Google Oauth Status", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}, {"in": "path", "name": "org_mcp_id", "schema": {"title": "Org Mcp Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MCPOAuthStatusResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "410": {"description": "Gone", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get OAuth status for Google provider MCP integrations.", "tags": ["mcp-provider-oauth"], "security": [{"JWTAuth": []}]}}, "/v1/mcp/organizations/{organization_id}/oauth-clients/google/status": {"get": {"operationId": "apps_mcp_api_provider_oauth_get_org_google_oauth_client_status", "summary": "Get Org Google Oauth Client Status", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MCPGoogleOAuthClientStatusResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "410": {"description": "Gone", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Compatibility tombstone for retired generic Google OAuth clients.", "tags": ["mcp-provider-oauth"], "security": [{"JWTAuth": []}]}}, "/v1/mcp/organizations/{organization_id}/oauth-clients/google": {"put": {"operationId": "apps_mcp_api_provider_oauth_upsert_org_google_oauth_client", "summary": "Upsert Org Google Oauth Client", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MCPGoogleOAuthClientStatusResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "410": {"description": "Gone", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Compatibility tombstone for retired generic Google OAuth clients.", "tags": ["mcp-provider-oauth"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/MCPGoogleOAuthClientUpsertRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}, "delete": {"operationId": "apps_mcp_api_provider_oauth_delete_org_google_oauth_client", "summary": "Delete Org Google Oauth Client", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MCPGoogleOAuthClientStatusResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "410": {"description": "Gone", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Compatibility tombstone for retired generic Google OAuth clients.", "tags": ["mcp-provider-oauth"], "security": [{"JWTAuth": []}]}}, "/v1/mcp/organizations/{organization_id}/oauth-clients/microsoft/status": {"get": {"operationId": "apps_mcp_api_provider_oauth_get_org_microsoft_oauth_client_status", "summary": "Get Org Microsoft Oauth Client Status", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MCPMicrosoftOAuthClientStatusResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get whether the organization has a BYO Microsoft OAuth client configured.", "tags": ["mcp-provider-oauth"], "security": [{"JWTAuth": []}]}}, "/v1/mcp/organizations/{organization_id}/oauth-clients/microsoft": {"put": {"operationId": "apps_mcp_api_provider_oauth_upsert_org_microsoft_oauth_client", "summary": "Upsert Org Microsoft Oauth Client", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MCPMicrosoftOAuthClientStatusResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Save or update org-scoped BYO Microsoft OAuth client fields.", "tags": ["mcp-provider-oauth"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/MCPMicrosoftOAuthClientUpsertRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}, "delete": {"operationId": "apps_mcp_api_provider_oauth_delete_org_microsoft_oauth_client", "summary": "Delete Org Microsoft Oauth Client", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MCPMicrosoftOAuthClientStatusResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Delete org-scoped BYO Microsoft OAuth client configuration.", "tags": ["mcp-provider-oauth"], "security": [{"JWTAuth": []}]}}, "/v1/mcp/organizations/{organization_id}/mcps/{org_mcp_id}/oauth/microsoft/start": {"post": {"operationId": "apps_mcp_api_provider_oauth_start_microsoft_oauth_flow", "summary": "Start Microsoft Oauth Flow", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}, {"in": "path", "name": "org_mcp_id", "schema": {"title": "Org Mcp Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MCPGoogleOAuthStartResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Start Microsoft OAuth for provider-based executable MCP integrations.", "tags": ["mcp-provider-oauth"], "security": [{"JWTAuth": []}]}}, "/v1/mcp/oauth/microsoft/callback": {"get": {"operationId": "apps_mcp_api_provider_oauth_microsoft_oauth_callback_redirect", "summary": "Microsoft Oauth Callback Redirect", "parameters": [{"in": "query", "name": "code", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Code"}, "required": false}, {"in": "query", "name": "state", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "State"}, "required": false}, {"in": "query", "name": "error", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error"}, "required": false}, {"in": "query", "name": "error_description", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error Description"}, "required": false}], "responses": {"200": {"description": "OK"}}, "description": "Provider-specific Microsoft OAuth callback \u2014 exchanges code for tokens.", "tags": ["mcp-provider-oauth"]}}, "/v1/mcp/organizations/{organization_id}/mcps/{org_mcp_id}/oauth/microsoft/status": {"get": {"operationId": "apps_mcp_api_provider_oauth_get_microsoft_oauth_status", "summary": "Get Microsoft Oauth Status", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}, {"in": "path", "name": "org_mcp_id", "schema": {"title": "Org Mcp Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MCPOAuthStatusResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get OAuth status for Microsoft provider MCP integrations.", "tags": ["mcp-provider-oauth"], "security": [{"JWTAuth": []}]}}, "/v1/mcp/organizations/{organization_id}/mcps/{org_mcp_id}/my-credentials/share": {"post": {"operationId": "apps_mcp_api_sharing_toggle_credential_sharing", "summary": "Toggle Credential Sharing", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}, {"in": "path", "name": "org_mcp_id", "schema": {"title": "Org Mcp Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MCPCredentialShareResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Toggle whether the user's credentials are shared with the organization.\n\nWhen share_with_org=True, sets this user's credential as the org fallback.\ndelegation_mode controls who can use it: \"org\" (everyone) or \"specific_users\".\nWhen \"specific_users\", pass user_ids to grant access to specific people.", "tags": ["mcp-sharing"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/MCPCredentialShareRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/mcp/organizations/{organization_id}/mcps/{org_mcp_id}/delegates": {"get": {"operationId": "apps_mcp_api_sharing_list_delegates", "summary": "List Delegates", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}, {"in": "path", "name": "org_mcp_id", "schema": {"title": "Org Mcp Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK"}}, "description": "List users who have been delegated access to this MCP's shared credential.", "tags": ["mcp-sharing"], "security": [{"JWTAuth": []}]}, "post": {"operationId": "apps_mcp_api_sharing_add_delegate", "summary": "Add Delegate", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}, {"in": "path", "name": "org_mcp_id", "schema": {"title": "Org Mcp Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MCPDelegateUser"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Add a user as a delegate for this MCP's shared credential.", "tags": ["mcp-sharing"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/MCPDelegateAddRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/mcp/organizations/{organization_id}/mcps/{org_mcp_id}/my-credentials/share-with-team": {"post": {"operationId": "apps_mcp_api_sharing_toggle_share_with_team", "summary": "Toggle Share With Team", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}, {"in": "path", "name": "org_mcp_id", "schema": {"title": "Org Mcp Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MCPShareWithTeamResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Toggle whether the user's credentials are shared with the org for multi-tenant\naccess via call_as_user.", "tags": ["mcp-sharing"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/MCPShareWithTeamRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/mcp/organizations/{organization_id}/mcps/{org_mcp_id}/shared-credentials": {"get": {"operationId": "apps_mcp_api_sharing_list_shared_credentials", "summary": "List Shared Credentials", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}, {"in": "path", "name": "org_mcp_id", "schema": {"title": "Org Mcp Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MCPSharedCredentialsResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List users who have shared their credentials for this MCP (is_shared_with_org=True).", "tags": ["mcp-sharing"], "security": [{"JWTAuth": []}]}}, "/v1/mcp/organizations/{organization_id}/mcps/{org_mcp_id}/delegates/{user_id}": {"delete": {"operationId": "apps_mcp_api_sharing_remove_delegate", "summary": "Remove Delegate", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}, {"in": "path", "name": "org_mcp_id", "schema": {"title": "Org Mcp Id", "type": "integer"}, "required": true}, {"in": "path", "name": "user_id", "schema": {"format": "uuid", "title": "User Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK"}}, "description": "Remove a user's delegated access to this MCP's shared credential.", "tags": ["mcp-sharing"], "security": [{"JWTAuth": []}]}}, "/v1/mcp/organizations/{organization_id}/mcps/{org_mcp_id}/delegation-mode": {"put": {"operationId": "apps_mcp_api_sharing_update_delegation_mode", "summary": "Update Delegation Mode", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}, {"in": "path", "name": "org_mcp_id", "schema": {"title": "Org Mcp Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK"}}, "description": "Update the delegation mode for an MCP's shared credential.", "tags": ["mcp-sharing"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/MCPDelegationModeUpdateRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/terminal/subscription/status": {"get": {"operationId": "apps_terminal_api_get_subscription_status", "summary": "Get Subscription Status", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TunnelSubscriptionStatusResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get the current user's tunnel subscription status.\n\nReturns subscription_source to indicate the *paid* entitlement source:\n- \"direct\": user has their own TunnelSubscription\n- \"org_plan\": user has access through an org's paid plan\n- None: user holds no paid terminal entitlement\n\nPersistent tunnels are reported separately through has_tunnel_access /\ntunnel_access_source, which also carry \"free\" when tunnels are unlocked for\neveryone. Clients must gate tunnel UI on those and reserve has_subscription\nfor the paid-only features (unlimited screen sharing, CodePress dev loop).", "tags": ["terminal"], "security": [{"JWTAuth": []}]}}, "/v1/terminal/subscription/plans": {"get": {"operationId": "apps_terminal_api_list_tunnel_plans", "summary": "List Tunnel Plans", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ListTunnelPlansResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List available tunnel subscription plans.\n\nReturns nothing while tunnels are free, so an older desktop build has no\nprice to render and cannot walk a user into a checkout the API would reject.", "tags": ["terminal"]}}, "/v1/terminal/subscription/checkout": {"post": {"operationId": "apps_terminal_api_create_checkout_session", "summary": "Create Checkout Session", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateTunnelCheckoutResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Create a Stripe checkout session for tunnel subscription.", "tags": ["terminal"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateTunnelCheckoutRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/terminal/subscription/portal": {"post": {"operationId": "apps_terminal_api_create_portal_session", "summary": "Create Portal Session", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateTunnelPortalResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Create a Stripe billing portal session for managing tunnel subscription.", "tags": ["terminal"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateTunnelPortalRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/terminal/register-free-tunnel": {"post": {"operationId": "apps_terminal_api_register_free_tunnel", "summary": "Register Free Tunnel", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HostnameRegistrationResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Register a free tunnel hostname for the authenticated user.\n\nEach user can have one free tunnel registered at a time. When the tunnel\nURL changes (ephemeral trycloudflare.com URLs), the hostname is updated.\nThis allows OAuth callbacks to validate tunnel ownership for free tunnels.", "tags": ["terminal"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/RegisterFreeTunnelRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/terminal": {"post": {"operationId": "apps_terminal_api_create_tunnel", "summary": "Create Tunnel", "parameters": [], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TunnelResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "402": {"description": "Payment Required", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "502": {"description": "Bad Gateway", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Create a new persistent tunnel for the current user.\n\nUsers with an active entitlement may create any number of tunnels \u2014 typically\none per machine. Subdomains are globally unique.", "tags": ["terminal"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateTunnelRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}, "get": {"operationId": "apps_terminal_api_list_tunnels", "summary": "List Tunnels", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TunnelListResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List all tunnels for the current user.", "tags": ["terminal"], "security": [{"JWTAuth": []}]}}, "/v1/terminal/current": {"get": {"operationId": "apps_terminal_api_get_current_tunnel", "summary": "Get Current Tunnel", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TunnelResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get the user's default tunnel (most recently connected, else newest).\n\nKept for backward compatibility with older desktop builds that don't track a\nper-machine selected tunnel id. New clients should call `GET /terminal` and\npick a specific tunnel.", "tags": ["terminal"], "security": [{"JWTAuth": []}]}, "delete": {"operationId": "apps_terminal_api_delete_tunnel", "summary": "Delete Tunnel", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OkResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "502": {"description": "Bad Gateway", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Delete the user's default tunnel (backward-compat).", "tags": ["terminal"], "security": [{"JWTAuth": []}]}}, "/v1/terminal/current/token": {"post": {"operationId": "apps_terminal_api_get_tunnel_token", "summary": "Get Tunnel Token", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TunnelTokenResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get the token for the user's default tunnel (backward-compat).", "tags": ["terminal"], "requestBody": {"content": {"application/json": {"schema": {"anyOf": [{"$ref": "#/components/schemas/GetTunnelTokenRequest"}, {"type": "null"}]}}}, "required": false}, "security": [{"JWTAuth": []}]}}, "/v1/terminal/{tunnel_id}/token": {"post": {"operationId": "apps_terminal_api_get_tunnel_token_by_id", "summary": "Get Tunnel Token By Id", "parameters": [{"in": "path", "name": "tunnel_id", "schema": {"title": "Tunnel Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TunnelTokenResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get the tunnel token for a specific tunnel owned by the current user.", "tags": ["terminal"], "requestBody": {"content": {"application/json": {"schema": {"anyOf": [{"$ref": "#/components/schemas/GetTunnelTokenRequest"}, {"type": "null"}]}}}, "required": false}, "security": [{"JWTAuth": []}]}}, "/v1/terminal/webhook": {"post": {"operationId": "apps_terminal_api_tunnel_webhook", "summary": "Tunnel Webhook", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WebhookReceiptResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Handle Stripe webhook events for tunnel subscriptions.\n\nThis handles tunnel-specific subscription events.", "tags": ["terminal"]}}, "/v1/terminal/validate-access": {"post": {"operationId": "apps_terminal_api_validate_access_token", "summary": "Validate Access Token", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidateAccessResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Validate an access token for a tunnel.\n\nThis endpoint is called by the terminal server to verify tokens.\nIt does not require authentication - the token itself is the credential.\n\nReturns whether the token is valid and its type (owner or share).", "tags": ["terminal"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidateAccessRequest"}}}, "required": true}}}, "/v1/terminal/validate-ownership": {"post": {"operationId": "apps_terminal_api_validate_tunnel_ownership", "summary": "Validate Tunnel Ownership", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OwnershipValidationResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Validate that the authenticated user owns a tunnel by hostname.\n\nThis is used by the terminal server to verify that a logged-in user\nhas access to the tunnel they're trying to access.", "tags": ["terminal"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ValidateOwnershipRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/terminal/current/health": {"get": {"operationId": "apps_terminal_api_get_tunnel_health", "summary": "Get Tunnel Health", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TunnelHealthResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Health of the default tunnel (backward-compat).", "tags": ["terminal"], "security": [{"JWTAuth": []}]}}, "/v1/terminal/{tunnel_id}": {"get": {"operationId": "apps_terminal_api_get_tunnel", "summary": "Get Tunnel", "parameters": [{"in": "path", "name": "tunnel_id", "schema": {"title": "Tunnel Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TunnelResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get a specific tunnel owned by the current user.", "tags": ["terminal"], "security": [{"JWTAuth": []}]}, "patch": {"operationId": "apps_terminal_api_update_tunnel", "summary": "Update Tunnel", "parameters": [{"in": "path", "name": "tunnel_id", "schema": {"title": "Tunnel Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TunnelResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Update mutable fields (currently just device_name) on a tunnel.", "tags": ["terminal"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateTunnelRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}, "delete": {"operationId": "apps_terminal_api_delete_tunnel_by_id", "summary": "Delete Tunnel By Id", "parameters": [{"in": "path", "name": "tunnel_id", "schema": {"title": "Tunnel Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OkResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "502": {"description": "Bad Gateway", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Delete a specific tunnel owned by the current user.", "tags": ["terminal"], "security": [{"JWTAuth": []}]}}, "/v1/terminal/{tunnel_id}/change-subdomain": {"post": {"operationId": "apps_terminal_api_change_tunnel_subdomain", "summary": "Change Tunnel Subdomain", "parameters": [{"in": "path", "name": "tunnel_id", "schema": {"title": "Tunnel Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TunnelResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "402": {"description": "Payment Required", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "502": {"description": "Bad Gateway", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Change the subdomain (URL) of an existing tunnel in place.\n\nThe DB row's primary key is preserved so any client bound to this tunnel\nid keeps working; the Cloudflare tunnel id, hostname, and token all\nchange. Returns the updated tunnel \u2014 the caller is responsible for\nre-fetching the token and re-activating cloudflared.", "tags": ["terminal"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ChangeSubdomainRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/terminal/{tunnel_id}/health": {"get": {"operationId": "apps_terminal_api_get_tunnel_health_by_id", "summary": "Get Tunnel Health By Id", "parameters": [{"in": "path", "name": "tunnel_id", "schema": {"title": "Tunnel Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TunnelHealthResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Health of a specific tunnel.", "tags": ["terminal"], "security": [{"JWTAuth": []}]}}, "/v1/terminal/check-subdomain/{subdomain}": {"get": {"operationId": "apps_terminal_api_check_subdomain_availability", "summary": "Check Subdomain Availability", "parameters": [{"in": "path", "name": "subdomain", "schema": {"title": "Subdomain", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SubdomainAvailabilityResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Check if a subdomain is available for use.", "tags": ["terminal"], "security": [{"JWTAuth": []}]}}, "/v1/terminal/current/secure-access/enable": {"post": {"operationId": "apps_terminal_api_enable_secure_access", "summary": "Enable Secure Access", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnableSecureAccessResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Enable secure access on the user's default tunnel (backward-compat).", "tags": ["terminal"], "security": [{"JWTAuth": []}]}}, "/v1/terminal/{tunnel_id}/secure-access/enable": {"post": {"operationId": "apps_terminal_api_enable_secure_access_by_id", "summary": "Enable Secure Access By Id", "parameters": [{"in": "path", "name": "tunnel_id", "schema": {"title": "Tunnel Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnableSecureAccessResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Enable secure access on a specific tunnel.", "tags": ["terminal"], "security": [{"JWTAuth": []}]}}, "/v1/terminal/current/secure-access/disable": {"post": {"operationId": "apps_terminal_api_disable_secure_access", "summary": "Disable Secure Access", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SecureAccessStatusResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Disable secure access on the user's default tunnel (backward-compat).", "tags": ["terminal"], "security": [{"JWTAuth": []}]}}, "/v1/terminal/{tunnel_id}/secure-access/disable": {"post": {"operationId": "apps_terminal_api_disable_secure_access_by_id", "summary": "Disable Secure Access By Id", "parameters": [{"in": "path", "name": "tunnel_id", "schema": {"title": "Tunnel Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SecureAccessStatusResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Disable secure access on a specific tunnel.", "tags": ["terminal"], "security": [{"JWTAuth": []}]}}, "/v1/terminal/current/secure-access/status": {"get": {"operationId": "apps_terminal_api_get_secure_access_status", "summary": "Get Secure Access Status", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SecureAccessStatusResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Status of secure access on the default tunnel.", "tags": ["terminal"], "security": [{"JWTAuth": []}]}}, "/v1/terminal/{tunnel_id}/secure-access/status": {"get": {"operationId": "apps_terminal_api_get_secure_access_status_by_id", "summary": "Get Secure Access Status By Id", "parameters": [{"in": "path", "name": "tunnel_id", "schema": {"title": "Tunnel Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SecureAccessStatusResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Status of secure access on a specific tunnel.", "tags": ["terminal"], "security": [{"JWTAuth": []}]}}, "/v1/terminal/current/secure-access/regenerate": {"post": {"operationId": "apps_terminal_api_regenerate_access_token", "summary": "Regenerate Access Token", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnableSecureAccessResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Regenerate access token on the default tunnel (backward-compat).", "tags": ["terminal"], "security": [{"JWTAuth": []}]}}, "/v1/terminal/{tunnel_id}/secure-access/regenerate": {"post": {"operationId": "apps_terminal_api_regenerate_access_token_by_id", "summary": "Regenerate Access Token By Id", "parameters": [{"in": "path", "name": "tunnel_id", "schema": {"title": "Tunnel Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/EnableSecureAccessResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Regenerate access token on a specific tunnel.", "tags": ["terminal"], "security": [{"JWTAuth": []}]}}, "/v1/terminal/current/share-links": {"post": {"operationId": "apps_terminal_api_create_share_link", "summary": "Create Share Link", "parameters": [], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ShareLinkResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Create a share link for the default tunnel (backward-compat).", "tags": ["terminal"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateShareLinkRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}, "get": {"operationId": "apps_terminal_api_list_share_links", "summary": "List Share Links", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ListShareLinksResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List share links for the default tunnel (backward-compat).", "tags": ["terminal"], "security": [{"JWTAuth": []}]}, "delete": {"operationId": "apps_terminal_api_revoke_all_share_links", "summary": "Revoke All Share Links", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RevokedCountResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Revoke all share links on the default tunnel (backward-compat).", "tags": ["terminal"], "security": [{"JWTAuth": []}]}}, "/v1/terminal/{tunnel_id}/share-links": {"post": {"operationId": "apps_terminal_api_create_share_link_by_id", "summary": "Create Share Link By Id", "parameters": [{"in": "path", "name": "tunnel_id", "schema": {"title": "Tunnel Id", "type": "string"}, "required": true}], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ShareLinkResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Create a share link for a specific tunnel.", "tags": ["terminal"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateShareLinkRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}, "get": {"operationId": "apps_terminal_api_list_share_links_by_id", "summary": "List Share Links By Id", "parameters": [{"in": "path", "name": "tunnel_id", "schema": {"title": "Tunnel Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ListShareLinksResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List share links for a specific tunnel.", "tags": ["terminal"], "security": [{"JWTAuth": []}]}, "delete": {"operationId": "apps_terminal_api_revoke_all_share_links_by_id", "summary": "Revoke All Share Links By Id", "parameters": [{"in": "path", "name": "tunnel_id", "schema": {"title": "Tunnel Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RevokedCountResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Revoke all share links on a specific tunnel.", "tags": ["terminal"], "security": [{"JWTAuth": []}]}}, "/v1/terminal/current/share-links/{link_id}": {"delete": {"operationId": "apps_terminal_api_revoke_share_link", "summary": "Revoke Share Link", "parameters": [{"in": "path", "name": "link_id", "schema": {"title": "Link Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OkResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Revoke a share link on the default tunnel (backward-compat).", "tags": ["terminal"], "security": [{"JWTAuth": []}]}}, "/v1/terminal/{tunnel_id}/share-links/{link_id}": {"delete": {"operationId": "apps_terminal_api_revoke_share_link_by_id", "summary": "Revoke Share Link By Id", "parameters": [{"in": "path", "name": "tunnel_id", "schema": {"title": "Tunnel Id", "type": "string"}, "required": true}, {"in": "path", "name": "link_id", "schema": {"title": "Link Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OkResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Revoke a share link on a specific tunnel.", "tags": ["terminal"], "security": [{"JWTAuth": []}]}}, "/v1/terminal/by-hostname/{hostname}/secure-status": {"get": {"operationId": "apps_terminal_api_get_tunnel_secure_status_by_hostname", "summary": "Get Tunnel Secure Status By Hostname", "parameters": [{"in": "path", "name": "hostname", "schema": {"title": "Hostname", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SecureAccessEnabledResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Check if a tunnel has secure access enabled by hostname.\n\nThis is a public endpoint used by the terminal server to determine\nwhether to show the auth gate.", "tags": ["terminal"]}}, "/v1/terminal/streaming/can-stream": {"post": {"operationId": "apps_terminal_api_can_stream", "summary": "Can Stream", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CanStreamResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Check if a user can start streaming.\n\nWorks for both authenticated and anonymous users.\nRequires machine_id in request body. If user is authenticated (via JWT),\ntheir account will be linked to the usage record.\n\nReturns whether the user has remaining free tier time or an active subscription.", "tags": ["terminal"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/StreamingCheckRequest"}}}, "required": true}}}, "/v1/terminal/streaming/usage": {"post": {"operationId": "apps_terminal_api_get_streaming_usage", "summary": "Get Streaming Usage", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/StreamingUsageResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get streaming usage statistics.\n\nWorks for both authenticated and anonymous users.\nRequires machine_id in request body.", "tags": ["terminal"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/StreamingCheckRequest"}}}, "required": true}}}, "/v1/terminal/streaming/sessions/start": {"post": {"operationId": "apps_terminal_api_start_streaming_session", "summary": "Start Streaming Session", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/StreamingSessionResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Start a new streaming session.\n\nWorks for both authenticated and anonymous users.\nRequires machine_id in request body.\nReturns 403 if the user has exceeded their free tier limit and has no subscription.", "tags": ["terminal"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/StartStreamingSessionRequest"}}}, "required": true}}}, "/v1/terminal/streaming/sessions/stop": {"post": {"operationId": "apps_terminal_api_stop_streaming_session", "summary": "Stop Streaming Session", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/StreamingSessionResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Stop an active streaming session.\n\nWorks for both authenticated and anonymous users.\nRequires machine_id in request body.\nRecords the duration and updates the user's total usage.", "tags": ["terminal"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/StopStreamingSessionRequest"}}}, "required": true}}}, "/v1/terminal/streaming/heartbeat": {"post": {"operationId": "apps_terminal_api_streaming_heartbeat", "summary": "Streaming Heartbeat", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HeartbeatResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Send a heartbeat and record streaming time.\n\nWorks for both authenticated and anonymous users.\nRequires machine_id in request body.\nShould be called periodically (every 30 seconds recommended) to track usage.\n\nFor authenticated users with active sessions, also updates the session heartbeat.", "tags": ["terminal"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/HeartbeatRequest"}}}, "required": true}}}, "/v1/terminal/streaming/sessions": {"get": {"operationId": "apps_terminal_api_list_streaming_sessions", "summary": "List Streaming Sessions", "parameters": [{"in": "query", "name": "limit", "schema": {"default": 20, "title": "Limit", "type": "integer"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/StreamingSessionResponse"}, "title": "Response", "type": "array"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List recent streaming sessions for the current user.\n\nRequires authentication - only authenticated users have session tracking.", "tags": ["terminal"], "security": [{"JWTAuth": []}]}}, "/v1/terminal/streaming/sessions/{session_id}": {"get": {"operationId": "apps_terminal_api_get_streaming_session", "summary": "Get Streaming Session", "parameters": [{"in": "path", "name": "session_id", "schema": {"title": "Session Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/StreamingSessionResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get details of a specific streaming session.\n\nRequires authentication - only authenticated users have session tracking.", "tags": ["terminal"], "security": [{"JWTAuth": []}]}}, "/v1/terminal/events/ack": {"post": {"operationId": "apps_terminal_api_ack_webhook_delivery", "summary": "Ack Webhook Delivery", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AckWebhookDeliveryResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Acknowledge receipt of a webhook event.\n\nMarks the WebhookDelivery as delivered so it won't be retried\nor replayed on reconnect.", "tags": ["terminal"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/AckWebhookDeliveryRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/terminal/events/claim": {"post": {"operationId": "apps_terminal_api_claim_webhook_delivery", "summary": "Claim Webhook Delivery", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ClaimWebhookDeliveryResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Claim exclusive injection rights for a webhook event.\n\nEvents are fanned out over SSE to every connected terminal of the user.\nAny terminal that finds a matching tab calls this endpoint before\ninjecting; only the first granted claimant delivers, so a review is never\ninjected twice. The terminal-origin stamp on the event is a priority hint,\nnot a gate: the stamped terminal claims instantly, while other terminals\nare held back for a short grace window so events whose stamped origin no\nlonger exists (settings reset, dev instance, second machine) still get\ndelivered by branch match instead of being orphaned.", "tags": ["terminal"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ClaimWebhookDeliveryRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/terminal/power/samples": {"post": {"operationId": "apps_terminal_api_upload_power_samples", "summary": "Upload Power Samples", "parameters": [], "responses": {"201": {"description": "Created", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UploadPowerSamplesResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "429": {"description": "Too Many Requests", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Ingest a batch of power profiling samples from the desktop terminal app.\n\nThe terminal uploads CPU-time deltas for its process tree plus xterm\nrender-activity rollups every few minutes. Rows are stored per\nuser/machine/version for fleet-wide battery regression analysis, and\naggregate totals are emitted as CloudWatch EMF metrics.", "tags": ["terminal"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UploadPowerSamplesRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/automations/config/{org_id}/{automation_type}": {"get": {"operationId": "apps_automations_api_get_config", "summary": "Get Config", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "automation_type", "schema": {"title": "Automation Type", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AutomationConfigSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get automation configuration for an organization and type.", "tags": ["automations"], "security": [{"JWTAuth": []}]}, "put": {"operationId": "apps_automations_api_update_config", "summary": "Update Config", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "automation_type", "schema": {"title": "Automation Type", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AutomationConfigSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Update automation configuration. Admin/owner only.", "tags": ["automations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/AutomationConfigUpdateSchema"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/automations/status/{org_id}": {"get": {"operationId": "apps_automations_api_get_status", "summary": "Get Status", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AutomationStatusSchema"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Lightweight status check for the integrations overview page.", "tags": ["automations"], "security": [{"JWTAuth": []}]}}, "/v1/automations/runs/{org_id}": {"get": {"operationId": "apps_automations_api_list_runs", "summary": "List Runs", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "query", "name": "automation_type", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Automation Type"}, "required": false}, {"in": "query", "name": "config_id", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Config Id"}, "required": false}, {"in": "query", "name": "status", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Status"}, "required": false}, {"in": "query", "name": "created_after", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created After"}, "required": false}, {"in": "query", "name": "min_duration", "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Min Duration"}, "required": false}, {"in": "query", "name": "max_duration", "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Max Duration"}, "required": false}, {"in": "query", "name": "launching_session_id", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Launching Session Id"}, "required": false}, {"in": "query", "name": "limit", "schema": {"default": 25, "title": "Limit", "type": "integer"}, "required": false}, {"in": "query", "name": "offset", "schema": {"default": 0, "title": "Offset", "type": "integer"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AutomationRunListSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List recent automation runs for an organization.", "tags": ["automations"], "security": [{"JWTAuth": []}]}}, "/v1/automations/custom/{org_id}/{config_id}/scheduled-runs": {"post": {"operationId": "apps_automations_api_create_scheduled_run", "summary": "Create Scheduled Run", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "config_id", "schema": {"title": "Config Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AutomationRunSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Create a durable one-off scheduled run for an enabled custom automation.", "tags": ["automations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ScheduledAutomationRunCreateSchema"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/automations/runs/{org_id}/{run_uuid}": {"get": {"operationId": "apps_automations_api_get_run", "summary": "Get Run", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "run_uuid", "schema": {"title": "Run Uuid", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AutomationRunSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get one automation run for the focused dashboard detail view.", "tags": ["automations"], "security": [{"JWTAuth": []}]}}, "/v1/automations/runs/{org_id}/{run_uuid}/steps": {"get": {"operationId": "apps_automations_api_list_run_steps", "summary": "List Run Steps", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "run_uuid", "schema": {"title": "Run Uuid", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AutomationRunStepListSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List durable workflow steps for one automation run.", "tags": ["automations"], "security": [{"JWTAuth": []}]}}, "/v1/automations/runs/{org_id}/{run_uuid}/cancel": {"post": {"operationId": "apps_automations_api_cancel_run", "summary": "Cancel Run", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "run_uuid", "schema": {"title": "Run Uuid", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CancelRunResponseSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Cancel an active automation run.", "tags": ["automations"], "security": [{"JWTAuth": []}]}}, "/v1/automations/runs/{org_id}/{run_uuid}/rerun": {"post": {"operationId": "apps_automations_api_rerun_run", "summary": "Rerun Run", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "run_uuid", "schema": {"title": "Run Uuid", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RerunRunResponseSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Rerun an automation by replaying the original instruction to a new agent session.", "tags": ["automations"], "security": [{"JWTAuth": []}]}}, "/v1/automations/runs/{org_id}/{run_uuid}/retry": {"post": {"operationId": "apps_automations_api_retry_run", "summary": "Retry Run", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "run_uuid", "schema": {"title": "Run Uuid", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RerunRunResponseSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Retry a failed durable workflow run from a checkpoint or from the start.", "tags": ["automations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/RetryRunRequestSchema"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/automations/runs/{org_id}/{run_uuid}/trigger-fix-agent": {"post": {"operationId": "apps_automations_api_trigger_fix_agent_run", "summary": "Trigger Fix Agent Run", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "run_uuid", "schema": {"title": "Run Uuid", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TriggerAgentRunResponseSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Manually launch a fix-agent investigation for a failed automation run.", "tags": ["automations"], "security": [{"JWTAuth": []}]}}, "/v1/automations/runs/{org_id}/{run_uuid}/trigger-optimizer": {"post": {"operationId": "apps_automations_api_trigger_optimizer_run", "summary": "Trigger Optimizer Run", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "run_uuid", "schema": {"title": "Run Uuid", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TriggerAgentRunResponseSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Manually launch an optimizer run for a completed automation run.", "tags": ["automations"], "security": [{"JWTAuth": []}]}}, "/v1/automations/custom/{org_id}/{config_id}/force-failure": {"post": {"operationId": "apps_automations_api_force_failure", "summary": "Force Failure", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "config_id", "schema": {"title": "Config Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ForceFailureResponseSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Synthesize a failed run and drive ``_handle_failure`` directly.\n\nThis is an admin-only test hook for exercising the fix-agent flow\nend-to-end without needing a real handler failure.  It bypasses\nwebhook signature verification, rate limiting, and Lambda invocation\n\u2014 creating a pre-failed ``AutomationRun`` and calling\n``_handle_failure`` synchronously.  That means the response includes\nwhatever fix-agent run was spawned (or the lock state if the streak\nhas reached ``config.max_consecutive_failures``).\n\nThe config's retry/lock/resume settings are honored exactly as in\nproduction: wildcard (``*``) and per-scope lock checks mirror the\nwebhook ingress path, so a locked automation returns ``422`` instead\nof silently accepting a forced failure it would have rejected on a\nreal webhook.", "tags": ["automations"], "requestBody": {"content": {"application/json": {"schema": {"anyOf": [{"$ref": "#/components/schemas/ForceFailureRequestSchema"}, {"type": "null"}]}}}, "required": false}, "security": [{"JWTAuth": []}]}}, "/v1/automations/custom/{org_id}": {"post": {"operationId": "apps_automations_api_create_custom_automation", "summary": "Create Custom Automation", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CustomAutomationSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Create a new custom automation. Admin/owner only.", "tags": ["automations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CustomAutomationCreateSchema"}}}, "required": true}, "security": [{"JWTAuth": []}]}, "get": {"operationId": "apps_automations_api_list_custom_automations", "summary": "List Custom Automations", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CustomAutomationListSchema"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List all custom automations for an organization.", "tags": ["automations"], "security": [{"JWTAuth": []}]}}, "/v1/automations/custom/{org_id}/summary": {"get": {"operationId": "apps_automations_api_get_custom_summary", "summary": "Get Custom Summary", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/AutomationSummarySchema"}, "title": "Response", "type": "array"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get per-automation summary with active counts, recent runs, and 30-day stats.", "tags": ["automations"], "security": [{"JWTAuth": []}]}}, "/v1/automations/custom/{org_id}/{config_id}": {"get": {"operationId": "apps_automations_api_get_custom_automation", "summary": "Get Custom Automation", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "config_id", "schema": {"title": "Config Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CustomAutomationSchema"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get a single custom automation.", "tags": ["automations"], "security": [{"JWTAuth": []}]}, "put": {"operationId": "apps_automations_api_update_custom_automation", "summary": "Update Custom Automation", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "config_id", "schema": {"title": "Config Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CustomAutomationSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Update a custom automation. Admin/owner only.", "tags": ["automations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CustomAutomationUpdateSchema"}}}, "required": true}, "security": [{"JWTAuth": []}]}, "delete": {"operationId": "apps_automations_api_delete_custom_automation", "summary": "Delete Custom Automation", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "config_id", "schema": {"title": "Config Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/StatusResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Delete a custom automation. Admin/owner only.", "tags": ["automations"], "security": [{"JWTAuth": []}]}}, "/v1/automations/custom/{org_id}/{config_id}/regenerate-token": {"post": {"operationId": "apps_automations_api_regenerate_webhook_token", "summary": "Regenerate Webhook Token", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "config_id", "schema": {"title": "Config Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CustomAutomationSchema"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Regenerate the webhook token for a custom automation. Admin/owner only.", "tags": ["automations"], "security": [{"JWTAuth": []}]}}, "/v1/automations/custom/{org_id}/{config_id}/test": {"post": {"operationId": "apps_automations_api_test_custom_automation", "summary": "Test Custom Automation", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "config_id", "schema": {"title": "Config Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/StatusResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Test a custom automation by enqueueing a draft run with a mock payload.", "tags": ["automations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/TestWebhookSchema"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/automations/custom/{org_id}/{config_id}/history": {"get": {"operationId": "apps_automations_api_get_handler_history", "summary": "Get Handler History", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "config_id", "schema": {"title": "Config Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HandlerHistorySchema"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get the commit history for a custom automation's handler code.", "tags": ["automations"], "security": [{"JWTAuth": []}]}}, "/v1/automations/custom/{org_id}/{config_id}/rollback": {"post": {"operationId": "apps_automations_api_rollback_handler", "summary": "Rollback Handler", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "config_id", "schema": {"title": "Config Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CustomAutomationSchema"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Rollback draft handler code to a specific commit SHA.", "tags": ["automations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/RollbackSchema"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/automations/custom/{org_id}/{config_id}/rebuild": {"post": {"operationId": "apps_automations_api_trigger_rebuild", "summary": "Trigger Rebuild", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "config_id", "schema": {"title": "Config Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/StatusResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Manually trigger a draft rebuild for a custom automation.", "tags": ["automations"], "security": [{"JWTAuth": []}]}}, "/v1/automations/custom/{org_id}/{config_id}/publish": {"post": {"operationId": "apps_automations_api_publish_draft_automation", "summary": "Publish Draft Automation", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "config_id", "schema": {"title": "Config Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CustomAutomationSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Promote the current draft artifact to the live automation slot.", "tags": ["automations"], "security": [{"JWTAuth": []}]}}, "/v1/automations/custom/{org_id}/{config_id}/discard-draft": {"post": {"operationId": "apps_automations_api_discard_draft_automation", "summary": "Discard Draft Automation", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "config_id", "schema": {"title": "Config Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CustomAutomationSchema"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Clear the current unpublished draft slot metadata.", "tags": ["automations"], "security": [{"JWTAuth": []}]}}, "/v1/automations/custom/{org_id}/{config_id}/lock": {"post": {"operationId": "apps_automations_api_lock_scope", "summary": "Lock Scope", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "config_id", "schema": {"title": "Config Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LockScopeResponseSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Lock a scope on a custom automation. Admin/owner only.", "tags": ["automations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/LockScopeRequestSchema"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/automations/custom/{org_id}/{config_id}/unlock": {"post": {"operationId": "apps_automations_api_unlock_scope", "summary": "Unlock Scope", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "config_id", "schema": {"title": "Config Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LockScopeResponseSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Unlock a scope on a custom automation. Admin/owner only.", "tags": ["automations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UnlockScopeRequestSchema"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/automations/custom/{org_id}/{config_id}/commit-code": {"post": {"operationId": "apps_automations_api_commit_automation_code", "summary": "Commit Automation Code", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "config_id", "schema": {"title": "Config Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AutomationCommitCodeResponseSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "502": {"description": "Bad Gateway", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Commit handler files to the draft slot and auto-trigger a draft build.\n\nREST counterpart of the agent-session ``commit_automation_code`` RPC so\nexternal clients (Platform MCP) can author handler code directly. Commits\nland in the org's automations repo at the config's ``handler_path``; the\nlive Lambda is untouched until ``publish``.", "tags": ["automations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/AutomationCommitCodeSchema"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/automations/callback": {"post": {"operationId": "apps_automations_api_automation_callback", "summary": "Automation Callback", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AcceptedRunResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "429": {"description": "Too Many Requests", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Handle callbacks from Lambda handler code requesting agent spawning.", "tags": ["automations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CallbackSchema"}}}, "required": true}}}, "/v1/automations/result-callback": {"post": {"operationId": "apps_automations_api_automation_result_callback", "summary": "Automation Result Callback", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AcceptedRunResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "429": {"description": "Too Many Requests", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Receive an async Lambda result and finalize the run (issue #3042).\n\nPosted by the backend-owned automation runtime at the end of an async\ninvocation. The result is finalized off-thread by a Celery task that runs\nthe same completion path the synchronous return value used to drive.\n\nIdempotency: a callback for an attempt that no longer matches the run's\ncurrent ``invocation_attempt_id`` (stale / duplicate / superseded /\ncancelled / already-finalized) is accepted with 200 and ignored, so the\nhandler never retries. Token validation still gates access.", "tags": ["automations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/ResultCallbackSchema"}}}, "required": true}}}, "/v1/automations/recipient/{slug}/configs": {"get": {"operationId": "apps_automations_api_recipient_list_configs", "summary": "Recipient List Configs", "parameters": [{"in": "path", "name": "slug", "schema": {"title": "Slug", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/RecipientConfigSchema"}, "title": "Response", "type": "array"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List the demo automations a /for/<slug> viewer is allowed to run.\n\nVisibility is identical to `recipient_start_run`: the caller's JWT must\nbe a `RecipientViewer` bound to the slug, and the slug must map to a\nconfigured demo org. Only enabled custom automations in that org are\nreturned, so the page can render a \"Run demo\" affordance without the\nconfig UUID needing to be hard-coded per-environment.", "tags": ["automations"], "security": [{"JWTAuth": []}]}}, "/v1/automations/recipient/{slug}/{config_uuid}/run": {"post": {"operationId": "apps_automations_api_recipient_start_run", "summary": "Recipient Start Run", "parameters": [{"in": "path", "name": "slug", "schema": {"title": "Slug", "type": "string"}, "required": true}, {"in": "path", "name": "config_uuid", "schema": {"title": "Config Uuid", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RecipientRunStartedSchema"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "429": {"description": "Too Many Requests", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Trigger a custom automation run on behalf of a /for/<slug> viewer.\n\nThe slug must appear in `RECIPIENT_AUTOMATION_ORG_ALLOWLIST`. The caller's\nJWT must be bound to that slug. The automation must belong to the slug's\ndemo org and be enabled. Run is dispatched via the same Celery path as a\nnormal webhook trigger, so output and lifecycle stay consistent with the\nrest of the automation surface.", "tags": ["automations"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/RecipientRunRequestSchema"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/automations/recipient/{slug}/{run_uuid}": {"get": {"operationId": "apps_automations_api_recipient_get_run", "summary": "Recipient Get Run", "parameters": [{"in": "path", "name": "slug", "schema": {"title": "Slug", "type": "string"}, "required": true}, {"in": "path", "name": "run_uuid", "schema": {"title": "Run Uuid", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RecipientRunStatusSchema"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Poll the status of a recipient-triggered demo automation run.\n\nVisibility is scoped to the calling RecipientViewer's own runs:\n- the run must have been triggered by `recipient_start_run`\n  (`trigger_event_type == \"recipient_run\"`)\n- the run's `trigger_data` must record the same recipient slug *and*\n  the same `recipient_viewer_id` as the caller's viewer\n\nOrg-only scoping was insufficient: any leaked run UUID would have\nlet any recipient for the slug read another viewer's output (or any\nnon-recipient custom run in the demo org). Run UUIDs surface in\nlogs, Slack, browser history, and shared URLs, so authorization\ncannot rely on UUID secrecy.", "tags": ["automations"], "security": [{"JWTAuth": []}]}}, "/v1/automations/mcp-proxy/servers/list": {"post": {"operationId": "apps_automations_mcp_proxy_list_servers", "summary": "List Servers", "parameters": [], "responses": {"200": {"description": "OK"}}, "tags": ["automation-mcp-proxy"]}}, "/v1/automations/mcp-proxy/tools/list": {"post": {"operationId": "apps_automations_mcp_proxy_list_tools", "summary": "List Tools", "parameters": [], "responses": {"200": {"description": "OK"}}, "tags": ["automation-mcp-proxy"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/_ListToolsRequest"}}}, "required": true}}}, "/v1/automations/mcp-proxy/tools/call": {"post": {"operationId": "apps_automations_mcp_proxy_call_tool", "summary": "Call Tool", "parameters": [], "responses": {"200": {"description": "OK"}}, "tags": ["automation-mcp-proxy"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/_CallToolRequest"}}}, "required": true}}}, "/v1/quicklinks/organizations/{organization_id}": {"get": {"operationId": "apps_quicklinks_api_list_quicklinks", "summary": "List Quicklinks", "parameters": [{"in": "path", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/QuicklinkResponse"}, "title": "Response", "type": "array"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List all quicklinks for an organization.", "tags": ["quicklinks"], "security": [{"JWTAuth": []}]}, "post": {"operationId": "apps_quicklinks_api_create_quicklink", "summary": "Create Quicklink", "parameters": [{"in": "path", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/QuicklinkResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Create a new quicklink for an organization.", "tags": ["quicklinks"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateQuicklinkRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/quicklinks/{quicklink_id}": {"put": {"operationId": "apps_quicklinks_api_update_quicklink", "summary": "Update Quicklink", "parameters": [{"in": "path", "name": "quicklink_id", "schema": {"title": "Quicklink Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/QuicklinkResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Update an existing quicklink.", "tags": ["quicklinks"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateQuicklinkRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}, "delete": {"operationId": "apps_quicklinks_api_delete_quicklink", "summary": "Delete Quicklink", "parameters": [{"in": "path", "name": "quicklink_id", "schema": {"title": "Quicklink Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SuccessResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Delete a quicklink.", "tags": ["quicklinks"], "security": [{"JWTAuth": []}]}}, "/v1/quicklinks/organizations/{organization_id}/resolve/{slug}": {"get": {"operationId": "apps_quicklinks_api_resolve_quicklink", "summary": "Resolve Quicklink", "parameters": [{"in": "path", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}, {"in": "path", "name": "slug", "schema": {"title": "Slug", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ResolveQuicklinkResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Resolve a quicklink slug to its destination URL.\n\nFor parameterized links like 'pr/{id}', the slug path should include\nthe parameter values, e.g. 'pr/123'.", "tags": ["quicklinks"], "security": [{"JWTAuth": []}]}}, "/v1/secrets/orgs/{organization_id}/vaults": {"get": {"operationId": "apps_secrets_vault_api_list_vaults", "summary": "List Vaults", "parameters": [{"in": "path", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}, {"in": "query", "name": "page", "schema": {"default": 1, "title": "Page", "type": "integer"}, "required": false}, {"in": "query", "name": "page_size", "schema": {"default": 100, "title": "Page Size", "type": "integer"}, "required": false}, {"in": "query", "name": "search", "schema": {"default": "", "title": "Search", "type": "string"}, "required": false}, {"in": "query", "name": "unlockable_only", "schema": {"default": false, "title": "Unlockable Only", "type": "boolean"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PaginatedVaultListResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List all vaults in this org with pagination and search.\n\nAll org members can see all vaults. my_role is null for vaults\nthe user has no ACL access to.\n\nunlockable_only excludes agent vaults (org-level and teammate-owned).\nThose are server-readable and have no member keys, so they can never be\npassword-unlocked \u2014 the unlock dialog uses this to avoid listing them\nas misleading \"No access\" rows.", "tags": ["secrets"], "security": [{"JWTAuth": []}]}, "post": {"operationId": "apps_secrets_vault_api_create_vault", "summary": "Create Vault", "parameters": [{"in": "path", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VaultDetailResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Create a new named vault. Any org member can create vaults.", "tags": ["secrets"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateVaultRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/secrets/vaults/{vault_id}": {"get": {"operationId": "apps_secrets_vault_api_get_vault", "summary": "Get Vault", "parameters": [{"in": "path", "name": "vault_id", "schema": {"title": "Vault Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VaultDetailResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get vault metadata. Any org member can view basic vault info.", "tags": ["secrets"], "security": [{"JWTAuth": []}]}, "patch": {"operationId": "apps_secrets_vault_api_update_vault", "summary": "Update Vault", "parameters": [{"in": "path", "name": "vault_id", "schema": {"title": "Vault Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VaultDetailResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Update vault metadata. Owner only.", "tags": ["secrets"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateVaultRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}, "delete": {"operationId": "apps_secrets_vault_api_delete_vault", "summary": "Delete Vault", "parameters": [{"in": "path", "name": "vault_id", "schema": {"title": "Vault Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SuccessResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Delete a vault and all its secrets. Owner only.", "tags": ["secrets"], "security": [{"JWTAuth": []}]}}, "/v1/secrets/vaults/{vault_id}/secrets": {"get": {"operationId": "apps_secrets_vault_api_list_vault_secrets", "summary": "List Vault Secrets", "parameters": [{"in": "path", "name": "vault_id", "schema": {"title": "Vault Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/VaultSecretResponse"}, "title": "Response", "type": "array"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List secrets in a vault (names only, no ciphertext).", "tags": ["secrets"], "security": [{"JWTAuth": []}]}, "post": {"operationId": "apps_secrets_vault_api_create_vault_secret", "summary": "Create Vault Secret", "parameters": [{"in": "path", "name": "vault_id", "schema": {"title": "Vault Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VaultSecretResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Create a secret in a vault. Requires write access.", "tags": ["secrets"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateSecretRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/secrets/vaults/{vault_id}/secrets/{secret_id}": {"get": {"operationId": "apps_secrets_vault_api_get_vault_secret", "summary": "Get Vault Secret", "parameters": [{"in": "path", "name": "vault_id", "schema": {"title": "Vault Id", "type": "string"}, "required": true}, {"in": "path", "name": "secret_id", "schema": {"title": "Secret Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VaultSecretDetailResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get full ciphertext for a secret (for editing/decryption).", "tags": ["secrets"], "security": [{"JWTAuth": []}]}, "put": {"operationId": "apps_secrets_vault_api_update_vault_secret", "summary": "Update Vault Secret", "parameters": [{"in": "path", "name": "vault_id", "schema": {"title": "Vault Id", "type": "string"}, "required": true}, {"in": "path", "name": "secret_id", "schema": {"title": "Secret Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VaultSecretResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Update a secret. Requires write access.", "tags": ["secrets"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateSecretRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}, "delete": {"operationId": "apps_secrets_vault_api_delete_vault_secret", "summary": "Delete Vault Secret", "parameters": [{"in": "path", "name": "vault_id", "schema": {"title": "Vault Id", "type": "string"}, "required": true}, {"in": "path", "name": "secret_id", "schema": {"title": "Secret Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SuccessResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Delete a secret. Requires write access.", "tags": ["secrets"], "security": [{"JWTAuth": []}]}}, "/v1/secrets/vaults/{vault_id}/members": {"get": {"operationId": "apps_secrets_vault_api_list_vault_members", "summary": "List Vault Members", "parameters": [{"in": "path", "name": "vault_id", "schema": {"title": "Vault Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/VaultMemberResponse"}, "title": "Response", "type": "array"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List vault members. Any vault member can view.", "tags": ["secrets"], "security": [{"JWTAuth": []}]}, "post": {"operationId": "apps_secrets_vault_api_add_vault_member", "summary": "Add Vault Member", "parameters": [{"in": "path", "name": "vault_id", "schema": {"title": "Vault Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VaultMemberResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Add a user to a vault. Owner or write members can invite.", "tags": ["secrets"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/AddVaultMemberRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/secrets/vaults/{vault_id}/request-access": {"post": {"operationId": "apps_secrets_vault_api_request_vault_access", "summary": "Request Vault Access", "parameters": [{"in": "path", "name": "vault_id", "schema": {"title": "Vault Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MemberKeyInfo"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Request access to a vault by registering your RSA key material.\n\nAny org member can request access to any vault they can see.\nThe vault owner must then grant the wrapped DEK.", "tags": ["secrets"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/SetMemberKeyRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/secrets/vaults/{vault_id}/members/{user_id}/role": {"put": {"operationId": "apps_secrets_vault_api_update_member_role", "summary": "Update Member Role", "parameters": [{"in": "path", "name": "vault_id", "schema": {"title": "Vault Id", "type": "string"}, "required": true}, {"in": "path", "name": "user_id", "schema": {"title": "User Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/VaultMemberResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Update a vault member's role. Owner only.", "tags": ["secrets"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateMemberRoleRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/secrets/vaults/{vault_id}/members/{user_id}": {"delete": {"operationId": "apps_secrets_vault_api_remove_vault_member", "summary": "Remove Vault Member", "parameters": [{"in": "path", "name": "vault_id", "schema": {"title": "Vault Id", "type": "string"}, "required": true}, {"in": "path", "name": "user_id", "schema": {"title": "User Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SuccessResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Remove a member from a vault (revokes ACL + deletes member key + passkeys). Owner only.", "tags": ["secrets"], "security": [{"JWTAuth": []}]}}, "/v1/secrets/vaults/{vault_id}/member-key": {"post": {"operationId": "apps_secrets_vault_api_set_member_key", "summary": "Set Member Key", "parameters": [{"in": "path", "name": "vault_id", "schema": {"title": "Vault Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MemberKeyInfo"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Set or update your vault password (creates/updates VaultMemberKey).\n\nUser must be a vault member (via ACL) to set a member key.", "tags": ["secrets"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/SetMemberKeyRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/secrets/vaults/{vault_id}/member-keys": {"get": {"operationId": "apps_secrets_vault_api_list_member_keys", "summary": "List Member Keys", "parameters": [{"in": "path", "name": "vault_id", "schema": {"title": "Vault Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/MemberKeyResponse"}, "title": "Response", "type": "array"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List all member keys for a vault. Owner only.", "tags": ["secrets"], "security": [{"JWTAuth": []}]}}, "/v1/secrets/vaults/{vault_id}/member-keys/pending": {"get": {"operationId": "apps_secrets_vault_api_list_pending_member_keys", "summary": "List Pending Member Keys", "parameters": [{"in": "path", "name": "vault_id", "schema": {"title": "Vault Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/PendingMemberKeyResponse"}, "title": "Response", "type": "array"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List pending member keys (awaiting DEK grant).\n\nOwner only by default. If the vault has auto_grant_enabled, any active\nmember can view pending keys so their client can wrap the DEK for them.", "tags": ["secrets"], "security": [{"JWTAuth": []}]}}, "/v1/secrets/vaults/{vault_id}/member-keys/{member_key_id}/grant": {"put": {"operationId": "apps_secrets_vault_api_grant_vault_key", "summary": "Grant Vault Key", "parameters": [{"in": "path", "name": "vault_id", "schema": {"title": "Vault Id", "type": "string"}, "required": true}, {"in": "path", "name": "member_key_id", "schema": {"title": "Member Key Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MemberKeyResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Store the RSA-OAEP wrapped vault DEK for a pending member.\n\nOwner only by default. If the vault has auto_grant_enabled, any active\nmember (whose own DEK is unlocked client-side) can grant.", "tags": ["secrets"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/GrantVaultKeyRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/secrets/vaults/{vault_id}/member-keys/{user_id}": {"delete": {"operationId": "apps_secrets_vault_api_reset_member_key", "summary": "Reset Member Key", "parameters": [{"in": "path", "name": "vault_id", "schema": {"title": "Vault Id", "type": "string"}, "required": true}, {"in": "path", "name": "user_id", "schema": {"title": "User Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SuccessResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Delete a user's member key (forces re-registration). Owner only.", "tags": ["secrets"], "security": [{"JWTAuth": []}]}}, "/v1/secrets/vaults/{vault_id}/passkeys/registration-options": {"post": {"operationId": "apps_secrets_vault_api_passkey_registration_options", "summary": "Passkey Registration Options", "parameters": [{"in": "path", "name": "vault_id", "schema": {"title": "Vault Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get WebAuthn registration options for this vault.", "tags": ["secrets"], "security": [{"JWTAuth": []}]}}, "/v1/secrets/vaults/{vault_id}/passkeys/registration-complete": {"post": {"operationId": "apps_secrets_vault_api_passkey_registration_complete", "summary": "Passkey Registration Complete", "parameters": [{"in": "path", "name": "vault_id", "schema": {"title": "Vault Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PasskeyCredentialResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Complete WebAuthn registration for this vault.", "tags": ["secrets"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/PasskeyRegistrationCompleteRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/secrets/vaults/{vault_id}/passkeys": {"get": {"operationId": "apps_secrets_vault_api_list_passkeys", "summary": "List Passkeys", "parameters": [{"in": "path", "name": "vault_id", "schema": {"title": "Vault Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/PasskeyCredentialResponse"}, "title": "Response", "type": "array"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List passkeys registered for this vault.", "tags": ["secrets"], "security": [{"JWTAuth": []}]}}, "/v1/secrets/vaults/{vault_id}/passkeys/authentication-options": {"post": {"operationId": "apps_secrets_vault_api_passkey_authentication_options", "summary": "Passkey Authentication Options", "parameters": [{"in": "path", "name": "vault_id", "schema": {"title": "Vault Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PasskeyAuthenticationOptionsResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get WebAuthn authentication options for this vault.", "tags": ["secrets"], "security": [{"JWTAuth": []}]}}, "/v1/secrets/vaults/{vault_id}/passkeys/authentication-complete": {"post": {"operationId": "apps_secrets_vault_api_passkey_authentication_complete", "summary": "Passkey Authentication Complete", "parameters": [{"in": "path", "name": "vault_id", "schema": {"title": "Vault Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PasskeyAuthenticationCompleteResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Complete WebAuthn authentication for this vault.", "tags": ["secrets"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/PasskeyAuthenticationCompleteRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/secrets/vaults/{vault_id}/passkeys/{passkey_id}": {"delete": {"operationId": "apps_secrets_vault_api_delete_passkey", "summary": "Delete Passkey", "parameters": [{"in": "path", "name": "vault_id", "schema": {"title": "Vault Id", "type": "string"}, "required": true}, {"in": "path", "name": "passkey_id", "schema": {"title": "Passkey Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SuccessResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Delete a passkey.", "tags": ["secrets"], "security": [{"JWTAuth": []}]}}, "/v1/secrets/orgs/{organization_id}/vault-metadata": {"get": {"operationId": "apps_secrets_vault_api_get_vault_metadata", "summary": "Get Vault Metadata", "parameters": [{"in": "path", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/VaultSecretResponse"}, "title": "Response", "type": "array"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get vault secret metadata across all vaults the user has access to.\n\nUsed to populate session context so the agent knows what secrets are available.", "tags": ["secrets"], "security": [{"JWTAuth": []}]}}, "/v1/secrets/orgs/{organization_id}/broker-vault/aws-credentials": {"get": {"operationId": "apps_secrets_vault_api_get_broker_vault_aws_credentials", "summary": "Get Broker Vault Aws Credentials", "parameters": [{"in": "path", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BrokerVaultAwsStatusResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Return write-only AWS broker credential status.", "tags": ["secrets"], "security": [{"JWTAuth": []}]}, "post": {"operationId": "apps_secrets_vault_api_set_broker_vault_aws_credentials", "summary": "Set Broker Vault Aws Credentials", "parameters": [{"in": "path", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BrokerVaultAwsStatusResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Create, update, or clear AWS broker credential fields.\n\n``None`` means leave a field unchanged. Empty string clears that field.\nPlaintext values are Fernet-encrypted server-side and never returned.", "tags": ["secrets"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/SetBrokerVaultAwsCredentialsRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}, "delete": {"operationId": "apps_secrets_vault_api_delete_broker_vault_aws_credentials", "summary": "Delete Broker Vault Aws Credentials", "parameters": [{"in": "path", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BrokerVaultAwsStatusResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Delete all AWS broker credential fields for this org.", "tags": ["secrets"], "security": [{"JWTAuth": []}]}}, "/v1/secrets/orgs/{organization_id}/broker-vault/aws-credentials/validate": {"post": {"operationId": "apps_secrets_vault_api_validate_broker_vault_aws_credentials", "summary": "Validate Broker Vault Aws Credentials", "parameters": [{"in": "path", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}, {"in": "query", "name": "purpose", "schema": {"default": "cli", "title": "Purpose", "type": "string"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BrokerVaultAwsValidationResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Mint a throwaway short-lived token from the stored broker key to verify it.\n\nSurfaces the broker's structured failure (NO_KEY / INVALID_KEY / NO_PERMS /\nMINT_ERROR) so an admin learns at setup time \u2014 not when an automation runs \u2014\nthat the key is missing ``sts:GetFederationToken`` (federation mode) or\n``sts:AssumeRole`` on the role (assume-role mode), or lacks the permissions\nthe broker smoke-tests. ``purpose=\"deploy\"`` validates the deploy-purpose\nmint path instead (the ``AWS_DEPLOY_*`` key with base-key fallback), so a\nsaved-but-unusable deploy key surfaces here rather than at the first cloud\ntoolbox deploy. The minted credentials are never returned.", "tags": ["secrets"], "security": [{"JWTAuth": []}]}}, "/v1/secrets/orgs/{organization_id}/agent-vault": {"get": {"operationId": "apps_secrets_vault_api_get_agent_vault", "summary": "Get Agent Vault", "parameters": [{"in": "path", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentVaultInfoResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Return metadata for the org's agent-readable vault.", "tags": ["secrets"], "security": [{"JWTAuth": []}]}}, "/v1/secrets/orgs/{organization_id}/agent-vault/secrets": {"get": {"operationId": "apps_secrets_vault_api_list_agent_vault_secrets", "summary": "List Agent Vault Secrets", "parameters": [{"in": "path", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/AgentVaultSecretInfo"}, "title": "Response", "type": "array"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List names/descriptions of every secret in the agent vault (no values).", "tags": ["secrets"], "security": [{"JWTAuth": []}]}, "post": {"operationId": "apps_secrets_vault_api_set_agent_vault_secret", "summary": "Set Agent Vault Secret", "parameters": [{"in": "path", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentVaultSecretInfo"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Create or update an agent-vault secret by name (upsert).", "tags": ["secrets"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/SetAgentVaultSecretRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/secrets/orgs/{organization_id}/agent-vault/secrets/{name}": {"get": {"operationId": "apps_secrets_vault_api_get_agent_vault_secret", "summary": "Get Agent Vault Secret", "parameters": [{"in": "path", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}, {"in": "path", "name": "name", "schema": {"title": "Name", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentVaultSecretValueResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Return the decrypted plaintext value of an agent-vault secret.", "tags": ["secrets"], "security": [{"JWTAuth": []}]}, "delete": {"operationId": "apps_secrets_vault_api_delete_agent_vault_secret", "summary": "Delete Agent Vault Secret", "parameters": [{"in": "path", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}, {"in": "path", "name": "name", "schema": {"title": "Name", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SuccessResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Delete an agent-vault secret by name.", "tags": ["secrets"], "security": [{"JWTAuth": []}]}}, "/v1/integrations/overview-status/{org_id}": {"get": {"operationId": "apps_integrations_api_get_overview_status", "summary": "Get Overview Status", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OverviewStatusResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Return org-level and user-level connection status for all integrations.", "tags": ["integrations"], "security": [{"JWTAuth": []}]}}, "/v1/knowledge-sources/organizations/{organization_id}/drive/status": {"get": {"operationId": "apps_knowledge_sources_api_get_org_drive_status", "summary": "Get Org Drive Status", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DriveConnectionStatus"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["knowledge-sources"], "security": [{"JWTAuth": []}]}}, "/v1/knowledge-sources/organizations/{organization_id}/drive/oauth/start": {"post": {"operationId": "apps_knowledge_sources_api_start_org_drive_oauth", "summary": "Start Org Drive Oauth", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DriveOAuthStartResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "503": {"description": "Service Unavailable", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["knowledge-sources"], "security": [{"JWTAuth": []}]}}, "/v1/knowledge-sources/organizations/{organization_id}/drive/picker": {"post": {"operationId": "apps_knowledge_sources_api_open_org_drive_picker", "summary": "Open Org Drive Picker", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DrivePickerHandoffResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "502": {"description": "Bad Gateway", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "503": {"description": "Service Unavailable", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["knowledge-sources"], "security": [{"JWTAuth": []}]}}, "/v1/knowledge-sources/organizations/{organization_id}/drive/picker-link": {"get": {"operationId": "apps_knowledge_sources_api_get_org_drive_picker_link", "summary": "Get Org Drive Picker Link", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DrivePickerLinkResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["knowledge-sources"], "security": [{"JWTAuth": []}]}}, "/v1/knowledge-sources/organizations/{organization_id}/drive": {"delete": {"operationId": "apps_knowledge_sources_api_disconnect_org_drive", "summary": "Disconnect Org Drive", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["knowledge-sources"], "security": [{"JWTAuth": []}]}}, "/v1/knowledge-sources/teammates/{teammate_id}/drive/status": {"get": {"operationId": "apps_knowledge_sources_api_get_teammate_drive_status", "summary": "Get Teammate Drive Status", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DriveConnectionStatus"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["knowledge-sources"], "security": [{"JWTAuth": []}]}}, "/v1/knowledge-sources/teammates/{teammate_id}/drive/oauth/start": {"post": {"operationId": "apps_knowledge_sources_api_start_teammate_drive_oauth", "summary": "Start Teammate Drive Oauth", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DriveOAuthStartResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "503": {"description": "Service Unavailable", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["knowledge-sources"], "security": [{"JWTAuth": []}]}}, "/v1/knowledge-sources/teammates/{teammate_id}/drive/picker": {"post": {"operationId": "apps_knowledge_sources_api_open_teammate_drive_picker", "summary": "Open Teammate Drive Picker", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DrivePickerHandoffResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "502": {"description": "Bad Gateway", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "503": {"description": "Service Unavailable", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["knowledge-sources"], "security": [{"JWTAuth": []}]}}, "/v1/knowledge-sources/teammates/{teammate_id}/drive/picker-link": {"get": {"operationId": "apps_knowledge_sources_api_get_teammate_drive_picker_link", "summary": "Get Teammate Drive Picker Link", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DrivePickerLinkResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["knowledge-sources"], "security": [{"JWTAuth": []}]}}, "/v1/knowledge-sources/teammates/{teammate_id}/drive": {"delete": {"operationId": "apps_knowledge_sources_api_disconnect_teammate_drive", "summary": "Disconnect Teammate Drive", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["knowledge-sources"], "security": [{"JWTAuth": []}]}}, "/v1/knowledge-sources/drive/picker/selection": {"post": {"operationId": "apps_knowledge_sources_api_save_drive_picker_selection", "summary": "Save Drive Picker Selection", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DrivePickerSelectionResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["knowledge-sources"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/DrivePickerSelection"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/knowledge-sources/oauth/google/callback": {"get": {"operationId": "apps_knowledge_sources_api_drive_oauth_callback", "summary": "Drive Oauth Callback", "parameters": [{"in": "query", "name": "code", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Code"}, "required": false}, {"in": "query", "name": "state", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "State"}, "required": false}, {"in": "query", "name": "error", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error"}, "required": false}], "responses": {"200": {"description": "OK"}}, "tags": ["knowledge-sources"]}}, "/v1/knowledge-sources/organizations/{organization_id}": {"get": {"operationId": "apps_knowledge_sources_api_list_org_knowledge_sources", "summary": "List Org Knowledge Sources", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/KnowledgeSourceListResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["knowledge-sources"], "security": [{"JWTAuth": []}]}, "post": {"operationId": "apps_knowledge_sources_api_create_org_knowledge_source", "summary": "Create Org Knowledge Source", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/KnowledgeSourceRead"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["knowledge-sources"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/KnowledgeSourceCreate"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/knowledge-sources/teammates/{teammate_id}": {"get": {"operationId": "apps_knowledge_sources_api_list_teammate_knowledge_sources", "summary": "List Teammate Knowledge Sources", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/KnowledgeSourceListResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["knowledge-sources"], "security": [{"JWTAuth": []}]}, "post": {"operationId": "apps_knowledge_sources_api_create_teammate_knowledge_source", "summary": "Create Teammate Knowledge Source", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/KnowledgeSourceRead"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["knowledge-sources"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/KnowledgeSourceCreate"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/knowledge-sources/{source_id}": {"patch": {"operationId": "apps_knowledge_sources_api_update_knowledge_source", "summary": "Update Knowledge Source", "parameters": [{"in": "path", "name": "source_id", "schema": {"format": "uuid", "title": "Source Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/KnowledgeSourceRead"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["knowledge-sources"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/KnowledgeSourceUpdate"}}}, "required": true}, "security": [{"JWTAuth": []}]}, "delete": {"operationId": "apps_knowledge_sources_api_delete_knowledge_source", "summary": "Delete Knowledge Source", "parameters": [{"in": "path", "name": "source_id", "schema": {"format": "uuid", "title": "Source Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "502": {"description": "Bad Gateway", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["knowledge-sources"], "security": [{"JWTAuth": []}]}}, "/v1/knowledge-sources/{source_id}/editors/{user_id}": {"post": {"operationId": "apps_knowledge_sources_api_add_knowledge_source_editor", "summary": "Add Knowledge Source Editor", "parameters": [{"in": "path", "name": "source_id", "schema": {"format": "uuid", "title": "Source Id", "type": "string"}, "required": true}, {"in": "path", "name": "user_id", "schema": {"format": "uuid", "title": "User Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/KnowledgeSourceRead"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["knowledge-sources"], "security": [{"JWTAuth": []}]}, "delete": {"operationId": "apps_knowledge_sources_api_remove_knowledge_source_editor", "summary": "Remove Knowledge Source Editor", "parameters": [{"in": "path", "name": "source_id", "schema": {"format": "uuid", "title": "Source Id", "type": "string"}, "required": true}, {"in": "path", "name": "user_id", "schema": {"format": "uuid", "title": "User Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/KnowledgeSourceRead"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["knowledge-sources"], "security": [{"JWTAuth": []}]}}, "/v1/knowledge-sources/{source_id}/verify": {"post": {"operationId": "apps_knowledge_sources_api_verify_knowledge_source", "summary": "Verify Knowledge Source", "parameters": [{"in": "path", "name": "source_id", "schema": {"format": "uuid", "title": "Source Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/KnowledgeSourceVerifyResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["knowledge-sources"], "security": [{"JWTAuth": []}]}}, "/v1/knowledge-sources/{source_id}/search": {"get": {"operationId": "apps_knowledge_sources_api_search_knowledge_source", "summary": "Search Knowledge Source", "parameters": [{"in": "path", "name": "source_id", "schema": {"format": "uuid", "title": "Source Id", "type": "string"}, "required": true}, {"in": "query", "name": "query", "schema": {"default": "", "title": "Query", "type": "string"}, "required": false}, {"in": "query", "name": "limit", "schema": {"default": 20, "title": "Limit", "type": "integer"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/KnowledgeSourceSearchResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["knowledge-sources"], "security": [{"JWTAuth": []}]}}, "/v1/knowledge-sources/{source_id}/items/{item_id}": {"get": {"operationId": "apps_knowledge_sources_api_read_knowledge_source_item", "summary": "Read Knowledge Source Item", "parameters": [{"in": "path", "name": "source_id", "schema": {"format": "uuid", "title": "Source Id", "type": "string"}, "required": true}, {"in": "path", "name": "item_id", "schema": {"title": "Item Id", "type": "string"}, "required": true}, {"in": "query", "name": "cursor", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Cursor"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/KnowledgeSourceReadResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "502": {"description": "Bad Gateway", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "503": {"description": "Service Unavailable", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["knowledge-sources"], "security": [{"JWTAuth": []}]}}, "/v1/email-campaigns/unsubscribe/{token}": {"get": {"operationId": "apps_email_campaigns_api_unsubscribe", "summary": "Unsubscribe", "parameters": [{"in": "path", "name": "token", "schema": {"format": "uuid", "title": "Token", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK"}}, "description": "One-click unsubscribe from all email campaigns. No auth required.", "tags": ["email-campaigns"]}}, "/v1/email-campaigns/track/open/{log_id}": {"get": {"operationId": "apps_email_campaigns_api_track_open", "summary": "Track Open", "parameters": [{"in": "path", "name": "log_id", "schema": {"format": "uuid", "title": "Log Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK"}}, "description": "Open tracking pixel. Returns a 1x1 transparent GIF.", "tags": ["email-campaigns"]}}, "/v1/email-campaigns/track/click/{log_id}": {"get": {"operationId": "apps_email_campaigns_api_track_click", "summary": "Track Click", "parameters": [{"in": "path", "name": "log_id", "schema": {"format": "uuid", "title": "Log Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK"}}, "description": "Click tracking redirect. Logs the click and redirects to the destination URL.", "tags": ["email-campaigns"]}}, "/v1/email-campaigns/stats/{campaign_slug}": {"get": {"operationId": "apps_email_campaigns_api_campaign_stats", "summary": "Campaign Stats", "parameters": [{"in": "path", "name": "campaign_slug", "schema": {"title": "Campaign Slug", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK"}}, "description": "Get aggregate stats for a campaign. Requires superuser.", "tags": ["email-campaigns"], "security": [{"JWTAuth": []}]}}, "/v1/email-campaigns/track/extension-installed": {"post": {"operationId": "apps_email_campaigns_api_track_extension_installed", "summary": "Track Extension Installed", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TrackEventResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Record that the user has the Chrome extension installed.", "tags": ["email-campaigns"], "security": [{"JWTAuth": []}]}}, "/v1/email-campaigns/track/engine-detected": {"post": {"operationId": "apps_email_campaigns_api_track_engine_detected", "summary": "Track Engine Detected", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TrackEventResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Record that the CodePress engine was detected on a page for a repo.", "tags": ["email-campaigns"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/TrackEngineRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/email-inbox/{organization_id}/status": {"get": {"operationId": "apps_email_inbox_api_get_inbox_status", "summary": "Get Inbox Status", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InboxStatus"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["email-inbox"], "security": [{"JWTAuth": []}]}}, "/v1/email-inbox/{organization_id}/oauth/start": {"post": {"operationId": "apps_email_inbox_api_start_inbox_oauth", "summary": "Start Inbox Oauth", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/StartInboxOAuthResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["email-inbox"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/StartInboxOAuthBody"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/email-inbox/oauth/callback/gmail": {"get": {"operationId": "apps_email_inbox_api_gmail_oauth_callback", "summary": "Gmail Oauth Callback", "parameters": [{"in": "query", "name": "code", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Code"}, "required": false}, {"in": "query", "name": "state", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "State"}, "required": false}, {"in": "query", "name": "error", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error"}, "required": false}, {"in": "query", "name": "error_description", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error Description"}, "required": false}], "responses": {"200": {"description": "OK"}}, "tags": ["email-inbox"]}}, "/v1/email-inbox/oauth/callback/outlook": {"get": {"operationId": "apps_email_inbox_api_outlook_oauth_callback", "summary": "Outlook Oauth Callback", "parameters": [{"in": "query", "name": "code", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Code"}, "required": false}, {"in": "query", "name": "state", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "State"}, "required": false}, {"in": "query", "name": "error", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error"}, "required": false}, {"in": "query", "name": "error_description", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error Description"}, "required": false}], "responses": {"200": {"description": "OK"}}, "tags": ["email-inbox"]}}, "/v1/email-inbox/{organization_id}": {"delete": {"operationId": "apps_email_inbox_api_disconnect_inbox", "summary": "Disconnect Inbox", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InboxDisconnectResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["email-inbox"], "security": [{"JWTAuth": []}]}}, "/v1/microsoft-graph/subscriptions/{organization_id}": {"get": {"operationId": "apps_microsoft_graph_api_list_subscriptions", "summary": "List Subscriptions", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MicrosoftGraphSubscriptionList"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["microsoft-graph"], "security": [{"JWTAuth": []}]}, "post": {"operationId": "apps_microsoft_graph_api_create_subscription_endpoint", "summary": "Create Subscription Endpoint", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MicrosoftGraphSubscriptionRead"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["microsoft-graph"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/MicrosoftGraphSubscriptionCreate"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/microsoft-graph/subscriptions/{organization_id}/{subscription_id}": {"delete": {"operationId": "apps_microsoft_graph_api_delete_subscription_endpoint", "summary": "Delete Subscription Endpoint", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}, {"in": "path", "name": "subscription_id", "schema": {"format": "uuid", "title": "Subscription Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MicrosoftGraphSubscriptionDelete"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["microsoft-graph"], "security": [{"JWTAuth": []}]}}, "/v1/microsoft-graph/notifications": {"post": {"operationId": "apps_microsoft_graph_api_graph_notifications", "summary": "Graph Notifications", "parameters": [], "responses": {"200": {"description": "OK"}}, "tags": ["microsoft-graph"]}}, "/v1/microsoft-graph/lifecycle": {"post": {"operationId": "apps_microsoft_graph_api_graph_lifecycle_notifications", "summary": "Graph Lifecycle Notifications", "parameters": [], "responses": {"200": {"description": "OK"}}, "tags": ["microsoft-graph"]}}, "/v1/coordination/requests": {"get": {"operationId": "apps_coordination_api_list_coordination_requests", "summary": "List Coordination Requests", "parameters": [{"in": "query", "name": "org_slug", "schema": {"title": "Org Slug", "type": "string"}, "required": true}, {"in": "query", "name": "status", "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Status"}, "required": false}, {"in": "query", "name": "created_by_me", "schema": {"default": false, "title": "Created By Me", "type": "boolean"}, "required": false}, {"in": "query", "name": "page", "schema": {"default": 1, "title": "Page", "type": "integer"}, "required": false}, {"in": "query", "name": "page_size", "schema": {"default": 20, "title": "Page Size", "type": "integer"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CoordinationRequestListResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List coordination requests for an organization.", "tags": ["coordination"], "security": [{"JWTAuth": []}]}}, "/v1/coordination/requests/{coordination_id}": {"get": {"operationId": "apps_coordination_api_get_coordination_request", "summary": "Get Coordination Request", "parameters": [{"in": "path", "name": "coordination_id", "schema": {"title": "Coordination Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CoordinationRequestDetail"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get detailed coordination request with participants and responses.", "tags": ["coordination"], "security": [{"JWTAuth": []}]}}, "/v1/coordination/requests/{coordination_id}/cancel": {"post": {"operationId": "apps_coordination_api_cancel_coordination_request", "summary": "Cancel Coordination Request", "parameters": [{"in": "path", "name": "coordination_id", "schema": {"title": "Coordination Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Cancel a pending or active coordination request.", "tags": ["coordination"], "security": [{"JWTAuth": []}]}}, "/v1/apps/org/{org_id}": {"get": {"operationId": "apps_org_pages_api_list_pages", "summary": "List Pages", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "query", "name": "search", "schema": {"default": "", "title": "Search", "type": "string"}, "required": false}, {"in": "query", "name": "status", "schema": {"default": "all", "title": "Status", "type": "string"}, "required": false}, {"in": "query", "name": "source", "schema": {"default": "all", "title": "Source", "type": "string"}, "required": false}, {"in": "query", "name": "sort", "schema": {"default": "updated", "title": "Sort", "type": "string"}, "required": false}, {"in": "query", "name": "page", "schema": {"default": 1, "title": "Page", "type": "integer"}, "required": false}, {"in": "query", "name": "page_size", "schema": {"default": 12, "title": "Page Size", "type": "integer"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrgPageListSchema"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List pages for an organization with server-side search, filter, sort, and pagination.\n\nAutomation-authored pages always sort after user-created pages regardless of\n``sort`` \u2014 within each group the requested sort applies. Open to any current\norg member.", "tags": ["apps"], "security": [{"JWTAuth": []}]}, "post": {"operationId": "apps_org_pages_api_create_page", "summary": "Create Page", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrgPageSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Create a new page for an organization. Any org member can create a page.", "tags": ["apps"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrgPageCreateSchema"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/apps/org/{org_id}/member-options": {"get": {"operationId": "apps_org_pages_api_list_member_options", "summary": "List Member Options", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrgPageMemberOptionsSchema"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List org members for the access-users picker on the App settings panel.\n\nPlaced above the ``/org/{org_id}/{page_id}`` dynamic routes so the\nstatic ``member-options`` prefix wins in Ninja's URL resolver.", "tags": ["apps"], "security": [{"JWTAuth": []}]}}, "/v1/apps/org/{org_id}/slug/{page_slug}": {"get": {"operationId": "apps_org_pages_api_get_page", "summary": "Get Page", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "page_slug", "schema": {"title": "Page Slug", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrgPageSchema"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Get a single page by slug.\n\nOpen to any current org member when ``access_mode=org``; for\n``specific_users`` pages, only members on the access list see it\n(404 otherwise so private apps don't leak their existence).", "tags": ["apps"], "security": [{"JWTAuth": []}]}}, "/v1/apps/org/{org_id}/review-candidates/{candidate_id}": {"get": {"operationId": "apps_org_pages_api_get_review_candidate", "summary": "Get Review Candidate", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "candidate_id", "schema": {"format": "uuid", "title": "Candidate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GeneratedArtifactReviewCandidateSchema"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Return non-live PR-head HTML and metadata for generated artifact review.", "tags": ["apps"], "security": [{"JWTAuth": []}]}}, "/v1/apps/org/{org_id}/{page_id}/review-candidates/{candidate_id}": {"get": {"operationId": "apps_org_pages_api_get_page_review_candidate", "summary": "Get Page Review Candidate", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "page_id", "schema": {"format": "uuid", "title": "Page Id", "type": "string"}, "required": true}, {"in": "path", "name": "candidate_id", "schema": {"format": "uuid", "title": "Candidate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GeneratedArtifactReviewCandidateSchema"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Return a page-scoped non-live PR-head review candidate.", "tags": ["apps"], "security": [{"JWTAuth": []}]}}, "/v1/apps/org/{org_id}/{page_id}": {"put": {"operationId": "apps_org_pages_api_update_page", "summary": "Update Page", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "page_id", "schema": {"format": "uuid", "title": "Page Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrgPageSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Update page metadata (name, slug, description, publish state, status, access).\n\nOpen to any current org member who can view the page; private apps stay\nprivate (404 to non-allowlist users via ``_get_viewable_page_or_404``).", "tags": ["apps"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrgPageUpdateSchema"}}}, "required": true}, "security": [{"JWTAuth": []}]}, "delete": {"operationId": "apps_org_pages_api_delete_page", "summary": "Delete Page", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "page_id", "schema": {"format": "uuid", "title": "Page Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/StatusResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Delete a page and its associated servers.\n\nFails with 409 if any server's cloud resources cannot be fully cleaned up,\nkeeping the page and server rows intact so the user can retry.", "tags": ["apps"], "security": [{"JWTAuth": []}]}}, "/v1/apps/org/{org_id}/{page_id}/share": {"put": {"operationId": "apps_org_pages_api_update_page_share", "summary": "Update Page Share", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "page_id", "schema": {"format": "uuid", "title": "Page Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrgPageSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Update a page's public share settings.\n\nAny current org member who can view the page can enable/disable sharing,\ntoggle read-only, and regenerate the share token (which invalidates any\npreviously distributed link).", "tags": ["apps"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrgPageShareUpdateSchema"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/apps/org/{org_id}/{page_id}/sessions": {"get": {"operationId": "apps_org_pages_api_list_page_sessions", "summary": "List Page Sessions", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "page_id", "schema": {"format": "uuid", "title": "Page Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrgPageSessionListSchema"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List agent sessions linked to a page. Open to any current org member.", "tags": ["apps"], "security": [{"JWTAuth": []}]}}, "/v1/apps/org/{org_id}/{page_id}/query": {"post": {"operationId": "apps_org_pages_api_query_page_data", "summary": "Query Page Data", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "page_id", "schema": {"format": "uuid", "title": "Page Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"additionalProperties": true, "title": "Response", "type": "object"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Execute legacy page SQL against a named org database.", "tags": ["apps"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrgPageQuerySchema"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/apps/org/{org_id}/{page_id}/api": {"post": {"operationId": "apps_org_pages_api_proxy_build_server", "summary": "Proxy Build Server", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "page_id", "schema": {"format": "uuid", "title": "Page Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrgPageApiProxyResponseSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Proxy an authenticated request from a page iframe to one of its build servers.\n\nThe page's iframe runs sandboxed and cannot hold the build server's\nbearer token. This endpoint resolves the named server scoped to the\npage, attaches the token server-side, and forwards the request.", "tags": ["apps"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrgPageApiProxySchema"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/apps/org/{org_id}/review-candidates/{candidate_id}/api": {"post": {"operationId": "apps_org_pages_api_proxy_review_candidate_build_server", "summary": "Proxy Review Candidate Build Server", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "candidate_id", "schema": {"format": "uuid", "title": "Candidate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrgPageApiProxyResponseSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Proxy candidate iframe API calls, preferring the candidate backend.", "tags": ["apps"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrgPageApiProxySchema"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/apps/org/{org_id}/{page_id}/review-candidates/{candidate_id}/api": {"post": {"operationId": "apps_org_pages_api_proxy_page_review_candidate_build_server", "summary": "Proxy Page Review Candidate Build Server", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "page_id", "schema": {"format": "uuid", "title": "Page Id", "type": "string"}, "required": true}, {"in": "path", "name": "candidate_id", "schema": {"format": "uuid", "title": "Candidate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrgPageApiProxyResponseSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Page-scoped candidate API proxy for verifier iframe bridges.", "tags": ["apps"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrgPageApiProxySchema"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/apps/public/{share_token}": {"get": {"operationId": "apps_org_pages_api_get_public_page", "summary": "Get Public Page", "parameters": [{"in": "path", "name": "share_token", "schema": {"title": "Share Token", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrgPagePublicSchema"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "429": {"description": "Too Many Requests", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Return the minimal public view of a shared page.", "tags": ["apps"]}}, "/v1/apps/public/{share_token}/api": {"post": {"operationId": "apps_org_pages_api_proxy_public_build_server", "summary": "Proxy Public Build Server", "parameters": [{"in": "path", "name": "share_token", "schema": {"title": "Share Token", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrgPageApiProxyResponseSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "429": {"description": "Too Many Requests", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Proxy an unauthenticated iframe call from a shared page to its build server.", "tags": ["apps"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/OrgPageApiProxySchema"}}}, "required": true}}}, "/v1/whatsapp/accounts/{org_id}": {"get": {"operationId": "apps_whatsapp_api_list_accounts", "summary": "List Accounts", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/AccountResponse"}, "title": "Response", "type": "array"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List all WhatsApp accounts connected to an organization.", "tags": ["whatsapp"], "security": [{"JWTAuth": []}]}}, "/v1/whatsapp/zernio-onboarding/{org_id}": {"get": {"operationId": "apps_whatsapp_api_get_zernio_onboarding_status", "summary": "Get Zernio Onboarding Status", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WhatsAppZernioStatusResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Return Zernio onboarding feature/config status for this org.", "tags": ["whatsapp"], "security": [{"JWTAuth": []}]}}, "/v1/whatsapp/zernio/accounts/{org_id}/{account_id}/refresh-readiness": {"post": {"operationId": "apps_whatsapp_api_refresh_zernio_readiness", "summary": "Refresh Zernio Readiness", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "account_id", "schema": {"format": "uuid", "title": "Account Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AccountResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "502": {"description": "Bad Gateway", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["whatsapp"], "security": [{"JWTAuth": []}]}}, "/v1/whatsapp/zernio-onboarding/{org_id}/start": {"post": {"operationId": "apps_whatsapp_api_start_zernio_onboarding", "summary": "Start Zernio Onboarding", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WhatsAppZernioStartResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "402": {"description": "Payment Required", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "502": {"description": "Bad Gateway", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "503": {"description": "Service Unavailable", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Start Zernio/Meta WhatsApp connect for an org admin.", "tags": ["whatsapp"], "requestBody": {"content": {"application/json": {"schema": {"anyOf": [{"$ref": "#/components/schemas/WhatsAppZernioStartRequest"}, {"type": "null"}]}}}, "required": false}, "security": [{"JWTAuth": []}]}}, "/v1/whatsapp/zernio/accounts/{org_id}/{account_id}/sender-access": {"patch": {"operationId": "apps_whatsapp_api_update_zernio_sender_access", "summary": "Update Zernio Sender Access", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "account_id", "schema": {"title": "Account Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AccountResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Update per-number sender access for a Zernio WhatsApp Business account.", "tags": ["whatsapp"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/WhatsAppZernioSenderAccessRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/whatsapp/zernio/accounts/{org_id}/{account_id}/owner": {"patch": {"operationId": "apps_whatsapp_api_update_zernio_account_owner", "summary": "Update Zernio Account Owner", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "account_id", "schema": {"title": "Account Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AccountResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Assign a Zernio WhatsApp Business number to the org or an agent teammate.", "tags": ["whatsapp"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/WhatsAppZernioOwnerRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/whatsapp/zernio/accounts/{org_id}/{account_id}/business-profile": {"get": {"operationId": "apps_whatsapp_api_get_zernio_business_profile", "summary": "Get Zernio Business Profile", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "account_id", "schema": {"title": "Account Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WhatsAppZernioProviderResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "503": {"description": "Service Unavailable", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Fetch the WhatsApp Business profile for a connected Zernio account.", "tags": ["whatsapp"], "security": [{"JWTAuth": []}]}, "patch": {"operationId": "apps_whatsapp_api_update_zernio_business_profile", "summary": "Update Zernio Business Profile", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "account_id", "schema": {"title": "Account Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WhatsAppZernioProviderResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "502": {"description": "Bad Gateway", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "503": {"description": "Service Unavailable", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Update editable WhatsApp Business profile fields through Zernio.", "tags": ["whatsapp"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/WhatsAppZernioBusinessProfileRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/whatsapp/zernio/accounts/{org_id}/{account_id}/display-name": {"get": {"operationId": "apps_whatsapp_api_get_zernio_display_name", "summary": "Get Zernio Display Name", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "account_id", "schema": {"title": "Account Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WhatsAppZernioProviderResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "503": {"description": "Service Unavailable", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Fetch display-name review status for a connected Zernio account.", "tags": ["whatsapp"], "security": [{"JWTAuth": []}]}, "post": {"operationId": "apps_whatsapp_api_update_zernio_display_name", "summary": "Update Zernio Display Name", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "account_id", "schema": {"title": "Account Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WhatsAppZernioProviderResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "502": {"description": "Bad Gateway", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "503": {"description": "Service Unavailable", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Request a WhatsApp display-name change through Zernio.", "tags": ["whatsapp"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/WhatsAppZernioDisplayNameRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/whatsapp/zernio/accounts/{org_id}/{account_id}/templates": {"get": {"operationId": "apps_whatsapp_api_list_zernio_templates", "summary": "List Zernio Templates", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "account_id", "schema": {"title": "Account Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WhatsAppZernioProviderResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "503": {"description": "Service Unavailable", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List WhatsApp templates for a connected Zernio account.", "tags": ["whatsapp"], "security": [{"JWTAuth": []}]}, "post": {"operationId": "apps_whatsapp_api_create_zernio_template", "summary": "Create Zernio Template", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "account_id", "schema": {"title": "Account Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WhatsAppZernioProviderResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "502": {"description": "Bad Gateway", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "503": {"description": "Service Unavailable", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Create a WhatsApp template through Zernio.", "tags": ["whatsapp"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/WhatsAppZernioTemplateRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/whatsapp/zernio/accounts/{org_id}/{account_id}/templates/defaults/restore": {"post": {"operationId": "apps_whatsapp_api_restore_zernio_default_templates", "summary": "Restore Zernio Default Templates", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "account_id", "schema": {"title": "Account Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WhatsAppZernioDefaultTemplateRestoreResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "502": {"description": "Bad Gateway", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "503": {"description": "Service Unavailable", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Preview or execute a non-destructive repair of CodePress default templates.", "tags": ["whatsapp"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/WhatsAppZernioDefaultTemplateRestoreRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/whatsapp/zernio/accounts/{org_id}/{account_id}/templates/{template_name}": {"patch": {"operationId": "apps_whatsapp_api_update_zernio_template", "summary": "Update Zernio Template", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "account_id", "schema": {"title": "Account Id", "type": "string"}, "required": true}, {"in": "path", "name": "template_name", "schema": {"title": "Template Name", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WhatsAppZernioProviderResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "502": {"description": "Bad Gateway", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "503": {"description": "Service Unavailable", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Update a WhatsApp template through Zernio.", "tags": ["whatsapp"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/WhatsAppZernioTemplateUpdateRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}, "delete": {"operationId": "apps_whatsapp_api_delete_zernio_template", "summary": "Delete Zernio Template", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "account_id", "schema": {"title": "Account Id", "type": "string"}, "required": true}, {"in": "path", "name": "template_name", "schema": {"title": "Template Name", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WhatsAppZernioProviderResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "502": {"description": "Bad Gateway", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "503": {"description": "Service Unavailable", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Delete a WhatsApp template through Zernio.", "tags": ["whatsapp"], "requestBody": {"content": {"application/json": {"schema": {"anyOf": [{"$ref": "#/components/schemas/WhatsAppZernioConfirmRequest"}, {"type": "null"}]}}}, "required": false}, "security": [{"JWTAuth": []}]}}, "/v1/whatsapp/zernio/accounts/{org_id}/{account_id}/phone-numbers": {"get": {"operationId": "apps_whatsapp_api_list_zernio_phone_numbers", "summary": "List Zernio Phone Numbers", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "account_id", "schema": {"title": "Account Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WhatsAppZernioProviderResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "503": {"description": "Service Unavailable", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List WhatsApp phone numbers available on the account's Zernio profile.", "tags": ["whatsapp"], "security": [{"JWTAuth": []}]}}, "/v1/whatsapp/zernio/accounts/{org_id}/{account_id}/phone-numbers/{phone_number_id}": {"delete": {"operationId": "apps_whatsapp_api_release_zernio_phone_number", "summary": "Release Zernio Phone Number", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "account_id", "schema": {"title": "Account Id", "type": "string"}, "required": true}, {"in": "path", "name": "phone_number_id", "schema": {"title": "Phone Number Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WhatsAppZernioProviderResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "502": {"description": "Bad Gateway", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "503": {"description": "Service Unavailable", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Release a WhatsApp phone number through Zernio.", "tags": ["whatsapp"], "requestBody": {"content": {"application/json": {"schema": {"anyOf": [{"$ref": "#/components/schemas/WhatsAppZernioConfirmRequest"}, {"type": "null"}]}}}, "required": false}, "security": [{"JWTAuth": []}]}}, "/v1/whatsapp/zernio/callback": {"get": {"operationId": "apps_whatsapp_api_zernio_onboarding_callback", "summary": "Zernio Onboarding Callback", "parameters": [], "responses": {"200": {"description": "OK"}}, "description": "Accept Zernio's WhatsApp redirect callback and attach it to the org profile.", "tags": ["whatsapp"]}}, "/v1/whatsapp/accounts/{org_id}/{account_id}": {"delete": {"operationId": "apps_whatsapp_api_delete_account", "summary": "Delete Account", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "account_id", "schema": {"title": "Account Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SuccessMessageResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Disconnect and deactivate a WhatsApp account.\n\nOnly the account owner can disconnect their account.", "tags": ["whatsapp"], "security": [{"JWTAuth": []}]}}, "/v1/whatsapp/accounts/{org_id}/{account_id}/surface": {"patch": {"operationId": "apps_whatsapp_api_update_surface", "summary": "Update Surface", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "account_id", "schema": {"title": "Account Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AccountResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Re-designate a connected bot number as the CodePress \"assistant\" or a\n\"business\" number. Admin-only; only meaningful for bot accounts.", "tags": ["whatsapp"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateSurfaceRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/whatsapp/link-code/{org_id}": {"post": {"operationId": "apps_whatsapp_api_request_link_code", "summary": "Request Link Code", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LinkCodeResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Issue a 6-digit code the user can DM to the org's bot to link their number.\n\nIf the user already has an outstanding code, the same code is returned\nwith its remaining TTL so a page refresh doesn't invalidate a code the\nuser might already be typing.", "tags": ["whatsapp"], "security": [{"JWTAuth": []}]}}, "/v1/whatsapp/mcp": {"post": {"operationId": "apps_whatsapp_api_whatsapp_mcp", "summary": "Whatsapp Mcp", "parameters": [], "responses": {"200": {"description": "OK"}}, "description": "MCP JSON-RPC 2.0 Streamable HTTP endpoint for WhatsApp tools.\n\nCalled by the agent-runner's MCP client. User identity comes from\nX-Codepress-Sidecar-User-Id and X-Codepress-Sidecar-Org-Id headers\ninjected by session_config.py.", "tags": ["whatsapp"]}}, "/v1/whatsapp/zernio/webhook": {"post": {"operationId": "apps_whatsapp_api_zernio_webhook", "summary": "Zernio Webhook", "parameters": [], "responses": {"200": {"description": "OK"}}, "description": "Receive Zernio WhatsApp Inbox message webhooks.", "tags": ["whatsapp"]}}, "/v1/whatsapp/link/complete": {"post": {"operationId": "apps_whatsapp_direct_link_api_complete_direct_link", "summary": "Complete Direct Link", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WhatsAppUserLinkResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Bind the privately delivered WhatsApp identity to the signed-in user.", "tags": ["whatsapp"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/WhatsAppDirectLinkCompleteRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/whatsapp/my-links/{org_id}": {"get": {"operationId": "apps_whatsapp_direct_link_api_list_my_links", "summary": "List My Links", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/WhatsAppUserLinkResponse"}, "title": "Response", "type": "array"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Return the current user's WhatsApp identities for an organization.", "tags": ["whatsapp"], "security": [{"JWTAuth": []}]}}, "/v1/whatsapp/my-links/{org_id}/{link_id}": {"delete": {"operationId": "apps_whatsapp_direct_link_api_delete_my_link", "summary": "Delete My Link", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "link_id", "schema": {"title": "Link Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SuccessMessageResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Remove one WhatsApp identity owned by the current user.", "tags": ["whatsapp"], "security": [{"JWTAuth": []}]}}, "/v1/whatsapp/accounts/{org_id}/{account_id}/group-setup": {"get": {"operationId": "apps_whatsapp_group_setup_api_get_group_setup_status", "summary": "Get Group Setup Status", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "account_id", "schema": {"title": "Account Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WhatsAppGroupSetupStatus"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["whatsapp"], "security": [{"JWTAuth": []}]}}, "/v1/whatsapp/accounts/{org_id}/{account_id}/group-setup/start": {"post": {"operationId": "apps_whatsapp_group_setup_api_start_group_setup", "summary": "Start Group Setup", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "account_id", "schema": {"title": "Account Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WhatsAppGroupSetupStatus"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["whatsapp"], "security": [{"JWTAuth": []}]}}, "/v1/whatsapp/accounts/{org_id}/{account_id}/group-setup/continue": {"post": {"operationId": "apps_whatsapp_group_setup_api_continue_group_setup_action", "summary": "Continue Group Setup Action", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "account_id", "schema": {"title": "Account Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WhatsAppGroupSetupStatus"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["whatsapp"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/WhatsAppGroupSetupContinueRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/whatsapp/accounts/{org_id}/{account_id}/group-setup/recheck": {"post": {"operationId": "apps_whatsapp_group_setup_api_recheck_group_setup", "summary": "Recheck Group Setup", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "account_id", "schema": {"title": "Account Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WhatsAppGroupSetupStatus"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["whatsapp"], "security": [{"JWTAuth": []}]}}, "/v1/build-servers/org/{org_id}": {"get": {"operationId": "apps_build_servers_api_list_build_servers", "summary": "List Build Servers", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "query", "name": "page", "schema": {"default": 1, "title": "Page", "type": "integer"}, "required": false}, {"in": "query", "name": "page_size", "schema": {"default": 100, "title": "Page Size", "type": "integer"}, "required": false}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BuildServerListSchema"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List build servers for an organization. Open to any current org member.", "tags": ["build-servers"], "security": [{"JWTAuth": []}]}}, "/v1/build-servers/org/{org_id}/{server_id}": {"delete": {"operationId": "apps_build_servers_api_delete_build_server_endpoint", "summary": "Delete Build Server Endpoint", "parameters": [{"in": "path", "name": "org_id", "schema": {"title": "Org Id", "type": "string"}, "required": true}, {"in": "path", "name": "server_id", "schema": {"format": "uuid", "title": "Server Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BuildServerDeleteSchema"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Delete a build server and clean up all associated resources.\n\nRemoves the Lambda function, Function URL, ECR images, S3 build\nartifacts, GitHub source files, and the database record.  If some\ncleanup steps fail, the server row is kept in ``deleted`` state\n(preserving retry metadata) and warnings are returned.", "tags": ["build-servers"], "security": [{"JWTAuth": []}]}}, "/v1/build-servers/{build_server_id}/credentials": {"get": {"operationId": "apps_build_servers_api_get_build_server_credentials", "summary": "Get Build Server Credentials", "parameters": [{"in": "path", "name": "build_server_id", "schema": {"title": "Build Server Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK"}}, "description": "Fetch integration credentials for a build server.\n\nCalled by the credential proxy running inside the Lambda at startup\nand periodically to refresh OAuth tokens.\n\nAuthentication: BUILD_SERVER_AUTH_TOKEN via Authorization header.\nScoping: only returns credentials for integrations in allowed_integrations.", "tags": ["build-servers"]}}, "/v1/build-servers/{build_server_id}/proxy/{path}": {"get": {"operationId": "apps_build_servers_api_proxy_build_server_webhook", "summary": "Proxy Build Server Webhook", "parameters": [{"in": "path", "name": "build_server_id", "schema": {"title": "Build Server Id", "type": "string"}, "required": true}, {"in": "path", "name": "path", "schema": {"title": "Path", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK"}}, "description": "Proxy a request to a build server, authenticated by bearer token.\n\nThis is the public ingress for build servers that receive webhooks or\ndirect API calls from external services.  Authentication is via\n``Authorization: Bearer <token>`` or ``X-Build-Server-Token: <token>``.\nNo JWT or org membership is required.\n\nAll original request headers (Stripe-Signature, svix-*, Accept, etc.)\nare forwarded except hop-by-hop and auth headers.  The original query\nstring is preserved.  The upstream response (status, content-type, body)\nis passed through as-is.", "tags": ["build-servers"]}, "post": {"operationId": "apps_build_servers_api_proxy_build_server_webhook", "summary": "Proxy Build Server Webhook", "parameters": [{"in": "path", "name": "build_server_id", "schema": {"title": "Build Server Id", "type": "string"}, "required": true}, {"in": "path", "name": "path", "schema": {"title": "Path", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK"}}, "description": "Proxy a request to a build server, authenticated by bearer token.\n\nThis is the public ingress for build servers that receive webhooks or\ndirect API calls from external services.  Authentication is via\n``Authorization: Bearer <token>`` or ``X-Build-Server-Token: <token>``.\nNo JWT or org membership is required.\n\nAll original request headers (Stripe-Signature, svix-*, Accept, etc.)\nare forwarded except hop-by-hop and auth headers.  The original query\nstring is preserved.  The upstream response (status, content-type, body)\nis passed through as-is.", "tags": ["build-servers"]}, "put": {"operationId": "apps_build_servers_api_proxy_build_server_webhook", "summary": "Proxy Build Server Webhook", "parameters": [{"in": "path", "name": "build_server_id", "schema": {"title": "Build Server Id", "type": "string"}, "required": true}, {"in": "path", "name": "path", "schema": {"title": "Path", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK"}}, "description": "Proxy a request to a build server, authenticated by bearer token.\n\nThis is the public ingress for build servers that receive webhooks or\ndirect API calls from external services.  Authentication is via\n``Authorization: Bearer <token>`` or ``X-Build-Server-Token: <token>``.\nNo JWT or org membership is required.\n\nAll original request headers (Stripe-Signature, svix-*, Accept, etc.)\nare forwarded except hop-by-hop and auth headers.  The original query\nstring is preserved.  The upstream response (status, content-type, body)\nis passed through as-is.", "tags": ["build-servers"]}, "patch": {"operationId": "apps_build_servers_api_proxy_build_server_webhook", "summary": "Proxy Build Server Webhook", "parameters": [{"in": "path", "name": "build_server_id", "schema": {"title": "Build Server Id", "type": "string"}, "required": true}, {"in": "path", "name": "path", "schema": {"title": "Path", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK"}}, "description": "Proxy a request to a build server, authenticated by bearer token.\n\nThis is the public ingress for build servers that receive webhooks or\ndirect API calls from external services.  Authentication is via\n``Authorization: Bearer <token>`` or ``X-Build-Server-Token: <token>``.\nNo JWT or org membership is required.\n\nAll original request headers (Stripe-Signature, svix-*, Accept, etc.)\nare forwarded except hop-by-hop and auth headers.  The original query\nstring is preserved.  The upstream response (status, content-type, body)\nis passed through as-is.", "tags": ["build-servers"]}, "delete": {"operationId": "apps_build_servers_api_proxy_build_server_webhook", "summary": "Proxy Build Server Webhook", "parameters": [{"in": "path", "name": "build_server_id", "schema": {"title": "Build Server Id", "type": "string"}, "required": true}, {"in": "path", "name": "path", "schema": {"title": "Path", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK"}}, "description": "Proxy a request to a build server, authenticated by bearer token.\n\nThis is the public ingress for build servers that receive webhooks or\ndirect API calls from external services.  Authentication is via\n``Authorization: Bearer <token>`` or ``X-Build-Server-Token: <token>``.\nNo JWT or org membership is required.\n\nAll original request headers (Stripe-Signature, svix-*, Accept, etc.)\nare forwarded except hop-by-hop and auth headers.  The original query\nstring is preserved.  The upstream response (status, content-type, body)\nis passed through as-is.", "tags": ["build-servers"]}}, "/v1/adhoc/mcp-proxy/tools/call": {"post": {"operationId": "apps_adhoc_runner_api_mcp_proxy_tools_call", "summary": "Tools Call", "parameters": [], "responses": {"200": {"description": "OK"}}, "description": "Call a tool on the MCP server bound to this token.", "tags": ["adhoc-mcp-proxy"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/_ToolsCallRequest"}}}, "required": true}}}, "/v1/adhoc/mcp-proxy/tools/list": {"post": {"operationId": "apps_adhoc_runner_api_mcp_proxy_tools_list", "summary": "Tools List", "parameters": [], "responses": {"200": {"description": "OK"}}, "description": "List available tools on the MCP server bound to this token.", "tags": ["adhoc-mcp-proxy"]}}, "/v1/adhoc/mcp-proxy/cli/run": {"post": {"operationId": "apps_adhoc_runner_api_mcp_proxy_cli_run", "summary": "Cli Run", "parameters": [], "responses": {"200": {"description": "OK"}}, "description": "Run an isolated CLI command on the server bound to this token.", "tags": ["adhoc-mcp-proxy"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/_CliRunRequest"}}}, "required": true}}}, "/v1/adhoc/mcp-proxy/provider-http/request": {"post": {"operationId": "apps_adhoc_runner_api_mcp_proxy_provider_http_proxy", "summary": "Provider Http Proxy", "parameters": [], "responses": {"200": {"description": "OK"}}, "description": "Call a provider HTTP API through a recipe-scoped OAuth credential proxy.", "tags": ["adhoc-mcp-proxy"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/_ProviderHttpRequest"}}}, "required": true}}}, "/v1/adhoc/mcp-proxy/codepress-slack/request": {"post": {"operationId": "apps_adhoc_runner_api_mcp_proxy_codepress_slack_app_proxy", "summary": "Codepress Slack App Proxy", "parameters": [], "responses": {"200": {"description": "OK"}}, "description": "Call Slack Web API through the active CodePress Slack app installation.", "tags": ["adhoc-mcp-proxy"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/_CodepressSlackAppRequest"}}}, "required": true}}}, "/v1/agent-teammates/templates": {"get": {"operationId": "apps_agent_teammates_api_list_agent_templates", "summary": "List Agent Templates", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentTemplateListResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "security": [{"JWTAuth": []}]}}, "/v1/agent-teammates/drafts": {"post": {"operationId": "apps_agent_teammates_api_create_agent_teammate_draft", "summary": "Create Agent Teammate Draft", "parameters": [], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentTeammateDraftRead"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentTeammateDraftCreate"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agent-teammates/drafts/{draft_id}": {"get": {"operationId": "apps_agent_teammates_api_get_agent_teammate_draft", "summary": "Get Agent Teammate Draft", "parameters": [{"in": "path", "name": "draft_id", "schema": {"format": "uuid", "title": "Draft Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentTeammateDraftRead"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "security": [{"JWTAuth": []}]}, "patch": {"operationId": "apps_agent_teammates_api_patch_agent_teammate_draft", "summary": "Patch Agent Teammate Draft", "parameters": [{"in": "path", "name": "draft_id", "schema": {"format": "uuid", "title": "Draft Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentTeammateDraftRead"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentTeammateDraftPatch"}}}, "required": true}, "security": [{"JWTAuth": []}]}, "delete": {"operationId": "apps_agent_teammates_api_delete_agent_teammate_draft", "summary": "Delete Agent Teammate Draft", "parameters": [{"in": "path", "name": "draft_id", "schema": {"format": "uuid", "title": "Draft Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DeletedResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "security": [{"JWTAuth": []}]}}, "/v1/agent-teammates/drafts/{draft_id}/finalize": {"post": {"operationId": "apps_agent_teammates_api_finalize_agent_teammate_draft", "summary": "Finalize Agent Teammate Draft", "parameters": [{"in": "path", "name": "draft_id", "schema": {"format": "uuid", "title": "Draft Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentTeammateFinalizeRead"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "requestBody": {"content": {"application/json": {"schema": {"anyOf": [{"$ref": "#/components/schemas/AgentTeammateDraftFinalizeRequest"}, {"type": "null"}]}}}, "required": false}, "security": [{"JWTAuth": []}]}}, "/v1/agent-teammates/organizations/{organization_id}/teammates": {"get": {"operationId": "apps_agent_teammates_api_list_agent_teammates", "summary": "List Agent Teammates", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentTeammateListResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "security": [{"JWTAuth": []}]}, "post": {"operationId": "apps_agent_teammates_api_create_agent_teammate", "summary": "Create Agent Teammate", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentTeammateRead"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentTeammateCreate"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agent-teammates/organizations/{organization_id}/options": {"get": {"operationId": "apps_agent_teammates_api_get_agent_teammate_options", "summary": "Get Agent Teammate Options", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentTeammateOptionsResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "security": [{"JWTAuth": []}]}}, "/v1/agent-teammates/teammates/{teammate_id}/integrations/overview": {"get": {"operationId": "apps_agent_teammates_api_get_agent_teammate_integration_overview", "summary": "Get Agent Teammate Integration Overview", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentTeammateIntegrationOverviewResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "security": [{"JWTAuth": []}]}}, "/v1/agent-teammates/repo-sync/{org_repo_id}": {"post": {"operationId": "apps_agent_teammates_api_sync_repo_agents", "summary": "Sync Repo Agents", "parameters": [{"in": "path", "name": "org_repo_id", "schema": {"format": "uuid", "title": "Org Repo Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SuccessMessageResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "security": [{"JWTAuth": []}]}}, "/v1/agent-teammates/repositories/{org_repo_id}/repo-kind": {"patch": {"operationId": "apps_agent_teammates_api_update_repository_kind", "summary": "Update Repository Kind", "parameters": [{"in": "path", "name": "org_repo_id", "schema": {"format": "uuid", "title": "Org Repo Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RepositoryKindResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "502": {"description": "Bad Gateway", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/RepositoryKindUpdate"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agent-teammates/teammates/{teammate_id}/export-to-repo": {"post": {"operationId": "apps_agent_teammates_api_export_agent_teammate_to_repo", "summary": "Export Agent Teammate To Repo", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentTeammateRead"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "502": {"description": "Bad Gateway", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Commit the teammate's configuration to a connected repository.\n\nThe teammate becomes repo-managed: the committed bundle is the source of\ntruth and the repo-sync pipeline keeps the teammate row aligned with it.", "tags": ["agent-teammates"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentTeammateExportToRepoRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agent-teammates/teammates/{teammate_id}": {"get": {"operationId": "apps_agent_teammates_api_get_agent_teammate", "summary": "Get Agent Teammate", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentTeammateRead"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "security": [{"JWTAuth": []}]}, "patch": {"operationId": "apps_agent_teammates_api_update_agent_teammate", "summary": "Update Agent Teammate", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentTeammateRead"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentTeammateUpdate"}}}, "required": true}, "security": [{"JWTAuth": []}]}, "delete": {"operationId": "apps_agent_teammates_api_delete_agent_teammate", "summary": "Delete Agent Teammate", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SuccessMessageResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "security": [{"JWTAuth": []}]}}, "/v1/agent-teammates/teammates/{teammate_id}/repo-bundle": {"get": {"operationId": "apps_agent_teammates_api_get_agent_teammate_repo_bundle", "summary": "Get Agent Teammate Repo Bundle", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RepoAgentBundleRead"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Synced bundle contents for a repo-managed teammate.\n\nServes the repo sync's database mirror (RepoAgentDefinition +\nRepoAgentFile) \u2014 the exact content agent sessions boot from \u2014 so no\nGitHub call happens on read. Visibility matches ``get_agent_teammate``:\nbundle contents are behavior configuration, the repo-managed analog of\nthe instructions field every visible member can already read.", "tags": ["agent-teammates"], "security": [{"JWTAuth": []}]}}, "/v1/agent-teammates/teammates/{teammate_id}/repo-bundle/system-prompt": {"put": {"operationId": "apps_agent_teammates_api_update_agent_teammate_repo_bundle_prompt", "summary": "Update Agent Teammate Repo Bundle Prompt", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RepoAgentBundleWriteResult"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "502": {"description": "Bad Gateway", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Commit a new system prompt into a repo-managed teammate's bundle.\n\nThe repository stays the source of truth: the save commits\n``system-prompt.md`` to the default branch (a compare-and-swap against\nthe content the editor loaded \u2014 see ``repo_agent_edit``) and the\nresponse carries the mirror snapshot serialized under the sync lease \u2014\nor ``bundle: null`` when the refresh could not be proven and the\nmirror is still settling via an enqueued sync. Gate matches every\nother teammate mutation (``_ensure_can_manage_teammate``).", "tags": ["agent-teammates"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/RepoAgentBundlePromptUpdate"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agent-teammates/teammates/{teammate_id}/repo-bundle/skills/{skill_name}": {"put": {"operationId": "apps_agent_teammates_api_update_agent_teammate_repo_bundle_skill", "summary": "Update Agent Teammate Repo Bundle Skill", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}, {"in": "path", "name": "skill_name", "schema": {"title": "Skill Name", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RepoAgentBundleWriteResult"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "502": {"description": "Bad Gateway", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Add, edit, or delete one skill in a repo-managed teammate's bundle.\n\nSame contract as the system-prompt save: the change is committed to the\ndefault branch under a compare-and-swap \u2014 ``base_files: null`` asserts\nthe skill does not exist yet (create), otherwise ``base_files`` must be\nthe exact file map the editor loaded \u2014 and the response carries the\nmirror snapshot serialized under the sync lease, or ``bundle: null``\nwhile it settles. Gate matches every other teammate mutation\n(``_ensure_can_manage_teammate``).", "tags": ["agent-teammates"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/RepoAgentBundleSkillUpdate"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agent-teammates/teammates/{teammate_id}/repo-bundle/hooks": {"put": {"operationId": "apps_agent_teammates_api_update_agent_teammate_repo_bundle_hooks", "summary": "Update Agent Teammate Repo Bundle Hooks", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RepoAgentBundleWriteResult"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "502": {"description": "Bad Gateway", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Replace the hook list in a repo-managed teammate's bundle.\n\nSame contract as the other bundle saves: the change is committed to the\ndefault branch under a compare-and-swap \u2014 ``base_hooks`` must be the\nexact hook list the editor loaded, an empty ``hooks`` deletes\n``hooks.json`` \u2014 and the response carries the mirror snapshot\nserialized under the sync lease, or ``bundle: null`` while it settles.\nEntries are validated with the sync parser's own rules so a save can\nnever commit a file the next sync rejects. Gate matches every other\nteammate mutation (``_ensure_can_manage_teammate``).", "tags": ["agent-teammates"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/RepoAgentBundleHooksUpdate"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agent-teammates/teammates/{teammate_id}/repo-bundle/subagents/{subagent_name}": {"put": {"operationId": "apps_agent_teammates_api_update_agent_teammate_repo_bundle_subagent", "summary": "Update Agent Teammate Repo Bundle Subagent", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}, {"in": "path", "name": "subagent_name", "schema": {"title": "Subagent Name", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RepoAgentBundleWriteResult"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "502": {"description": "Bad Gateway", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Add, edit, or delete one subagent in a repo-managed teammate's bundle.\n\nSame contract as the other bundle saves: the change is committed to the\ndefault branch under a compare-and-swap \u2014 ``base_revision: null``\nasserts the subagent does not exist yet (create), otherwise it must be\nthe opaque ``revision`` the bundle GET served for this subagent;\n``fields: null`` deletes the subagent's whole directory \u2014 and the\nresponse carries the mirror snapshot serialized under the sync lease,\nor ``bundle: null`` while it settles. Only the editor-owned fields\ncross the wire (unknown AGENT.json keys are preserved server-side \u2014\nJavaScript cannot round-trip all JSON numbers), held to the runner's\nsession-start rules because the sync accepts any JSON object and the\nrunner silently drops invalid entries. Gate matches every other\nteammate mutation (``_ensure_can_manage_teammate``).", "tags": ["agent-teammates"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/RepoAgentBundleSubagentUpdate"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agent-teammates/teammates/{teammate_id}/repo-bundle/manifest": {"put": {"operationId": "apps_agent_teammates_api_update_agent_teammate_repo_bundle_manifest", "summary": "Update Agent Teammate Repo Bundle Manifest", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RepoAgentBundleWriteResult"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "502": {"description": "Bad Gateway", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Edit the manifest (``agent.json``) of a repo-managed teammate's bundle.\n\nSame contract as the other bundle saves: the change is committed to the\ndefault branch under a compare-and-swap \u2014 ``base_revision`` must be the\nopaque ``manifest_revision`` the bundle GET served \u2014 and the response\ncarries the mirror snapshot serialized under the sync lease, or\n``bundle: null`` while it settles. Only the editor-owned fields cross\nthe wire (every other manifest key is preserved server-side \u2014\nJavaScript cannot round-trip all JSON numbers), held to the sync\nparser's own rules so a save can never commit a manifest the next sync\nwould reject. Unlike the other saves there is no create or delete, and\nthe agent's handle \u2014 the bundle directory name, not a manifest field \u2014\ncannot be changed here. Gate matches every other teammate mutation\n(``_ensure_can_manage_teammate``).", "tags": ["agent-teammates"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/RepoAgentBundleManifestUpdate"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agent-teammates/teammates/{teammate_id}/repo-bundle/workspace-file": {"put": {"operationId": "apps_agent_teammates_api_update_agent_teammate_repo_bundle_workspace_file", "summary": "Update Agent Teammate Repo Bundle Workspace File", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RepoAgentBundleWriteResult"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "502": {"description": "Bad Gateway", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Add, edit, or delete one workspace file in a repo-managed bundle.\n\nSame contract as the other bundle saves: the change is committed to the\ndefault branch under a compare-and-swap \u2014 ``base_content: null`` asserts\nthe file does not exist yet (create), otherwise it must be the exact\ncontent the editor loaded \u2014 and the response carries the mirror snapshot\nserialized under the sync lease, or ``bundle: null`` while it settles.\nA null ``content`` deletes the file.\n\nThe path lives in the body, not the URL, because workspace relpaths\ncontain slashes (``docs/guide.md``) \u2014 unlike a skill name, which the\nparser constrains to a single segment. Text only: the sync parser\ndecodes the whole bundle as UTF-8 and fails the entire agent on one\nundecodable blob. Gate matches every other teammate mutation\n(``_ensure_can_manage_teammate``).", "tags": ["agent-teammates"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/RepoAgentBundleWorkspaceFileUpdate"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agent-teammates/teammates/{teammate_id}/events": {"get": {"operationId": "apps_agent_teammates_api_stream_agent_teammate_events", "summary": "Stream Agent Teammate Events", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK"}}, "description": "Stream live AgentTeammate state events via Server-Sent Events.\n\nSubscribes to the per-teammate Redis channel and forwards each event to\nthe client as it arrives. Used by the configurator's \"Integrations &\nTriggers\" panel so the right-side cards reflect OAuth completion,\ninbox/Slack/WhatsApp connect flows, and teammate edits without polling.\n\nAuth: standard JWT. The viewer must be an org admin of the teammate's\norg \u2014 same gate as ``get_agent_teammate``.", "tags": ["agent-teammates"], "security": [{"JWTAuth": []}]}}, "/v1/agent-teammates/teammates/{teammate_id}/avatar": {"post": {"operationId": "apps_agent_teammates_api_upload_agent_teammate_avatar", "summary": "Upload Agent Teammate Avatar", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentTeammateRead"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "requestBody": {"content": {"multipart/form-data": {"schema": {"properties": {"file": {"format": "binary", "title": "File", "type": "string"}}, "required": ["file"], "title": "FileParams", "type": "object"}}}, "required": true}, "security": [{"JWTAuth": []}]}, "delete": {"operationId": "apps_agent_teammates_api_delete_agent_teammate_avatar", "summary": "Delete Agent Teammate Avatar", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentTeammateRead"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "security": [{"JWTAuth": []}]}}, "/v1/agent-teammates/teammates/{teammate_id}/inbox": {"get": {"operationId": "apps_agent_teammates_api_get_agent_teammate_inbox", "summary": "Get Agent Teammate Inbox", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentTeammateInboxStatus"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "security": [{"JWTAuth": []}]}, "delete": {"operationId": "apps_agent_teammates_api_disconnect_agent_teammate_inbox", "summary": "Disconnect Agent Teammate Inbox", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SuccessMessageResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "security": [{"JWTAuth": []}]}}, "/v1/agent-teammates/teammates/{teammate_id}/inbox/oauth/start": {"post": {"operationId": "apps_agent_teammates_api_start_agent_teammate_inbox_oauth", "summary": "Start Agent Teammate Inbox Oauth", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentTeammateInboxOAuthStartResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentTeammateInboxOAuthStart"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agent-teammates/teammates/{teammate_id}/mcp/oauth/start": {"post": {"operationId": "apps_agent_teammates_api_start_agent_teammate_mcp_oauth", "summary": "Start Agent Teammate Mcp Oauth", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentTeammateMcpOAuthStartResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentTeammateMcpOAuthStart"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agent-teammates/teammates/{teammate_id}/mcp/{org_mcp_id}": {"delete": {"operationId": "apps_agent_teammates_api_disconnect_agent_teammate_mcp", "summary": "Disconnect Agent Teammate Mcp", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}, {"in": "path", "name": "org_mcp_id", "schema": {"title": "Org Mcp Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SuccessMessageResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "security": [{"JWTAuth": []}]}}, "/v1/agent-teammates/teammates/{teammate_id}/provider-keys": {"get": {"operationId": "apps_agent_teammates_api_list_agent_teammate_provider_keys", "summary": "List Agent Teammate Provider Keys", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentTeammateProviderKeyList"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "security": [{"JWTAuth": []}]}, "put": {"operationId": "apps_agent_teammates_api_set_agent_teammate_provider_key", "summary": "Set Agent Teammate Provider Key", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentTeammateProviderKeyRead"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentTeammateProviderKeySet"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agent-teammates/teammates/{teammate_id}/provider-keys/{provider}": {"delete": {"operationId": "apps_agent_teammates_api_delete_agent_teammate_provider_key", "summary": "Delete Agent Teammate Provider Key", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}, {"in": "path", "name": "provider", "schema": {"title": "Provider", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SuccessMessageResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "security": [{"JWTAuth": []}]}}, "/v1/agent-teammates/teammates/{teammate_id}/provider-keys/openai/device-auth/start": {"post": {"operationId": "apps_agent_teammates_api_start_agent_teammate_device_auth", "summary": "Start Agent Teammate Device Auth", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DeviceAuthStartResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "security": [{"JWTAuth": []}]}}, "/v1/agent-teammates/teammates/{teammate_id}/provider-keys/openai/device-auth/poll": {"post": {"operationId": "apps_agent_teammates_api_poll_agent_teammate_device_auth", "summary": "Poll Agent Teammate Device Auth", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DeviceAuthPollResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/DeviceAuthPollRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agent-teammates/teammates/{teammate_id}/database-connections": {"get": {"operationId": "apps_agent_teammates_api_list_agent_teammate_database_connections", "summary": "List Agent Teammate Database Connections", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DatabaseConnectionListResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "security": [{"JWTAuth": []}]}, "post": {"operationId": "apps_agent_teammates_api_create_agent_teammate_database_connection", "summary": "Create Agent Teammate Database Connection", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DatabaseConnectionResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateDatabaseConnectionRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agent-teammates/teammates/{teammate_id}/database-connections/{connection_id}": {"delete": {"operationId": "apps_agent_teammates_api_delete_agent_teammate_database_connection", "summary": "Delete Agent Teammate Database Connection", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}, {"in": "path", "name": "connection_id", "schema": {"title": "Connection Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DeletedResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "security": [{"JWTAuth": []}]}}, "/v1/agent-teammates/teammates/{teammate_id}/database-connections/{connection_id}/test": {"post": {"operationId": "apps_agent_teammates_api_test_agent_teammate_database_connection", "summary": "Test Agent Teammate Database Connection", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}, {"in": "path", "name": "connection_id", "schema": {"title": "Connection Id", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DatabaseConnectionTestResponse"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "security": [{"JWTAuth": []}]}}, "/v1/agent-teammates/teammates/{teammate_id}/secrets": {"get": {"operationId": "apps_agent_teammates_api_list_agent_teammate_secrets", "summary": "List Agent Teammate Secrets", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"items": {"$ref": "#/components/schemas/AgentVaultSecretInfo"}, "title": "Response", "type": "array"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "security": [{"JWTAuth": []}]}, "post": {"operationId": "apps_agent_teammates_api_set_agent_teammate_secret", "summary": "Set Agent Teammate Secret", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentVaultSecretInfo"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/SetAgentVaultSecretRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agent-teammates/teammates/{teammate_id}/secrets/{name}": {"get": {"operationId": "apps_agent_teammates_api_get_agent_teammate_secret", "summary": "Get Agent Teammate Secret", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}, {"in": "path", "name": "name", "schema": {"title": "Name", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentVaultSecretValueResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "security": [{"JWTAuth": []}]}, "delete": {"operationId": "apps_agent_teammates_api_delete_agent_teammate_secret", "summary": "Delete Agent Teammate Secret", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}, {"in": "path", "name": "name", "schema": {"title": "Name", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SuccessMessageResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "security": [{"JWTAuth": []}]}}, "/v1/agent-teammates/teammates/{teammate_id}/slack": {"get": {"operationId": "apps_agent_teammates_api_get_agent_teammate_slack_settings", "summary": "Get Agent Teammate Slack Settings", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentTeammateSlackSettings"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "security": [{"JWTAuth": []}]}, "put": {"operationId": "apps_agent_teammates_api_update_agent_teammate_slack_settings", "summary": "Update Agent Teammate Slack Settings", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentTeammateSlackSettings"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentTeammateSlackSettingsUpdate"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agent-teammates/teammates/{teammate_id}/google-workspace": {"get": {"operationId": "apps_agent_teammates_api_get_agent_teammate_google_workspace_settings", "summary": "Get Agent Teammate Google Workspace Settings", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentTeammateGoogleWorkspaceSettings"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "410": {"description": "Gone", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "security": [{"JWTAuth": []}]}, "put": {"operationId": "apps_agent_teammates_api_update_agent_teammate_google_workspace_settings", "summary": "Update Agent Teammate Google Workspace Settings", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentTeammateGoogleWorkspaceSettings"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "410": {"description": "Gone", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentTeammateGoogleWorkspaceSettingsUpdate"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agent-teammates/teammates/{teammate_id}/whatsapp/accounts": {"get": {"operationId": "apps_agent_teammates_api_list_agent_teammate_whatsapp_accounts", "summary": "List Agent Teammate Whatsapp Accounts", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentTeammateWhatsAppAccounts"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "security": [{"JWTAuth": []}]}}, "/v1/agent-teammates/teammates/{teammate_id}/managers/{user_id}": {"post": {"operationId": "apps_agent_teammates_api_add_agent_teammate_manager", "summary": "Add Agent Teammate Manager", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}, {"in": "path", "name": "user_id", "schema": {"format": "uuid", "title": "User Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentTeammateRead"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "security": [{"JWTAuth": []}]}, "delete": {"operationId": "apps_agent_teammates_api_remove_agent_teammate_manager", "summary": "Remove Agent Teammate Manager", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}, {"in": "path", "name": "user_id", "schema": {"format": "uuid", "title": "User Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentTeammateRead"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "security": [{"JWTAuth": []}]}}, "/v1/agent-teammates/teammates/{teammate_id}/playbook": {"get": {"operationId": "apps_agent_teammates_playbook_api_get_agent_playbook", "summary": "Get Agent Playbook", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PlaybookRead"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "security": [{"JWTAuth": []}]}}, "/v1/agent-teammates/teammates/{teammate_id}/playbook/sections": {"post": {"operationId": "apps_agent_teammates_playbook_api_create_playbook_section", "summary": "Create Playbook Section", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PlaybookRead"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/PlaybookSectionCreate"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agent-teammates/teammates/{teammate_id}/playbook/sections/reorder": {"post": {"operationId": "apps_agent_teammates_playbook_api_reorder_playbook_sections", "summary": "Reorder Playbook Sections", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PlaybookRead"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/PlaybookReorder"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/agent-teammates/teammates/{teammate_id}/playbook/sections/{section_id}": {"patch": {"operationId": "apps_agent_teammates_playbook_api_update_playbook_section", "summary": "Update Playbook Section", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}, {"in": "path", "name": "section_id", "schema": {"format": "uuid", "title": "Section Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PlaybookRead"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/PlaybookSectionUpdate"}}}, "required": true}, "security": [{"JWTAuth": []}]}, "delete": {"operationId": "apps_agent_teammates_playbook_api_delete_playbook_section", "summary": "Delete Playbook Section", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}, {"in": "path", "name": "section_id", "schema": {"format": "uuid", "title": "Section Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PlaybookRead"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "security": [{"JWTAuth": []}]}}, "/v1/agent-teammates/teammates/{teammate_id}/playbook/versions": {"post": {"operationId": "apps_agent_teammates_playbook_api_publish_playbook_version", "summary": "Publish Playbook Version", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PlaybookVersionRead"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "409": {"description": "Conflict", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/PlaybookPublish"}}}, "required": true}, "security": [{"JWTAuth": []}]}, "get": {"operationId": "apps_agent_teammates_playbook_api_list_playbook_versions", "summary": "List Playbook Versions", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PlaybookVersionListResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "security": [{"JWTAuth": []}]}}, "/v1/agent-teammates/teammates/{teammate_id}/playbook/versions/{version_number}": {"get": {"operationId": "apps_agent_teammates_playbook_api_get_playbook_version", "summary": "Get Playbook Version", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}, {"in": "path", "name": "version_number", "schema": {"title": "Version Number", "type": "integer"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PlaybookVersionRead"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "security": [{"JWTAuth": []}]}}, "/v1/agent-teammates/teammates/{teammate_id}/profile": {"get": {"operationId": "apps_agent_teammates_profile_api_get_agent_profile", "summary": "Get Agent Profile", "parameters": [{"in": "path", "name": "teammate_id", "schema": {"format": "uuid", "title": "Teammate Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AgentProfileSummary"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "tags": ["agent-teammates"], "security": [{"JWTAuth": []}]}}, "/v1/organizations/{organization_id}/browser-profiles": {"get": {"operationId": "apps_browser_profiles_api_list_browser_profiles", "summary": "List Browser Profiles", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BrowserProfileListResponse"}}}}}, "tags": ["browser-profiles"], "security": [{"JWTAuth": []}]}, "post": {"operationId": "apps_browser_profiles_api_create_browser_profile", "summary": "Create Browser Profile", "parameters": [{"in": "path", "name": "organization_id", "schema": {"format": "uuid", "title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BrowserProfileOut"}}}}}, "tags": ["browser-profiles"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/BrowserProfileCreateRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/browser-profiles/{profile_id}": {"patch": {"operationId": "apps_browser_profiles_api_patch_browser_profile", "summary": "Patch Browser Profile", "parameters": [{"in": "path", "name": "profile_id", "schema": {"format": "uuid", "title": "Profile Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BrowserProfileOut"}}}}}, "tags": ["browser-profiles"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/BrowserProfilePatchRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}, "delete": {"operationId": "apps_browser_profiles_api_delete_browser_profile", "summary": "Delete Browser Profile", "parameters": [{"in": "path", "name": "profile_id", "schema": {"format": "uuid", "title": "Profile Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK"}}, "tags": ["browser-profiles"], "security": [{"JWTAuth": []}]}}, "/v1/browser-profiles/{profile_id}/grants": {"get": {"operationId": "apps_browser_profiles_api_list_grants", "summary": "List Grants", "parameters": [{"in": "path", "name": "profile_id", "schema": {"format": "uuid", "title": "Profile Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BrowserProfileGrantListResponse"}}}}}, "tags": ["browser-profiles"], "security": [{"JWTAuth": []}]}, "post": {"operationId": "apps_browser_profiles_api_add_grant", "summary": "Add Grant", "parameters": [{"in": "path", "name": "profile_id", "schema": {"format": "uuid", "title": "Profile Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BrowserProfileGrantOut"}}}}}, "tags": ["browser-profiles"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/BrowserProfileGrantRequest"}}}, "required": true}, "security": [{"JWTAuth": []}]}}, "/v1/browser-profiles/{profile_id}/grants/{grant_id}": {"delete": {"operationId": "apps_browser_profiles_api_revoke_grant", "summary": "Revoke Grant", "parameters": [{"in": "path", "name": "profile_id", "schema": {"format": "uuid", "title": "Profile Id", "type": "string"}, "required": true}, {"in": "path", "name": "grant_id", "schema": {"format": "uuid", "title": "Grant Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK"}}, "tags": ["browser-profiles"], "security": [{"JWTAuth": []}]}}, "/v1/browser-profiles/{profile_id}/audit": {"get": {"operationId": "apps_browser_profiles_api_list_audit", "summary": "List Audit", "parameters": [{"in": "path", "name": "profile_id", "schema": {"format": "uuid", "title": "Profile Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BrowserProfileAuditListResponse"}}}}}, "tags": ["browser-profiles"], "security": [{"JWTAuth": []}]}}, "/v1/platform-mcp/organizations/{organization_id}/keys": {"post": {"operationId": "apps_platform_mcp_api_create_platform_api_key", "summary": "Create Platform Api Key", "parameters": [{"in": "path", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PlatformApiKeyCreatedSchema"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Create an MCP API key. The raw key is only returned in this response.", "tags": ["platform-mcp"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/PlatformApiKeyCreateSchema"}}}, "required": true}, "security": [{"JWTAuth": []}]}, "get": {"operationId": "apps_platform_mcp_api_list_platform_api_keys", "summary": "List Platform Api Keys", "parameters": [{"in": "path", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PlatformApiKeyListSchema"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "List the organization's MCP API keys (raw keys are never returned).", "tags": ["platform-mcp"], "security": [{"JWTAuth": []}]}}, "/v1/platform-mcp/organizations/{organization_id}/keys/{key_id}": {"delete": {"operationId": "apps_platform_mcp_api_revoke_platform_api_key", "summary": "Revoke Platform Api Key", "parameters": [{"in": "path", "name": "organization_id", "schema": {"title": "Organization Id", "type": "string"}, "required": true}, {"in": "path", "name": "key_id", "schema": {"title": "Key Id", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/StatusResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "404": {"description": "Not Found", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Revoke an MCP API key. Revocation takes effect immediately.", "tags": ["platform-mcp"], "security": [{"JWTAuth": []}]}}, "/v1/platform-mcp/oauth/authorization-requests/{request_token}": {"get": {"operationId": "apps_platform_mcp_api_get_platform_oauth_consent_request", "summary": "Get Platform Oauth Consent Request", "parameters": [{"in": "path", "name": "request_token", "schema": {"title": "Request Token", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PlatformOAuthConsentRequestSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Return one pending OAuth request and organizations the user may authorize.", "tags": ["platform-mcp"], "security": [{"JWTAuth": []}]}, "post": {"operationId": "apps_platform_mcp_api_decide_platform_oauth_consent_request", "summary": "Decide Platform Oauth Consent Request", "parameters": [{"in": "path", "name": "request_token", "schema": {"title": "Request Token", "type": "string"}, "required": true}], "responses": {"200": {"description": "OK", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PlatformOAuthConsentResultSchema"}}}}, "400": {"description": "Bad Request", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "401": {"description": "Unauthorized", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "403": {"description": "Forbidden", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "422": {"description": "Unprocessable Content", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}, "500": {"description": "Internal Server Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ApiErrorResponse"}}}}}, "description": "Approve or deny a pending OAuth request and return its exact client redirect.", "tags": ["platform-mcp"], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/PlatformOAuthConsentDecisionSchema"}}}, "required": true}, "security": [{"JWTAuth": []}]}}}, "components": {"schemas": {"UserInfo": {"description": "Response schema for authenticated user information.", "properties": {"id": {"title": "Id", "type": "string"}, "email": {"title": "Email", "type": "string"}, "is_active": {"title": "Is Active", "type": "boolean"}, "is_superuser": {"title": "Is Superuser", "type": "boolean"}, "is_verified": {"title": "Is Verified", "type": "boolean"}, "github_username": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Github Username"}, "is_allowed_access": {"default": false, "title": "Is Allowed Access", "type": "boolean"}}, "required": ["id", "email", "is_active", "is_superuser", "is_verified"], "title": "UserInfo", "type": "object"}, "ApiErrorResponse": {"description": "Canonical error payload for API responses.", "properties": {"detail": {"title": "Detail", "type": "string"}}, "required": ["detail"], "title": "ApiErrorResponse", "type": "object"}, "MessageResponse": {"description": "Generic response schema with a message.", "properties": {"message": {"title": "Message", "type": "string"}}, "required": ["message"], "title": "MessageResponse", "type": "object"}, "SendVerificationCodeRequest": {"description": "Request for sending email verification code.", "properties": {"email": {"format": "email", "title": "Email", "type": "string"}}, "required": ["email"], "title": "SendVerificationCodeRequest", "type": "object"}, "EmailVerificationRequest": {"description": "Request for verifying email with code.", "properties": {"email": {"format": "email", "title": "Email", "type": "string"}, "code": {"title": "Code", "type": "string"}}, "required": ["email", "code"], "title": "EmailVerificationRequest", "type": "object"}, "LoginResponse": {"description": "Response containing access token and user data.", "properties": {"access_token": {"title": "Access Token", "type": "string"}, "token_type": {"default": "bearer", "title": "Token Type", "type": "string"}, "user": {"$ref": "#/components/schemas/UserRead"}, "return_to": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Return To"}}, "required": ["access_token", "user"], "title": "LoginResponse", "type": "object"}, "UserRead": {"description": "User data returned in API responses.", "properties": {"id": {"title": "Id", "type": "string"}, "email": {"title": "Email", "type": "string"}, "is_active": {"title": "Is Active", "type": "boolean"}, "is_verified": {"title": "Is Verified", "type": "boolean"}, "is_superuser": {"title": "Is Superuser", "type": "boolean"}, "github_username": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Github Username"}, "avatar_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Avatar Url"}, "github_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Github Id"}, "google_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Google Id"}, "apple_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Apple Id"}, "is_allowed_access": {"default": true, "title": "Is Allowed Access", "type": "boolean"}, "feature_flag_access": {"default": false, "title": "Feature Flag Access", "type": "boolean"}, "feature_flags_panel_access": {"default": false, "title": "Feature Flags Panel Access", "type": "boolean"}}, "required": ["id", "email", "is_active", "is_verified", "is_superuser"], "title": "UserRead", "type": "object"}, "EmailSignupRequest": {"description": "Request for email/password signup.", "properties": {"email": {"format": "email", "title": "Email", "type": "string"}, "password": {"title": "Password", "type": "string"}}, "required": ["email", "password"], "title": "EmailSignupRequest", "type": "object"}, "LoginRequest": {"description": "Request for email/password login.", "properties": {"email": {"format": "email", "title": "Email", "type": "string"}, "password": {"title": "Password", "type": "string"}}, "required": ["email", "password"], "title": "LoginRequest", "type": "object"}, "ForgotPasswordRequest": {"description": "Request for forgot password.", "properties": {"email": {"format": "email", "title": "Email", "type": "string"}}, "required": ["email"], "title": "ForgotPasswordRequest", "type": "object"}, "ResetPasswordRequest": {"description": "Request for resetting password with token.", "properties": {"token": {"title": "Token", "type": "string"}, "new_password": {"title": "New Password", "type": "string"}}, "required": ["token", "new_password"], "title": "ResetPasswordRequest", "type": "object"}, "TokenRefreshResponse": {"description": "Response containing a refreshed access token.", "properties": {"access_token": {"title": "Access Token", "type": "string"}, "token_type": {"default": "bearer", "title": "Token Type", "type": "string"}}, "required": ["access_token"], "title": "TokenRefreshResponse", "type": "object"}, "OAuthAuthorizeUrlResponse": {"description": "Response for OAuth authorize URL generation.", "properties": {"url": {"title": "Url", "type": "string"}, "state": {"title": "State", "type": "string"}}, "required": ["url", "state"], "title": "OAuthAuthorizeUrlResponse", "type": "object"}, "GitHubAppSetupResponse": {"properties": {"success": {"title": "Success", "type": "boolean"}, "org_slug": {"title": "Org Slug", "type": "string"}, "github_org_name": {"title": "Github Org Name", "type": "string"}}, "required": ["success", "org_slug", "github_org_name"], "title": "GitHubAppSetupResponse", "type": "object"}, "GitHubAppSetupRequest": {"properties": {"installation_id": {"title": "Installation Id", "type": "integer"}, "state": {"title": "State", "type": "string"}}, "required": ["installation_id", "state"], "title": "GitHubAppSetupRequest", "type": "object"}, "OAuthCallbackErrorResponse": {"description": "OAuth callback error with an optional native mobile return target.", "properties": {"detail": {"title": "Detail", "type": "string"}, "oauth_return_to": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Oauth Return To"}}, "required": ["detail"], "title": "OAuthCallbackErrorResponse", "type": "object"}, "GitHubOAuthCallbackRequest": {"description": "Request for GitHub OAuth callback.", "properties": {"code": {"title": "Code", "type": "string"}, "state": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "State"}, "installation_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Installation Id"}, "setup_action": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Setup Action"}, "redirect_uri": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Redirect Uri"}}, "required": ["code"], "title": "GitHubOAuthCallbackRequest", "type": "object"}, "ExtensionTokenResponse": {"description": "Response containing extension token and user data.", "properties": {"token": {"title": "Token", "type": "string"}, "user": {"$ref": "#/components/schemas/UserRead"}}, "required": ["token", "user"], "title": "ExtensionTokenResponse", "type": "object"}, "ExtensionTokenRequest": {"description": "Request for browser extension token.", "properties": {"domain": {"title": "Domain", "type": "string"}}, "required": ["domain"], "title": "ExtensionTokenRequest", "type": "object"}, "AppleOAuthCallbackRequest": {"description": "Request for Sign in with Apple callback.\n\nNative mobile clients send Apple's signed identity token directly. Web\nclients send an authorization code that the backend exchanges for the\nidentity token before verification.", "properties": {"identity_token": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Identity Token"}, "code": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Code"}, "state": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "State"}, "redirect_uri": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Redirect Uri"}, "email": {"anyOf": [{"format": "email", "type": "string"}, {"type": "null"}], "title": "Email"}, "full_name": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Full Name"}, "authorization_code": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization Code"}}, "title": "AppleOAuthCallbackRequest", "type": "object"}, "GoogleOAuthCallbackRequest": {"description": "Request for Google OAuth callback.", "properties": {"code": {"title": "Code", "type": "string"}, "state": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "State"}, "redirect_uri": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Redirect Uri"}}, "required": ["code"], "title": "GoogleOAuthCallbackRequest", "type": "object"}, "DeckTokenResponse": {"properties": {"access_token": {"title": "Access Token", "type": "string"}, "token_type": {"default": "bearer", "title": "Token Type", "type": "string"}, "viewer_id": {"title": "Viewer Id", "type": "string"}}, "required": ["access_token", "viewer_id"], "title": "DeckTokenResponse", "type": "object"}, "DeckTokenRequest": {"properties": {"viewer_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Viewer Id"}}, "title": "DeckTokenRequest", "type": "object"}, "RecipientTokenResponse": {"properties": {"access_token": {"title": "Access Token", "type": "string"}, "token_type": {"default": "bearer", "title": "Token Type", "type": "string"}, "viewer_id": {"title": "Viewer Id", "type": "string"}}, "required": ["access_token", "viewer_id"], "title": "RecipientTokenResponse", "type": "object"}, "RecipientTokenRequest": {"properties": {"slug": {"title": "Slug", "type": "string"}, "viewer_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Viewer Id"}}, "required": ["slug"], "title": "RecipientTokenRequest", "type": "object"}, "GitHubOrgInfo": {"description": "Schema representing GitHub organization information.", "properties": {"id": {"title": "Id", "type": "integer"}, "github_id": {"title": "Github Id", "type": "integer"}, "name": {"title": "Name", "type": "string"}, "avatar_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Avatar Url"}, "installation_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Installation Id"}, "installation_ready": {"default": false, "title": "Installation Ready", "type": "boolean"}, "reviewer_installation_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Reviewer Installation Id"}, "reviewer_installation_ready": {"default": false, "title": "Reviewer Installation Ready", "type": "boolean"}}, "required": ["id", "github_id", "name"], "title": "GitHubOrgInfo", "type": "object"}, "OrganizationResponse": {"description": "Response schema for organization data.", "properties": {"id": {"title": "Id", "type": "string"}, "name": {"title": "Name", "type": "string"}, "slug": {"title": "Slug", "type": "string"}, "avatar_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Avatar Url"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "github_orgs": {"default": [], "items": {"$ref": "#/components/schemas/GitHubOrgInfo"}, "title": "Github Orgs", "type": "array"}}, "required": ["id", "name", "slug", "created_at"], "title": "OrganizationResponse", "type": "object"}, "CreateOrganizationRequest": {"description": "Request schema for creating a new organization.", "properties": {"name": {"title": "Name", "type": "string"}, "avatar_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Avatar Url"}}, "required": ["name"], "title": "CreateOrganizationRequest", "type": "object"}, "OrgSetupStatusResponse": {"description": "Response schema for organization provisioning status.", "properties": {"ready": {"title": "Ready", "type": "boolean"}, "status": {"default": "ready", "title": "Status", "type": "string"}, "retry_after_ms": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Retry After Ms"}, "last_error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last Error"}}, "required": ["ready"], "title": "OrgSetupStatusResponse", "type": "object"}, "SaveOnboardingPathsResponse": {"description": "Response schema for saving onboarding paths.", "properties": {"ok": {"default": true, "title": "Ok", "type": "boolean"}}, "title": "SaveOnboardingPathsResponse", "type": "object"}, "SaveOnboardingPathsRequest": {"description": "Request schema for saving onboarding path selections.", "properties": {"paths": {"items": {"type": "string"}, "title": "Paths", "type": "array"}}, "required": ["paths"], "title": "SaveOnboardingPathsRequest", "type": "object"}, "OrganizationMembershipResponse": {"description": "Response schema for a user's membership in an organization.", "properties": {"id": {"title": "Id", "type": "string"}, "name": {"title": "Name", "type": "string"}, "slug": {"title": "Slug", "type": "string"}, "avatar_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Avatar Url"}, "role": {"title": "Role", "type": "string"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "github_orgs": {"default": [], "items": {"$ref": "#/components/schemas/GitHubOrgInfo"}, "title": "Github Orgs", "type": "array"}, "sort_order": {"default": 0, "title": "Sort Order", "type": "integer"}}, "required": ["id", "name", "slug", "role", "created_at"], "title": "OrganizationMembershipResponse", "type": "object"}, "ReorderOrganizationsRequest": {"description": "Request schema for reordering the user's organization list.", "properties": {"ordered_org_ids": {"items": {"type": "string"}, "minItems": 1, "title": "Ordered Org Ids", "type": "array"}}, "required": ["ordered_org_ids"], "title": "ReorderOrganizationsRequest", "type": "object"}, "OrganizationDetailResponse": {"description": "Extended response schema with organization members and invitations.", "properties": {"id": {"title": "Id", "type": "string"}, "name": {"title": "Name", "type": "string"}, "slug": {"title": "Slug", "type": "string"}, "avatar_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Avatar Url"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "github_orgs": {"default": [], "items": {"$ref": "#/components/schemas/GitHubOrgInfo"}, "title": "Github Orgs", "type": "array"}, "members": {"default": [], "items": {"$ref": "#/components/schemas/OrganizationMemberResponse"}, "title": "Members", "type": "array"}, "pending_invitations": {"default": [], "items": {"$ref": "#/components/schemas/OrganizationInvitationResponse"}, "title": "Pending Invitations", "type": "array"}}, "required": ["id", "name", "slug", "created_at"], "title": "OrganizationDetailResponse", "type": "object"}, "OrganizationInvitationResponse": {"description": "Response schema for organization invitation data.", "properties": {"id": {"title": "Id", "type": "string"}, "organization_name": {"title": "Organization Name", "type": "string"}, "email": {"title": "Email", "type": "string"}, "role": {"title": "Role", "type": "string"}, "status": {"title": "Status", "type": "string"}, "invited_by_name": {"title": "Invited By Name", "type": "string"}, "expires_at": {"format": "date-time", "title": "Expires At", "type": "string"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}}, "required": ["id", "organization_name", "email", "role", "status", "invited_by_name", "expires_at", "created_at"], "title": "OrganizationInvitationResponse", "type": "object"}, "OrganizationMemberResponse": {"description": "Response schema for organization member data.", "properties": {"user": {"$ref": "#/components/schemas/UserResponse"}, "role": {"title": "Role", "type": "string"}, "joined_at": {"format": "date-time", "title": "Joined At", "type": "string"}}, "required": ["user", "role", "joined_at"], "title": "OrganizationMemberResponse", "type": "object"}, "UserResponse": {"description": "Response schema for user data.", "properties": {"id": {"title": "Id", "type": "string"}, "email": {"title": "Email", "type": "string"}, "github_username": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Github Username"}, "avatar_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Avatar Url"}}, "required": ["id", "email"], "title": "UserResponse", "type": "object"}, "MemberSearchResult": {"description": "Response schema for member search results.", "properties": {"id": {"title": "Id", "type": "string"}, "email": {"title": "Email", "type": "string"}, "first_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "First Name"}, "last_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last Name"}, "github_username": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Github Username"}, "avatar_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Avatar Url"}, "organization_id": {"title": "Organization Id", "type": "string"}, "organization_name": {"title": "Organization Name", "type": "string"}}, "required": ["id", "email", "organization_id", "organization_name"], "title": "MemberSearchResult", "type": "object"}, "BulkInviteItem": {"description": "Schema for a single item in a bulk invite request.", "properties": {"email": {"format": "email", "title": "Email", "type": "string"}, "role": {"default": "member", "title": "Role", "type": "string"}}, "required": ["email"], "title": "BulkInviteItem", "type": "object"}, "BulkInviteRequest": {"description": "Request schema for bulk inviting users to an organization.", "properties": {"invitations": {"items": {"$ref": "#/components/schemas/BulkInviteItem"}, "title": "Invitations", "type": "array"}}, "required": ["invitations"], "title": "BulkInviteRequest", "type": "object"}, "InviteUserRequest": {"description": "Request schema for inviting a user to an organization.", "properties": {"email": {"format": "email", "title": "Email", "type": "string"}, "role": {"default": "member", "enum": ["owner", "admin", "publisher", "member"], "title": "Role", "type": "string"}}, "required": ["email"], "title": "InviteUserRequest", "type": "object"}, "UpdateMemberRoleRequest": {"description": "Update a vault member's role.", "properties": {"role": {"title": "Role", "type": "string"}}, "required": ["role"], "title": "UpdateMemberRoleRequest", "type": "object"}, "AcceptInvitationResponse": {"description": "Response schema for accepting an invitation.", "properties": {"message": {"title": "Message", "type": "string"}, "organization_id": {"title": "Organization Id", "type": "string"}, "role": {"title": "Role", "type": "string"}, "granted_org_mcps_count": {"default": 0, "title": "Granted Org Mcps Count", "type": "integer"}}, "required": ["message", "organization_id", "role"], "title": "AcceptInvitationResponse", "type": "object"}, "AcceptInvitationRequest": {"description": "Request schema for accepting an organization invitation.", "properties": {"invitation_id": {"format": "uuid", "title": "Invitation Id", "type": "string"}}, "required": ["invitation_id"], "title": "AcceptInvitationRequest", "type": "object"}, "GitHubOrganizationResponse": {"description": "Response schema for GitHub organization data.", "properties": {"id": {"title": "Id", "type": "integer"}, "github_id": {"title": "Github Id", "type": "integer"}, "name": {"title": "Name", "type": "string"}, "avatar_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Avatar Url"}, "installation_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Installation Id"}, "is_linked": {"default": false, "title": "Is Linked", "type": "boolean"}}, "required": ["id", "github_id", "name"], "title": "GitHubOrganizationResponse", "type": "object"}, "GitHubStatusResponse": {"description": "Response schema for GitHub integration status.", "properties": {"github_orgs": {"default": [], "items": {"$ref": "#/components/schemas/GitHubOrgInfo"}, "title": "Github Orgs", "type": "array"}}, "title": "GitHubStatusResponse", "type": "object"}, "LinkGitHubOrganizationRequest": {"description": "Request schema for linking a GitHub organization.", "properties": {"github_org_id": {"title": "Github Org Id", "type": "integer"}}, "required": ["github_org_id"], "title": "LinkGitHubOrganizationRequest", "type": "object"}, "ConnectedRepositoriesResponse": {"description": "Response schema for listing connected repositories.", "properties": {"repositories": {"items": {"$ref": "#/components/schemas/ConnectedRepository"}, "title": "Repositories", "type": "array"}}, "required": ["repositories"], "title": "ConnectedRepositoriesResponse", "type": "object"}, "ConnectedRepository": {"description": "Schema representing a repository connected to an organization.", "properties": {"id": {"title": "Id", "type": "integer"}, "org_repo_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Org Repo Id"}, "name": {"title": "Name", "type": "string"}, "full_name": {"title": "Full Name", "type": "string"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "private": {"title": "Private", "type": "boolean"}, "html_url": {"title": "Html Url", "type": "string"}, "default_branch": {"default": "main", "title": "Default Branch", "type": "string"}, "setup_status": {"default": "ready", "title": "Setup Status", "type": "string"}, "setup_error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Setup Error"}, "style_analysis": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Style Analysis"}, "style_analysis_updated_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Style Analysis Updated At"}, "design_md": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Design Md"}, "design_md_updated_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Design Md Updated At"}, "design_md_branch": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Design Md Branch"}, "design_md_sha": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Design Md Sha"}, "design_source_role": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Design Source Role"}, "design_source_eligible": {"default": false, "title": "Design Source Eligible", "type": "boolean"}, "design_source_reason": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Design Source Reason"}, "design_source_mode": {"default": "auto", "title": "Design Source Mode", "type": "string"}, "design_source_role_override": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Design Source Role Override"}, "repo_kind": {"default": "app", "title": "Repo Kind", "type": "string"}, "design_guide_pr_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Design Guide Pr Url"}, "design_guide_pr_branch": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Design Guide Pr Branch"}, "colors": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Colors"}, "colors_updated_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Colors Updated At"}, "staging_backend_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Staging Backend Url"}, "has_frontend": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Has Frontend"}, "connected_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Connected At"}}, "required": ["id", "name", "full_name", "private", "html_url"], "title": "ConnectedRepository", "type": "object"}, "AppDesignGuideChecklistItem": {"description": "One step in the App Design Guide readiness checklist.", "properties": {"key": {"title": "Key", "type": "string"}, "label": {"title": "Label", "type": "string"}, "state": {"title": "State", "type": "string"}, "detail": {"title": "Detail", "type": "string"}}, "required": ["key", "label", "state", "detail"], "title": "AppDesignGuideChecklistItem", "type": "object"}, "AppDesignGuideRepository": {"description": "Repository row in the App Design Guide setup experience.", "properties": {"repository_id": {"title": "Repository Id", "type": "integer"}, "repository_db_id": {"title": "Repository Db Id", "type": "integer"}, "name": {"title": "Name", "type": "string"}, "full_name": {"title": "Full Name", "type": "string"}, "html_url": {"title": "Html Url", "type": "string"}, "default_branch": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Default Branch"}, "detected_role": {"title": "Detected Role", "type": "string"}, "effective_role": {"title": "Effective Role", "type": "string"}, "design_source_eligible": {"title": "Design Source Eligible", "type": "boolean"}, "design_source_reason": {"title": "Design Source Reason", "type": "string"}, "design_source_mode": {"title": "Design Source Mode", "type": "string"}, "design_source_role_override": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Design Source Role Override"}, "selected_for_apps": {"default": false, "title": "Selected For Apps", "type": "boolean"}, "recommended": {"default": false, "title": "Recommended", "type": "boolean"}, "design_md_status": {"title": "Design Md Status", "type": "string"}, "design_md_updated_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Design Md Updated At"}, "design_md_branch": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Design Md Branch"}, "design_md_sha": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Design Md Sha"}, "design_guide_pr_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Design Guide Pr Url"}, "design_guide_pr_branch": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Design Guide Pr Branch"}}, "required": ["repository_id", "repository_db_id", "name", "full_name", "html_url", "detected_role", "effective_role", "design_source_eligible", "design_source_reason", "design_source_mode", "design_md_status"], "title": "AppDesignGuideRepository", "type": "object"}, "AppDesignGuideStatusResponse": {"description": "Computed status for generated App DESIGN.md setup.", "properties": {"status": {"title": "Status", "type": "string"}, "status_label": {"title": "Status Label", "type": "string"}, "message": {"title": "Message", "type": "string"}, "primary_action": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Primary Action"}, "repositories": {"default": [], "items": {"$ref": "#/components/schemas/AppDesignGuideRepository"}, "title": "Repositories", "type": "array"}, "selected_sources": {"default": [], "items": {"$ref": "#/components/schemas/AppDesignGuideRepository"}, "title": "Selected Sources", "type": "array"}, "checklist": {"default": [], "items": {"$ref": "#/components/schemas/AppDesignGuideChecklistItem"}, "title": "Checklist", "type": "array"}, "blockers": {"default": [], "items": {"type": "string"}, "title": "Blockers", "type": "array"}, "generated_design_md": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Generated Design Md"}, "current_design_md": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Current Design Md"}, "managed_app_repo": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Managed App Repo"}, "managed_app_repo_ready": {"default": false, "title": "Managed App Repo Ready", "type": "boolean"}, "managed_app_design_synced": {"default": false, "title": "Managed App Design Synced", "type": "boolean"}, "recommended_repository_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Recommended Repository Id"}}, "required": ["status", "status_label", "message"], "title": "AppDesignGuideStatusResponse", "type": "object"}, "UpdateRepositoryDesignSourceRequest": {"description": "Request to choose how a repo contributes to generated App guides.", "properties": {"mode": {"enum": ["auto", "primary", "include", "exclude"], "title": "Mode", "type": "string"}, "role_override": {"anyOf": [{"enum": ["frontend", "fullstack"], "type": "string"}, {"type": "null"}], "title": "Role Override"}}, "required": ["mode"], "title": "UpdateRepositoryDesignSourceRequest", "type": "object"}, "AvailableRepositoriesResponse": {"description": "Response schema for listing available repositories.", "properties": {"repositories": {"items": {"$ref": "#/components/schemas/AvailableRepository"}, "title": "Repositories", "type": "array"}, "installation_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Installation Id"}, "installation_ids": {"items": {"type": "integer"}, "title": "Installation Ids", "type": "array"}, "github_api_failed": {"default": false, "title": "Github Api Failed", "type": "boolean"}, "page": {"default": 1, "title": "Page", "type": "integer"}, "per_page": {"default": 30, "title": "Per Page", "type": "integer"}, "has_more": {"default": false, "title": "Has More", "type": "boolean"}, "total_count": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Total Count"}}, "required": ["repositories"], "title": "AvailableRepositoriesResponse", "type": "object"}, "AvailableRepository": {"description": "Schema representing an available GitHub repository.", "properties": {"id": {"title": "Id", "type": "integer"}, "name": {"title": "Name", "type": "string"}, "full_name": {"title": "Full Name", "type": "string"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "private": {"title": "Private", "type": "boolean"}, "html_url": {"title": "Html Url", "type": "string"}, "default_branch": {"default": "main", "title": "Default Branch", "type": "string"}, "is_connected": {"default": false, "title": "Is Connected", "type": "boolean"}, "is_taken_by_other_org": {"default": false, "title": "Is Taken By Other Org", "type": "boolean"}}, "required": ["id", "name", "full_name", "private", "html_url"], "title": "AvailableRepository", "type": "object"}, "AddRepositoryResponse": {"description": "Response schema for adding a repository.", "properties": {"success": {"title": "Success", "type": "boolean"}, "message": {"title": "Message", "type": "string"}, "repository": {"anyOf": [{"$ref": "#/components/schemas/AvailableRepository"}, {"type": "null"}]}}, "required": ["success", "message"], "title": "AddRepositoryResponse", "type": "object"}, "AddRepositoryRequest": {"description": "Request schema for adding a repository to an organization.", "properties": {"repository_id": {"title": "Repository Id", "type": "integer"}}, "required": ["repository_id"], "title": "AddRepositoryRequest", "type": "object"}, "RemoveRepositoryResponse": {"description": "Response schema for removing a repository.", "properties": {"success": {"title": "Success", "type": "boolean"}, "message": {"title": "Message", "type": "string"}}, "required": ["success", "message"], "title": "RemoveRepositoryResponse", "type": "object"}, "BootstrapSkillResponse": {"description": "Response schema for skill bootstrap trigger.", "properties": {"success": {"title": "Success", "type": "boolean"}, "session_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Session Id"}, "error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error"}}, "required": ["success"], "title": "BootstrapSkillResponse", "type": "object"}, "BootstrapSkillRequest": {"description": "Request schema for triggering a skill bootstrap session.", "properties": {"org_id": {"title": "Org Id", "type": "string"}, "repo_name": {"title": "Repo Name", "type": "string"}, "repo_owner": {"title": "Repo Owner", "type": "string"}, "repo_id": {"title": "Repo Id", "type": "integer"}, "bootstrap_run_id": {"title": "Bootstrap Run Id", "type": "string"}, "skill_type": {"default": "pr_screenshot", "title": "Skill Type", "type": "string"}, "user_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "User Id"}}, "required": ["org_id", "repo_name", "repo_owner", "repo_id", "bootstrap_run_id"], "title": "BootstrapSkillRequest", "type": "object"}, "AutoDocResponse": {"description": "Response schema for auto-document trigger.", "properties": {"success": {"title": "Success", "type": "boolean"}, "session_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Session Id"}, "error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error"}}, "required": ["success"], "title": "AutoDocResponse", "type": "object"}, "AutoDocRequest": {"description": "Request schema for triggering an auto-document agent session.", "properties": {"org_id": {"title": "Org Id", "type": "string"}, "repo_name": {"title": "Repo Name", "type": "string"}, "repo_owner": {"title": "Repo Owner", "type": "string"}, "repo_id": {"title": "Repo Id", "type": "integer"}}, "required": ["org_id", "repo_name", "repo_owner", "repo_id"], "title": "AutoDocRequest", "type": "object"}, "TriggerRepoActionResponse": {"description": "Response schema for repo action triggers.", "properties": {"success": {"title": "Success", "type": "boolean"}, "message": {"title": "Message", "type": "string"}}, "required": ["success", "message"], "title": "TriggerRepoActionResponse", "type": "object"}, "TriggerRepoActionRequest": {"description": "Request schema for triggering repo setup actions.", "properties": {"action": {"title": "Action", "type": "string"}}, "required": ["action"], "title": "TriggerRepoActionRequest", "type": "object"}, "DevServerSetupResponse": {"description": "Response schema for the dev_server bootstrap trigger.", "properties": {"success": {"title": "Success", "type": "boolean"}, "dispatched": {"title": "Dispatched", "type": "integer"}, "skipped": {"title": "Skipped", "type": "integer"}, "message": {"title": "Message", "type": "string"}}, "required": ["success", "dispatched", "skipped", "message"], "title": "DevServerSetupResponse", "type": "object"}, "DevServerSetupRequest": {"description": "Request schema for triggering the dev_server bootstrap on demand.", "properties": {"repository_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Repository Id"}, "all_repos": {"default": false, "title": "All Repos", "type": "boolean"}, "force": {"default": false, "title": "Force", "type": "boolean"}}, "title": "DevServerSetupRequest", "type": "object"}, "OrganizationSettingsResponse": {"description": "Response schema for organization settings.", "properties": {"auto_document_enabled": {"default": false, "title": "Auto Document Enabled", "type": "boolean"}, "mcp_tool_search_enabled": {"default": false, "title": "Mcp Tool Search Enabled", "type": "boolean"}, "claude_only_defer_codepress_tools_enabled": {"default": false, "title": "Claude Only Defer Codepress Tools Enabled", "type": "boolean"}, "codex_mcp_tool_search_enabled": {"default": false, "title": "Codex Mcp Tool Search Enabled", "type": "boolean"}, "whatsapp_response_notifications_enabled": {"default": false, "title": "Whatsapp Response Notifications Enabled", "type": "boolean"}, "whatsapp_zernio_onboarding_enabled": {"default": false, "title": "Whatsapp Zernio Onboarding Enabled", "type": "boolean"}, "whatsapp_zernio_sender_whitelist_enabled": {"default": false, "title": "Whatsapp Zernio Sender Whitelist Enabled", "type": "boolean"}, "whatsapp_zernio_allowed_sender_phone_numbers": {"items": {"type": "string"}, "title": "Whatsapp Zernio Allowed Sender Phone Numbers", "type": "array"}, "generated_artifact_pr_review_flow_enabled": {"default": false, "title": "Generated Artifact Pr Review Flow Enabled", "type": "boolean"}, "generated_artifact_initial_merge_review_flow_enabled": {"default": false, "title": "Generated Artifact Initial Merge Review Flow Enabled", "type": "boolean"}, "autonomous_software_engineer_recipe_enabled": {"default": false, "title": "Autonomous Software Engineer Recipe Enabled", "type": "boolean"}, "agent_mcp_aggregator_enabled": {"default": true, "title": "Agent Mcp Aggregator Enabled", "type": "boolean"}, "terminal_cloud_sync_enabled": {"default": true, "title": "Terminal Cloud Sync Enabled", "type": "boolean"}, "model_usage_metering_enabled": {"default": true, "title": "Model Usage Metering Enabled", "type": "boolean"}, "agent_compute_metering_enabled": {"default": true, "title": "Agent Compute Metering Enabled", "type": "boolean"}, "reserved_agent_parallelism": {"default": 0, "title": "Reserved Agent Parallelism", "type": "integer"}, "agent_reservation_billing_interval": {"default": "none", "enum": ["none", "monthly", "yearly"], "title": "Agent Reservation Billing Interval", "type": "string"}, "agent_reservation_checkout_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Agent Reservation Checkout Url"}, "default_agent_model": {"default": "claude-opus-5", "title": "Default Agent Model", "type": "string"}, "agent_platform_enabled": {"default": false, "title": "Agent Platform Enabled", "type": "boolean"}, "my_work_dashboard_enabled": {"default": false, "title": "My Work Dashboard Enabled", "type": "boolean"}, "guided_mode_enabled": {"default": true, "title": "Guided Mode Enabled", "type": "boolean"}, "has_usable_dev_server_repo": {"default": false, "title": "Has Usable Dev Server Repo", "type": "boolean"}, "lean_runner_sse_enabled": {"default": false, "title": "Lean Runner Sse Enabled", "type": "boolean"}, "agent_chat_timing_display_enabled": {"default": false, "title": "Agent Chat Timing Display Enabled", "type": "boolean"}, "subagent_management_enabled": {"default": false, "title": "Subagent Management Enabled", "type": "boolean"}, "verify_vm_enabled": {"default": false, "title": "Verify Vm Enabled", "type": "boolean"}, "feature_flag_access_enabled": {"default": false, "title": "Feature Flag Access Enabled", "type": "boolean"}, "github_pr_handoff_ignored_commenters": {"items": {"type": "string"}, "title": "Github Pr Handoff Ignored Commenters", "type": "array"}, "default_automation_alert_slack_channel_id": {"default": "", "title": "Default Automation Alert Slack Channel Id", "type": "string"}}, "title": "OrganizationSettingsResponse", "type": "object"}, "UpdateOrganizationSettingsRequest": {"description": "Request schema for updating organization settings.", "properties": {"auto_document_enabled": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Auto Document Enabled"}, "mcp_tool_search_enabled": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Mcp Tool Search Enabled"}, "claude_only_defer_codepress_tools_enabled": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Claude Only Defer Codepress Tools Enabled"}, "codex_mcp_tool_search_enabled": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Codex Mcp Tool Search Enabled"}, "whatsapp_response_notifications_enabled": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Whatsapp Response Notifications Enabled"}, "whatsapp_zernio_onboarding_enabled": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Whatsapp Zernio Onboarding Enabled"}, "whatsapp_zernio_sender_whitelist_enabled": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Whatsapp Zernio Sender Whitelist Enabled"}, "whatsapp_zernio_allowed_sender_phone_numbers": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Whatsapp Zernio Allowed Sender Phone Numbers"}, "generated_artifact_pr_review_flow_enabled": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Generated Artifact Pr Review Flow Enabled"}, "generated_artifact_initial_merge_review_flow_enabled": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Generated Artifact Initial Merge Review Flow Enabled"}, "autonomous_software_engineer_recipe_enabled": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Autonomous Software Engineer Recipe Enabled"}, "agent_mcp_aggregator_enabled": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Agent Mcp Aggregator Enabled"}, "terminal_cloud_sync_enabled": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Terminal Cloud Sync Enabled"}, "reserved_agent_parallelism": {"anyOf": [{"maximum": 960, "minimum": 0, "type": "integer"}, {"type": "null"}], "title": "Reserved Agent Parallelism"}, "agent_reservation_billing_interval": {"anyOf": [{"enum": ["none", "monthly", "yearly"], "type": "string"}, {"type": "null"}], "title": "Agent Reservation Billing Interval"}, "default_agent_model": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Default Agent Model"}, "agent_platform_enabled": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Agent Platform Enabled"}, "my_work_dashboard_enabled": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "My Work Dashboard Enabled"}, "guided_mode_enabled": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Guided Mode Enabled"}, "lean_runner_sse_enabled": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Lean Runner Sse Enabled"}, "agent_chat_timing_display_enabled": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Agent Chat Timing Display Enabled"}, "subagent_management_enabled": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Subagent Management Enabled"}, "verify_vm_enabled": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Verify Vm Enabled"}, "github_pr_handoff_ignored_commenters": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Github Pr Handoff Ignored Commenters"}, "default_automation_alert_slack_channel_id": {"anyOf": [{"maxLength": 64, "type": "string"}, {"type": "null"}], "title": "Default Automation Alert Slack Channel Id"}}, "title": "UpdateOrganizationSettingsRequest", "type": "object"}, "SetFeatureFlagAccessRequest": {"description": "Internal-only request to grant/revoke an org's feature-flag-panel access.", "properties": {"enabled": {"title": "Enabled", "type": "boolean"}}, "required": ["enabled"], "title": "SetFeatureFlagAccessRequest", "type": "object"}, "SetUsageBillingOverridesRequest": {"description": "Internal-only organization billing controls for newly incurred usage.", "properties": {"model_usage_metering_enabled": {"title": "Model Usage Metering Enabled", "type": "boolean"}, "agent_compute_metering_enabled": {"title": "Agent Compute Metering Enabled", "type": "boolean"}}, "required": ["model_usage_metering_enabled", "agent_compute_metering_enabled"], "title": "SetUsageBillingOverridesRequest", "type": "object"}, "AgentCapacityBandAvailabilityResponse": {"description": "Sold vs provisioned reserved hosts for one capacity band.\n\nLets the settings page steer users away from sold-out bands before a\nfailed save, and gives ops sold-vs-provisioned visibility so new capacity\nis provisioned before sales are refused.", "properties": {"band_parallel_agents": {"title": "Band Parallel Agents", "type": "integer"}, "instances_provisioned": {"title": "Instances Provisioned", "type": "integer"}, "instances_sold": {"title": "Instances Sold", "type": "integer"}}, "required": ["band_parallel_agents", "instances_provisioned", "instances_sold"], "title": "AgentCapacityBandAvailabilityResponse", "type": "object"}, "AgentCapacityPricingResponse": {"description": "Customer-facing agent reservation pricing.", "properties": {"max_reserved_parallel_agents": {"title": "Max Reserved Parallel Agents", "type": "integer"}, "monthly_reserved_usd_per_agent": {"title": "Monthly Reserved Usd Per Agent", "type": "integer"}, "yearly_reserved_monthly_usd_per_agent": {"title": "Yearly Reserved Monthly Usd Per Agent", "type": "integer"}, "on_demand_hourly_usd_per_agent": {"title": "On Demand Hourly Usd Per Agent", "type": "integer"}, "reserved_break_even_hours_per_month": {"title": "Reserved Break Even Hours Per Month", "type": "integer"}, "yearly_discount_percent": {"title": "Yearly Discount Percent", "type": "integer"}}, "required": ["max_reserved_parallel_agents", "monthly_reserved_usd_per_agent", "yearly_reserved_monthly_usd_per_agent", "on_demand_hourly_usd_per_agent", "reserved_break_even_hours_per_month", "yearly_discount_percent"], "title": "AgentCapacityPricingResponse", "type": "object"}, "AgentCapacityRecommendationResponse": {"description": "Recommended reserved-capacity target.", "properties": {"parallel_agents": {"title": "Parallel Agents", "type": "integer"}, "reason": {"title": "Reason", "type": "string"}}, "required": ["parallel_agents", "reason"], "title": "AgentCapacityRecommendationResponse", "type": "object"}, "AgentCapacityReservationResponse": {"description": "Org-level agent capacity plan and current reservation intent.", "properties": {"reserved_parallel_agents": {"title": "Reserved Parallel Agents", "type": "integer"}, "billing_interval": {"enum": ["none", "monthly", "yearly"], "title": "Billing Interval", "type": "string"}, "activation_pending": {"default": false, "title": "Activation Pending", "type": "boolean"}, "checkout_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Checkout Url"}, "feature_enabled": {"default": false, "title": "Feature Enabled", "type": "boolean"}, "reservation_monthly_usd": {"title": "Reservation Monthly Usd", "type": "integer"}, "pricing": {"$ref": "#/components/schemas/AgentCapacityPricingResponse"}, "workload": {"$ref": "#/components/schemas/AgentWorkloadSummaryResponse"}, "recommendation": {"$ref": "#/components/schemas/AgentCapacityRecommendationResponse"}, "band_availability": {"default": [], "items": {"$ref": "#/components/schemas/AgentCapacityBandAvailabilityResponse"}, "title": "Band Availability", "type": "array"}}, "required": ["reserved_parallel_agents", "billing_interval", "reservation_monthly_usd", "pricing", "workload", "recommendation"], "title": "AgentCapacityReservationResponse", "type": "object"}, "AgentWorkloadSummaryResponse": {"description": "Recent org workload used for agent-capacity recommendations.", "properties": {"lookback_days": {"title": "Lookback Days", "type": "integer"}, "total_sessions": {"title": "Total Sessions", "type": "integer"}, "active_days": {"title": "Active Days", "type": "integer"}, "api_calls": {"title": "Api Calls", "type": "integer"}, "billable_cost_usd": {"title": "Billable Cost Usd", "type": "number"}, "on_demand_agent_hours": {"title": "On Demand Agent Hours", "type": "number"}, "max_sessions_in_day": {"title": "Max Sessions In Day", "type": "integer"}, "peak_concurrent_runs": {"title": "Peak Concurrent Runs", "type": "integer"}, "cost_effective_reserved_agents": {"title": "Cost Effective Reserved Agents", "type": "integer"}, "avg_sessions_per_active_day": {"title": "Avg Sessions Per Active Day", "type": "number"}, "current_active_sessions": {"title": "Current Active Sessions", "type": "integer"}}, "required": ["lookback_days", "total_sessions", "active_days", "api_calls", "billable_cost_usd", "on_demand_agent_hours", "max_sessions_in_day", "peak_concurrent_runs", "cost_effective_reserved_agents", "avg_sessions_per_active_day", "current_active_sessions"], "title": "AgentWorkloadSummaryResponse", "type": "object"}, "SetAgentCapacityAccessRequest": {"description": "Internal-only request to enable/disable an org's capacity reservations.", "properties": {"enabled": {"title": "Enabled", "type": "boolean"}}, "required": ["enabled"], "title": "SetAgentCapacityAccessRequest", "type": "object"}, "UpdateAgentCapacityReservationRequest": {"description": "Request schema for updating reserved agent capacity.", "properties": {"reserved_parallel_agents": {"maximum": 960, "minimum": 0, "title": "Reserved Parallel Agents", "type": "integer"}, "billing_interval": {"anyOf": [{"enum": ["none", "monthly", "yearly"], "type": "string"}, {"type": "null"}], "title": "Billing Interval"}}, "required": ["reserved_parallel_agents"], "title": "UpdateAgentCapacityReservationRequest", "type": "object"}, "AgentIntelligencePreferencesResponse": {"description": "Current user's effective agent model defaults for an organization.", "properties": {"organization_default_model": {"title": "Organization Default Model", "type": "string"}, "organization_default_agent_type": {"title": "Organization Default Agent Type", "type": "string"}, "organization_default_provider": {"title": "Organization Default Provider", "type": "string"}, "personal_preferred_model": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Personal Preferred Model"}, "personal_preferred_agent_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Personal Preferred Agent Type"}, "personal_preferred_provider": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Personal Preferred Provider"}, "effective_model": {"title": "Effective Model", "type": "string"}, "effective_agent_type": {"title": "Effective Agent Type", "type": "string"}, "effective_provider": {"title": "Effective Provider", "type": "string"}, "organization_default_guided_mode": {"default": true, "title": "Organization Default Guided Mode", "type": "boolean"}, "personal_guided_mode": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Personal Guided Mode"}, "effective_guided_mode": {"default": true, "title": "Effective Guided Mode", "type": "boolean"}, "local_device_runtime_enabled": {"default": false, "title": "Local Device Runtime Enabled", "type": "boolean"}}, "required": ["organization_default_model", "organization_default_agent_type", "organization_default_provider", "effective_model", "effective_agent_type", "effective_provider"], "title": "AgentIntelligencePreferencesResponse", "type": "object"}, "UpdateAgentIntelligencePreferenceRequest": {"description": "Request schema for updating the current user's per-org preferences.\n\nFields are applied only when present in the request body\n(``model_fields_set``), so a guided-mode-only PATCH never clears the\nmodel preference and vice versa. Explicit ``null`` clears a field back\nto inheriting the org default.", "properties": {"preferred_agent_model": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Preferred Agent Model"}, "guided_mode": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Guided Mode"}, "local_device_runtime_enabled": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Local Device Runtime Enabled"}}, "title": "UpdateAgentIntelligencePreferenceRequest", "type": "object"}, "OpenRouterModelResponse": {"description": "OpenRouter model metadata exposed through the backend catalog proxy.", "properties": {"id": {"title": "Id", "type": "string"}, "openrouter_id": {"title": "Openrouter Id", "type": "string"}, "label": {"title": "Label", "type": "string"}, "description": {"title": "Description", "type": "string"}, "context_length": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Context Length"}, "prompt_price": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Prompt Price"}, "completion_price": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Completion Price"}, "supported_parameters": {"items": {"type": "string"}, "title": "Supported Parameters", "type": "array"}, "input_modalities": {"items": {"type": "string"}, "title": "Input Modalities", "type": "array"}, "output_modalities": {"items": {"type": "string"}, "title": "Output Modalities", "type": "array"}}, "required": ["id", "openrouter_id", "label", "description"], "title": "OpenRouterModelResponse", "type": "object"}, "OpenRouterModelsResponse": {"description": "Curated and searchable OpenRouter model catalog.", "properties": {"best": {"items": {"$ref": "#/components/schemas/OpenRouterModelResponse"}, "title": "Best", "type": "array"}, "models": {"items": {"$ref": "#/components/schemas/OpenRouterModelResponse"}, "title": "Models", "type": "array"}}, "required": ["best", "models"], "title": "OpenRouterModelsResponse", "type": "object"}, "ProviderApiKeyResponse": {"description": "Response schema for a configured provider API key (key value is never returned).", "properties": {"provider": {"title": "Provider", "type": "string"}, "scope": {"enum": ["org", "user"], "title": "Scope", "type": "string"}, "credential_type": {"default": "api_key", "enum": ["api_key", "oauth"], "title": "Credential Type", "type": "string"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}, "id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Id"}, "account_label": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Account Label"}, "usage_snapshot": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Usage Snapshot"}, "usage_used_percent": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Usage Used Percent"}, "usage_snapshot_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Usage Snapshot At"}, "rate_limited_until": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Rate Limited Until"}, "needs_reconnect": {"default": false, "title": "Needs Reconnect", "type": "boolean"}, "last_auth_error_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Last Auth Error At"}}, "required": ["provider", "scope", "created_at", "updated_at"], "title": "ProviderApiKeyResponse", "type": "object"}, "SetProviderApiKeyRequest": {"description": "Request schema for setting a provider API key or OAuth token (BYOK).", "properties": {"provider": {"enum": ["openai", "anthropic", "gemini"], "title": "Provider", "type": "string"}, "api_key": {"title": "Api Key", "type": "string"}, "credential_type": {"default": "api_key", "enum": ["api_key", "oauth"], "title": "Credential Type", "type": "string"}, "refresh_token": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Refresh Token"}, "expires_at": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Expires At"}, "account_label": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Account Label"}}, "required": ["provider", "api_key"], "title": "SetProviderApiKeyRequest", "type": "object"}, "ProviderApiKeyListResponse": {"description": "Response schema listing all configured provider API keys.", "properties": {"keys": {"items": {"$ref": "#/components/schemas/ProviderApiKeyResponse"}, "title": "Keys", "type": "array"}}, "required": ["keys"], "title": "ProviderApiKeyListResponse", "type": "object"}, "OpenAIOAuthStartResponse": {"description": "Response containing the OpenAI authorization URL.", "properties": {"authorization_url": {"title": "Authorization Url", "type": "string"}}, "required": ["authorization_url"], "title": "OpenAIOAuthStartResponse", "type": "object"}, "OpenAIOAuthStartRequest": {"description": "Request to start the OpenAI OAuth flow.", "properties": {"redirect_uri": {"title": "Redirect Uri", "type": "string"}}, "required": ["redirect_uri"], "title": "OpenAIOAuthStartRequest", "type": "object"}, "OpenAIOAuthExchangeRequest": {"description": "Request to exchange an OpenAI OAuth authorization code for tokens.", "properties": {"code": {"title": "Code", "type": "string"}, "state": {"title": "State", "type": "string"}, "redirect_uri": {"title": "Redirect Uri", "type": "string"}}, "required": ["code", "state", "redirect_uri"], "title": "OpenAIOAuthExchangeRequest", "type": "object"}, "DeviceAuthStartResponse": {"description": "Response from starting the device auth flow.", "properties": {"session_id": {"title": "Session Id", "type": "string"}, "verification_url": {"title": "Verification Url", "type": "string"}, "user_code": {"title": "User Code", "type": "string"}, "expires_in": {"title": "Expires In", "type": "integer"}}, "required": ["session_id", "verification_url", "user_code", "expires_in"], "title": "DeviceAuthStartResponse", "type": "object"}, "DeviceAuthPollResponse": {"description": "Response from polling device auth status.", "properties": {"status": {"enum": ["pending", "complete", "expired", "error"], "title": "Status", "type": "string"}, "verification_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Verification Url"}, "user_code": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "User Code"}, "error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error"}}, "required": ["status"], "title": "DeviceAuthPollResponse", "type": "object"}, "DeviceAuthPollRequest": {"description": "Request to poll device auth status.", "properties": {"session_id": {"title": "Session Id", "type": "string"}}, "required": ["session_id"], "title": "DeviceAuthPollRequest", "type": "object"}, "TeamResponse": {"properties": {"id": {"title": "Id", "type": "string"}, "name": {"title": "Name", "type": "string"}, "slug": {"title": "Slug", "type": "string"}, "description": {"title": "Description", "type": "string"}, "member_count": {"title": "Member Count", "type": "integer"}, "lead_user_ids": {"items": {"type": "string"}, "title": "Lead User Ids", "type": "array"}}, "required": ["id", "name", "slug", "description", "member_count", "lead_user_ids"], "title": "TeamResponse", "type": "object"}, "CreateTeamResponse": {"properties": {"team_id": {"title": "Team Id", "type": "string"}}, "required": ["team_id"], "title": "CreateTeamResponse", "type": "object"}, "CreateTeamRequest": {"properties": {"name": {"title": "Name", "type": "string"}, "slug": {"title": "Slug", "type": "string"}, "description": {"default": "", "title": "Description", "type": "string"}}, "required": ["name", "slug"], "title": "CreateTeamRequest", "type": "object"}, "TeamMemberResponse": {"properties": {"user_id": {"title": "User Id", "type": "string"}, "email": {"title": "Email", "type": "string"}, "is_lead": {"title": "Is Lead", "type": "boolean"}}, "required": ["user_id", "email", "is_lead"], "title": "TeamMemberResponse", "type": "object"}, "AddTeamMemberResponse": {"properties": {"membership_id": {"title": "Membership Id", "type": "string"}}, "required": ["membership_id"], "title": "AddTeamMemberResponse", "type": "object"}, "AddTeamMemberRequest": {"properties": {"user_id": {"format": "uuid", "title": "User Id", "type": "string"}, "is_lead": {"default": false, "title": "Is Lead", "type": "boolean"}}, "required": ["user_id"], "title": "AddTeamMemberRequest", "type": "object"}, "RemoveTeamMemberResponse": {"properties": {"removed": {"title": "Removed", "type": "boolean"}}, "required": ["removed"], "title": "RemoveTeamMemberResponse", "type": "object"}, "SetManagerResponse": {"properties": {"updated": {"default": true, "title": "Updated", "type": "boolean"}}, "title": "SetManagerResponse", "type": "object"}, "SetManagerRequest": {"properties": {"manager_user_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Manager User Id"}}, "title": "SetManagerRequest", "type": "object"}, "ReportResponse": {"properties": {"user_id": {"title": "User Id", "type": "string"}, "email": {"title": "Email", "type": "string"}, "direct": {"title": "Direct", "type": "boolean"}}, "required": ["user_id", "email", "direct"], "title": "ReportResponse", "type": "object"}, "ScopeEntryResponse": {"properties": {"user_id": {"title": "User Id", "type": "string"}, "email": {"title": "Email", "type": "string"}, "source": {"title": "Source", "type": "string"}}, "required": ["user_id", "email", "source"], "title": "ScopeEntryResponse", "type": "object"}, "AuditEventActorSchema": {"properties": {"id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Id"}, "email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Email"}, "label": {"default": "", "title": "Label", "type": "string"}}, "title": "AuditEventActorSchema", "type": "object"}, "OrganizationAuditEventListSchema": {"properties": {"events": {"items": {"$ref": "#/components/schemas/OrganizationAuditEventSchema"}, "title": "Events", "type": "array"}, "total": {"title": "Total", "type": "integer"}, "limit": {"title": "Limit", "type": "integer"}, "offset": {"title": "Offset", "type": "integer"}}, "required": ["events", "total", "limit", "offset"], "title": "OrganizationAuditEventListSchema", "type": "object"}, "OrganizationAuditEventSchema": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "organization_id": {"format": "uuid", "title": "Organization Id", "type": "string"}, "event_kind": {"title": "Event Kind", "type": "string"}, "action": {"title": "Action", "type": "string"}, "category": {"title": "Category", "type": "string"}, "source": {"title": "Source", "type": "string"}, "actor_type": {"title": "Actor Type", "type": "string"}, "actor": {"anyOf": [{"$ref": "#/components/schemas/AuditEventActorSchema"}, {"type": "null"}]}, "resource_type": {"title": "Resource Type", "type": "string"}, "resource_id": {"title": "Resource Id", "type": "string"}, "resource_label": {"title": "Resource Label", "type": "string"}, "trace_id": {"title": "Trace Id", "type": "string"}, "request_method": {"title": "Request Method", "type": "string"}, "request_path": {"title": "Request Path", "type": "string"}, "route": {"title": "Route", "type": "string"}, "status_code": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Status Code"}, "ip_address": {"title": "Ip Address", "type": "string"}, "user_agent": {"title": "User Agent", "type": "string"}, "session_id": {"title": "Session Id", "type": "string"}, "automation_run_id": {"title": "Automation Run Id", "type": "string"}, "before": {"additionalProperties": true, "title": "Before", "type": "object"}, "after": {"additionalProperties": true, "title": "After", "type": "object"}, "diff": {"additionalProperties": true, "title": "Diff", "type": "object"}, "metadata": {"additionalProperties": true, "title": "Metadata", "type": "object"}, "semantic_audit_missing": {"title": "Semantic Audit Missing", "type": "boolean"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}}, "required": ["id", "organization_id", "event_kind", "action", "category", "source", "actor_type", "resource_type", "resource_id", "resource_label", "trace_id", "request_method", "request_path", "route", "ip_address", "user_agent", "session_id", "automation_run_id", "before", "after", "diff", "metadata", "semantic_audit_missing", "created_at"], "title": "OrganizationAuditEventSchema", "type": "object"}, "GitHubRepositoryRead": {"description": "Schema for reading a GitHub repository.", "properties": {"id": {"title": "Id", "type": "integer"}, "owner": {"title": "Owner", "type": "string"}, "name": {"title": "Name", "type": "string"}, "default_branch": {"title": "Default Branch", "type": "string"}, "user_id": {"title": "User Id", "type": "string"}, "design_md": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Design Md"}, "design_md_updated_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Design Md Updated At"}, "design_md_branch": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Design Md Branch"}, "design_md_sha": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Design Md Sha"}, "design_source_role": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Design Source Role"}, "design_source_eligible": {"default": false, "title": "Design Source Eligible", "type": "boolean"}, "design_source_reason": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Design Source Reason"}, "colors": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Colors"}, "colors_updated_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Colors Updated At"}, "setup_status": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Setup Status"}, "setup_progress": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Setup Progress"}, "setup_progress_detail": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Setup Progress Detail"}}, "required": ["id", "owner", "name", "default_branch", "user_id"], "title": "GitHubRepositoryRead", "type": "object"}, "GitHubRepositoryCreate": {"description": "Schema for creating a GitHub repository.", "properties": {"owner": {"title": "Owner", "type": "string"}, "name": {"title": "Name", "type": "string"}, "access_token": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Access Token"}, "default_branch": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "main", "title": "Default Branch"}}, "required": ["owner", "name"], "title": "GitHubRepositoryCreate", "type": "object"}, "GitHubRepositoryAccessResponse": {"description": "Schema for repository access check response.", "properties": {"has_access": {"description": "Whether the user has access to the repository", "title": "Has Access", "type": "boolean"}, "repository_name": {"description": "Repository name that was checked", "title": "Repository Name", "type": "string"}, "access_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Type of access: 'organization' or 'personal'", "title": "Access Type"}, "error_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Error type", "title": "Error Type"}}, "required": ["has_access", "repository_name"], "title": "GitHubRepositoryAccessResponse", "type": "object"}, "GitHubRepositoryAccessRequest": {"description": "Schema for checking repository access.", "properties": {"repository_name": {"description": "Repository name in format 'owner/name'", "title": "Repository Name", "type": "string"}}, "required": ["repository_name"], "title": "GitHubRepositoryAccessRequest", "type": "object"}, "RepoFileSearchResponse": {"description": "Schema for repository file path search results.", "properties": {"files": {"items": {"$ref": "#/components/schemas/RepoFileSearchResult"}, "title": "Files", "type": "array"}}, "required": ["files"], "title": "RepoFileSearchResponse", "type": "object"}, "RepoFileSearchResult": {"description": "A single file path match from repository file search.", "properties": {"path": {"title": "Path", "type": "string"}, "name": {"title": "Name", "type": "string"}}, "required": ["path", "name"], "title": "RepoFileSearchResult", "type": "object"}, "GitHubRepositoryUpdate": {"description": "Schema for updating a GitHub repository.", "properties": {"owner": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Owner"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name"}, "access_token": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Access Token"}, "default_branch": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Default Branch"}}, "title": "GitHubRepositoryUpdate", "type": "object"}, "SuccessMessageResponse": {"description": "Success response with a human-readable message.", "properties": {"success": {"default": true, "title": "Success", "type": "boolean"}, "message": {"title": "Message", "type": "string"}}, "required": ["message"], "title": "SuccessMessageResponse", "type": "object"}, "GitHubOrganizationWithRepos": {"description": "Schema for reading a GitHub organization with its repositories.", "properties": {"id": {"title": "Id", "type": "integer"}, "github_id": {"title": "Github Id", "type": "integer"}, "name": {"title": "Name", "type": "string"}, "avatar_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Avatar Url"}, "is_admin": {"default": false, "title": "Is Admin", "type": "boolean"}, "repositories": {"default": [], "items": {"$ref": "#/components/schemas/GitHubRepositoryRead"}, "title": "Repositories", "type": "array"}}, "required": ["id", "github_id", "name"], "title": "GitHubOrganizationWithRepos", "type": "object"}, "AvailableGitHubRepository": {"description": "Schema for a repository available from GitHub (not yet added to CodePress).", "properties": {"github_id": {"title": "Github Id", "type": "integer"}, "name": {"title": "Name", "type": "string"}, "full_name": {"title": "Full Name", "type": "string"}, "private": {"title": "Private", "type": "boolean"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "default_branch": {"title": "Default Branch", "type": "string"}, "updated_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Updated At"}, "already_added": {"default": false, "title": "Already Added", "type": "boolean"}}, "required": ["github_id", "name", "full_name", "private", "default_branch"], "title": "AvailableGitHubRepository", "type": "object"}, "GitHubOrganizationRead": {"description": "Schema for reading a GitHub organization.", "properties": {"id": {"title": "Id", "type": "integer"}, "github_id": {"title": "Github Id", "type": "integer"}, "name": {"title": "Name", "type": "string"}, "avatar_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Avatar Url"}, "is_admin": {"default": false, "title": "Is Admin", "type": "boolean"}}, "required": ["id", "github_id", "name"], "title": "GitHubOrganizationRead", "type": "object"}, "ApiKeyResponse": {"description": "Schema for API key creation response (includes the key once).", "properties": {"id": {"title": "Id", "type": "integer"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name"}, "key": {"title": "Key", "type": "string"}, "organization_id": {"title": "Organization Id", "type": "integer"}, "permissions": {"additionalProperties": {"type": "boolean"}, "title": "Permissions", "type": "object"}}, "required": ["id", "key", "organization_id", "permissions"], "title": "ApiKeyResponse", "type": "object"}, "ApiKeyCreate": {"description": "Schema for creating an organization API key.", "properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name"}, "organization_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Organization Id"}, "permissions": {"anyOf": [{"additionalProperties": {"type": "boolean"}, "type": "object"}, {"type": "null"}], "default": {"file_mappings": true}, "title": "Permissions"}}, "title": "ApiKeyCreate", "type": "object"}, "ApiKeyRead": {"description": "Schema for reading an organization API key.", "properties": {"id": {"title": "Id", "type": "integer"}, "name": {"title": "Name", "type": "string"}, "organization_id": {"title": "Organization Id", "type": "integer"}, "created_by": {"title": "Created By", "type": "string"}, "last_used_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last Used At"}, "is_active": {"title": "Is Active", "type": "boolean"}, "permissions": {"additionalProperties": {"type": "boolean"}, "title": "Permissions", "type": "object"}, "created_at": {"title": "Created At", "type": "string"}, "key": {"title": "Key", "type": "string"}}, "required": ["id", "name", "organization_id", "created_by", "is_active", "permissions", "created_at", "key"], "title": "ApiKeyRead", "type": "object"}, "GitHubWebhookResponse": {"description": "GitHub webhook acknowledgement.", "properties": {"status": {"title": "Status", "type": "string"}, "message": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Message"}, "action": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Action"}, "org": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Org"}, "count": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Count"}, "delivery_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Delivery Id"}}, "required": ["status"], "title": "GitHubWebhookResponse", "type": "object"}, "PublishToProductionResponse": {"description": "Schema for publish to production response.", "properties": {"success": {"title": "Success", "type": "boolean"}, "message": {"title": "Message", "type": "string"}, "pr_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Pr Url"}, "pr_number": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Pr Number"}, "merged": {"default": false, "title": "Merged", "type": "boolean"}}, "required": ["success", "message"], "title": "PublishToProductionResponse", "type": "object"}, "PublishToProductionRequest": {"description": "Schema for publishing changes to production.\n\nIf changes are provided, they will be committed to the branch before publishing.", "properties": {"owner": {"description": "Repository owner", "title": "Owner", "type": "string"}, "repo": {"description": "Repository name", "title": "Repo", "type": "string"}, "branch": {"description": "Current working branch to publish from", "title": "Branch", "type": "string"}, "changes": {"anyOf": [{"items": {}, "type": "array"}, {"type": "null"}], "description": "Visual editor changes to commit before publishing", "title": "Changes"}, "github_repo_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Full repository name (owner/repo) for changes", "title": "Github Repo Name"}, "github_base_branch_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Base branch name for the changes", "title": "Github Base Branch Name"}}, "required": ["owner", "repo", "branch"], "title": "PublishToProductionRequest", "type": "object"}, "StartCodexSessionResponse": {"description": "Response schema for starting a Codex session.", "properties": {"session_id": {"title": "Session Id", "type": "string"}, "branch": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Branch"}}, "required": ["session_id", "branch"], "title": "StartCodexSessionResponse", "type": "object"}, "StartCodexSessionRequest": {"description": "Request schema for starting a Codex session.", "properties": {"github_repo_name": {"description": "owner/name", "title": "Github Repo Name", "type": "string"}, "instruction": {"title": "Instruction", "type": "string"}, "base_branch": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Base Branch"}, "allowed_paths": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Allowed Paths"}, "system_prompt": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "System Prompt"}, "encoded_location": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Encoded path with optional :start-end, e.g. '<encodedPath>:12-34'", "title": "Encoded Location"}, "file_path": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "File Path"}, "start_line": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Start Line"}, "end_line": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "End Line"}}, "required": ["github_repo_name", "instruction"], "title": "StartCodexSessionRequest", "type": "object"}, "ProvisionWorkspaceResponse": {"description": "Response indicating workspace provisioning status.", "properties": {"ready": {"title": "Ready", "type": "boolean"}, "status": {"default": "ready", "title": "Status", "type": "string"}, "retry_after_ms": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Retry After Ms"}, "last_error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last Error"}}, "required": ["ready"], "title": "ProvisionWorkspaceResponse", "type": "object"}, "ProvisionWorkspaceRequest": {"description": "Request to pre-provision workspace infrastructure for an organization.", "properties": {"organization_id": {"title": "Organization Id", "type": "string"}, "agent_runner_lean_enabled": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "description": "Optional trusted-client runner profile override for pre-provisioning.", "title": "Agent Runner Lean Enabled"}}, "required": ["organization_id"], "title": "ProvisionWorkspaceRequest", "type": "object"}, "StartAgentSessionResponse": {"description": "Response schema for starting an agent session.", "properties": {"session_id": {"title": "Session Id", "type": "string"}, "event_transport": {"default": "websocket", "description": "Transport the client should open for this session's events: 'sse' (GET stream + REST actions) for lean sessions that opted in, else 'websocket'.", "enum": ["sse", "websocket"], "title": "Event Transport", "type": "string"}}, "required": ["session_id"], "title": "StartAgentSessionResponse", "type": "object"}, "OrgRedisProvisioningPendingResponse": {"description": "409 response when org Redis provisioning is still in progress.", "properties": {"detail": {"title": "Detail", "type": "string"}, "status": {"title": "Status", "type": "string"}, "retry_after_ms": {"title": "Retry After Ms", "type": "integer"}, "last_error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last Error"}}, "required": ["detail", "status", "retry_after_ms"], "title": "OrgRedisProvisioningPendingResponse", "type": "object"}, "ConversationMessage": {"description": "A single message in a conversation.", "properties": {"role": {"description": "user or assistant", "enum": ["user", "assistant"], "title": "Role", "type": "string"}, "content": {"title": "Content", "type": "string"}}, "required": ["role", "content"], "title": "ConversationMessage", "type": "object"}, "StartAgentSessionRequest": {"description": "Request schema for starting an agent session.\n\nSessions can be started with or without a repo:\n- With repo: Provide github_repo_name, instruction comes via message queue\n- Without repo: Just provide organization_id for permissions, instruction via queue", "properties": {"github_repo_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "owner/name if github_mode true", "title": "Github Repo Name"}, "instruction": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Instruction"}, "client_message_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Client-generated optimistic message id for initial-turn correlation.", "title": "Client Message Id"}, "base_branch": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Base Branch"}, "branch": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Branch"}, "encoded_location": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Encoded Location"}, "file_path": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "File Path"}, "start_line": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Start Line"}, "end_line": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "End Line"}, "url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Url"}, "targets": {"anyOf": [{"items": {"$ref": "#/components/schemas/TargetSpan"}, "type": "array"}, {"type": "null"}], "title": "Targets"}, "original_html": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Original Html"}, "github_mode": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": true, "title": "Github Mode"}, "files": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"type": "null"}], "title": "Files"}, "allowed_tools": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Allowed Tools"}, "permission_mode": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Permission Mode"}, "attachments": {"anyOf": [{"items": {"$ref": "#/components/schemas/StartClaudeAttachment"}, "type": "array"}, {"type": "null"}], "title": "Attachments"}, "images": {"anyOf": [{"items": {"$ref": "#/components/schemas/StartClaudeAttachment"}, "type": "array"}, {"type": "null"}], "title": "Images"}, "streaming": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Streaming"}, "open_pr_on_commit": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Open Pr On Commit"}, "push_to_main": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "description": "Opt into direct commits on the repo default branch. Intended for autonomous build flows; PR creation is disabled when true. When omitted (None) on a resume, the prior session's mode is inherited from its persisted metadata \u2014 clients resuming an autonomous build session don't need to re-send the flag to keep it active.", "title": "Push To Main"}, "pr_on_finish": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "description": "When true, PR creation for this project session is disabled until the user explicitly arms finish mode.", "title": "Pr On Finish"}, "resume_from_session_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Persisted session identifier if the client is resuming context", "title": "Resume From Session Id"}, "organization_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Organization ID (UUID) for multi-repo workspace", "title": "Organization Id"}, "figma_node_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Figma Node Url"}, "prior_messages": {"anyOf": [{"items": {"$ref": "#/components/schemas/ConversationMessage"}, "type": "array"}, {"type": "null"}], "description": "Optional prior conversation history to provide as context", "title": "Prior Messages"}, "debug_force_context_overflow": {"anyOf": [{"type": "integer"}, {"type": "null"}], "description": "DEBUG/verification ONLY (ignored in production): synthesize a context-window overflow at the start of the first N Codex turns to exercise the recovery path on a live model that would otherwise auto-compact before overflowing.", "title": "Debug Force Context Overflow"}, "additional_context": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "description": "Additional context (e.g., browserWidth, browserHeight for viewport)", "title": "Additional Context"}, "agent_runner_lean_enabled": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "description": "Per-session opt-in for the experimental lean ECS runner profile. When false, this session explicitly uses the standard runner.", "title": "Agent Runner Lean Enabled"}, "runtime_target": {"anyOf": [{"enum": ["cloud", "local_device"], "type": "string"}, {"type": "null"}], "description": "Where the agent worker runs. 'local_device' dispatches to the user's own machine via the Terminal app; omitted/'cloud' uses the server default runtime.", "title": "Runtime Target"}, "device_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Target AgentDevice.device_id (required when runtime_target='local_device')", "title": "Device Id"}, "local_repo_path": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Absolute path of the existing checkout on the target device", "title": "Local Repo Path"}, "mcp_authority_mode": {"anyOf": [{"enum": ["auto", "personal", "team", "team_then_personal"], "type": "string"}, {"type": "null"}], "description": "MCP credential authority mode for this session: auto/user-first, personal only, team only, or team_then_personal.", "title": "Mcp Authority Mode"}, "claude_model": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Model override (e.g., claude-sonnet-5 for web extension chat)", "title": "Claude Model"}, "openai_model": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "OpenAI model override (e.g., gpt-5.5 for Codex sessions)", "title": "Openai Model"}, "agent_type": {"anyOf": [{"enum": ["claude", "codex"], "type": "string"}, {"type": "null"}], "default": "claude", "description": "Agent type: 'claude' or 'codex'", "title": "Agent Type"}, "effort": {"anyOf": [{"enum": ["minimal", "low", "medium", "high", "xhigh", "max"], "type": "string"}, {"type": "null"}], "description": "Effort level. Claude supports 'low', 'medium', 'high', and 'max'; 'xhigh' is Opus 4.8 and 4.7 only. OpenAI Codex models support 'low', 'medium', 'high', and 'xhigh'.", "title": "Effort"}, "codex_app_server_transport_enabled": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "description": "Use the Codex app-server streaming transport for this Codex session.", "title": "Codex App Server Transport Enabled"}, "client_source": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Client identifier (e.g., 'extension', 'web') \u2014 backend resolves model", "title": "Client Source"}, "timezone": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "IANA timezone (e.g., 'America/New_York') for timezone-aware date context", "title": "Timezone"}, "mentions": {"anyOf": [{"items": {"additionalProperties": true, "type": "object"}, "type": "array"}, {"type": "null"}], "description": "@mentioned users with identity data from the extension", "title": "Mentions"}, "automation_mentions": {"anyOf": [{"items": {"additionalProperties": true, "type": "object"}, "type": "array"}, {"type": "null"}], "description": "@mentioned automations by ID from the chat input", "title": "Automation Mentions"}, "page_mentions": {"anyOf": [{"items": {"additionalProperties": true, "type": "object"}, "type": "array"}, {"type": "null"}], "description": "@mentioned org pages by ID from the chat input", "title": "Page Mentions"}, "chat_mentions": {"anyOf": [{"items": {"additionalProperties": true, "type": "object"}, "type": "array"}, {"type": "null"}], "description": "@mentioned other agent chat sessions by session_id from the chat input", "title": "Chat Mentions"}, "participant_user_ids": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "description": "Optional user IDs to add as participants when creating the session", "title": "Participant User Ids"}, "adhoc_mcp_servers": {"anyOf": [{"items": {"additionalProperties": true, "type": "object"}, "type": "array"}, {"type": "null"}], "description": "Additional MCP servers to attach to this session (e.g., terminal MCP via tunnel)", "title": "Adhoc Mcp Servers"}, "org_page_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "OrgPage UUID to link this session to an existing page", "title": "Org Page Id"}, "agent_teammate_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "AgentTeammate UUID for a direct agent teammate chat", "title": "Agent Teammate Id"}, "agent_configurator_draft_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "AgentTeammateDraft UUID for the conversational configurator flow at /agents/new. When set, the agent-runner loads the configurator system prompt and exposes the configurator tool group.", "title": "Agent Configurator Draft Id"}}, "title": "StartAgentSessionRequest", "type": "object"}, "StartClaudeAttachment": {"description": "Attachment data for Claude session requests (images, PDFs, text files).", "properties": {"filename": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Original filename", "title": "Filename"}, "mime": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "image/png", "title": "Mime"}, "data_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "data:[mime];base64,...", "title": "Data Url"}, "url": {"anyOf": [{"format": "uri", "maxLength": 2083, "minLength": 1, "type": "string"}, {"type": "null"}], "description": "(optional) external URL", "title": "Url"}}, "title": "StartClaudeAttachment", "type": "object"}, "TargetSpan": {"description": "Target file span for code operations.", "properties": {"file": {"title": "File", "type": "string"}, "start": {"title": "Start", "type": "integer"}, "end": {"title": "End", "type": "integer"}}, "required": ["file", "start", "end"], "title": "TargetSpan", "type": "object"}, "WsTokenResponse": {"description": "Short-lived, single-use token for WebSocket authentication.", "properties": {"token": {"title": "Token", "type": "string"}}, "required": ["token"], "title": "WsTokenResponse", "type": "object"}, "ActiveSubAgentSchema": {"description": "Minimal descriptor for one currently-running sub-agent.\n\nTrimmed subset of ``AgentSubAgentRunSchema`` \u2014 the sidebar only needs\nidentity + status to render live pseudo-rows nested under the parent\nsession row. The same shape rides the ``session_status`` push event.", "properties": {"parent_tool_use_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Parent Tool Use Id"}, "subagent_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Subagent Type"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "status": {"title": "Status", "type": "string"}}, "required": ["status"], "title": "ActiveSubAgentSchema", "type": "object"}, "AgentChatLineageSummary": {"description": "Compact parent-session pointer for forked chat rows.", "properties": {"session_id": {"title": "Session Id", "type": "string"}, "title": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Title"}, "status": {"title": "Status", "type": "string"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "last_message_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Last Message At"}}, "required": ["session_id", "status", "created_at"], "title": "AgentChatLineageSummary", "type": "object"}, "AgentChatListResponse": {"description": "Response containing a list of agent chat sessions.", "properties": {"sessions": {"items": {"$ref": "#/components/schemas/AgentChatSummary"}, "title": "Sessions", "type": "array"}}, "required": ["sessions"], "title": "AgentChatListResponse", "type": "object"}, "AgentChatPullRequestStatus": {"description": "Pull request state associated with a session branch.", "properties": {"url": {"title": "Url", "type": "string"}, "state": {"enum": ["open", "merged", "closed", "unknown"], "title": "State", "type": "string"}, "branch": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Branch"}}, "required": ["url", "state"], "title": "AgentChatPullRequestStatus", "type": "object"}, "AgentChatSummary": {"description": "Summary of an agent chat session.", "properties": {"session_id": {"title": "Session Id", "type": "string"}, "title": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Title"}, "status": {"title": "Status", "type": "string"}, "github_mode": {"title": "Github Mode", "type": "boolean"}, "base_branch": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Base Branch"}, "working_branch": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Working Branch"}, "repository": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Repository"}, "agent_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Agent Type"}, "model": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Model"}, "source": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Source"}, "domain": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Domain"}, "ecs_task_arns": {"default": [], "items": {"additionalProperties": true, "type": "object"}, "title": "Ecs Task Arns", "type": "array"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}, "last_message_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Last Message At"}, "metadata": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Metadata"}, "participant_count": {"default": 0, "title": "Participant Count", "type": "integer"}, "is_turn_active": {"default": false, "title": "Is Turn Active", "type": "boolean"}, "kind": {"default": "ready", "enum": ["running", "needs_response", "ready", "finished", "failed", "cancelled"], "title": "Kind", "type": "string"}, "pull_request": {"anyOf": [{"$ref": "#/components/schemas/AgentChatPullRequestStatus"}, {"type": "null"}]}, "parent_session": {"anyOf": [{"$ref": "#/components/schemas/AgentChatLineageSummary"}, {"type": "null"}]}, "forked_chat_count": {"default": 0, "title": "Forked Chat Count", "type": "integer"}, "is_sub_chat": {"default": false, "title": "Is Sub Chat", "type": "boolean"}, "active_subagents": {"default": [], "items": {"$ref": "#/components/schemas/ActiveSubAgentSchema"}, "title": "Active Subagents", "type": "array"}, "runtime_target": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Runtime Target"}}, "required": ["session_id", "status", "github_mode", "created_at", "updated_at"], "title": "AgentChatSummary", "type": "object"}, "AgentChatDetailResponse": {"description": "Response containing session details and messages.", "properties": {"session": {"$ref": "#/components/schemas/AgentChatSummary"}, "device": {"anyOf": [{"$ref": "#/components/schemas/AgentChatDeviceInfo"}, {"type": "null"}]}, "runtime": {"allOf": [{"$ref": "#/components/schemas/AgentChatRuntimeState"}]}, "messages": {"items": {"$ref": "#/components/schemas/AgentChatMessageSchema"}, "title": "Messages", "type": "array"}, "runs": {"default": [], "items": {"$ref": "#/components/schemas/AgentSessionRunSchema"}, "title": "Runs", "type": "array"}, "subagent_runs": {"default": [], "items": {"$ref": "#/components/schemas/AgentSubAgentRunSchema"}, "title": "Subagent Runs", "type": "array"}, "participants": {"default": [], "items": {"$ref": "#/components/schemas/SessionParticipantSchema"}, "title": "Participants", "type": "array"}, "has_more": {"default": false, "title": "Has More", "type": "boolean"}, "is_owner": {"default": false, "title": "Is Owner", "type": "boolean"}, "role": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Role"}, "last_event_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last Event Id"}}, "required": ["session", "messages"], "title": "AgentChatDetailResponse", "type": "object"}, "AgentChatDeviceInfo": {"description": "Target device of a local-device session (chat-detail header chip).", "properties": {"device_id": {"title": "Device Id", "type": "string"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name"}, "online": {"default": false, "title": "Online", "type": "boolean"}}, "required": ["device_id"], "title": "AgentChatDeviceInfo", "type": "object"}, "AgentChatMessageSchema": {"description": "Schema for an agent chat message.", "properties": {"id": {"title": "Id", "type": "integer"}, "role": {"title": "Role", "type": "string"}, "message_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Message Type"}, "raw_content": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Raw Content"}, "display_content": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Display Content"}, "metadata": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Metadata"}, "is_ephemeral": {"default": false, "title": "Is Ephemeral", "type": "boolean"}, "stream_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Stream Id"}, "redis_event_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Redis Event Id"}, "parent_tool_use_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Parent Tool Use Id"}, "sender_user_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Sender User Id"}, "sender_display_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Sender Display Name"}, "sender_avatar_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Sender Avatar Url"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}}, "required": ["id", "role", "created_at"], "title": "AgentChatMessageSchema", "type": "object"}, "AgentChatRuntimeState": {"description": "Live runtime state for reconnect UI behavior.", "properties": {"is_turn_active": {"default": false, "title": "Is Turn Active", "type": "boolean"}, "can_stop_current_turn": {"default": false, "title": "Can Stop Current Turn", "type": "boolean"}}, "title": "AgentChatRuntimeState", "type": "object"}, "AgentSessionRunSchema": {"description": "Timing metrics for a single worker lifecycle within a session.", "properties": {"id": {"title": "Id", "type": "integer"}, "ecs_task_arn": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Ecs Task Arn"}, "status": {"title": "Status", "type": "string"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "ecs_task_started_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Ecs Task Started At"}, "first_message_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "First Message At"}, "completed_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Completed At"}, "ecs_task_stopped_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Ecs Task Stopped At"}, "ecs_stop_code": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Ecs Stop Code"}, "ecs_stopped_reason": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Ecs Stopped Reason"}, "ecs_log_stream_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Ecs Log Stream Name"}, "boot_time_ms": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Boot Time Ms"}, "latency_breakdown": {"additionalProperties": true, "title": "Latency Breakdown", "type": "object"}}, "required": ["id", "status", "created_at"], "title": "AgentSessionRunSchema", "type": "object"}, "AgentSubAgentRunSchema": {"description": "One sub-agent invocation made via the SDK's `Agent` tool.\n\nMirrors ``AgentSubAgentRun``. Returned with the chat detail payload\nso the frontend can render sub-agent status under the parent's\n``Agent`` tool_use bubble without having to reconstruct state from\na stream of events on every page load.", "properties": {"id": {"title": "Id", "type": "integer"}, "task_id": {"title": "Task Id", "type": "string"}, "parent_tool_use_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Parent Tool Use Id"}, "subagent_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Subagent Type"}, "workflow_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Workflow Name"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "status": {"title": "Status", "type": "string"}, "started_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Started At"}, "completed_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Completed At"}, "tool_use_count": {"default": 0, "title": "Tool Use Count", "type": "integer"}, "total_tokens": {"default": 0, "title": "Total Tokens", "type": "integer"}, "duration_ms": {"default": 0, "title": "Duration Ms", "type": "integer"}, "last_tool_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last Tool Name"}, "summary": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Summary"}, "error_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error Type"}, "error_message": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error Message"}}, "required": ["id", "task_id", "status"], "title": "AgentSubAgentRunSchema", "type": "object"}, "SessionParticipantSchema": {"description": "Schema for a session participant.", "properties": {"id": {"title": "Id", "type": "string"}, "user_id": {"title": "User Id", "type": "string"}, "email": {"title": "Email", "type": "string"}, "github_username": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Github Username"}, "avatar_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Avatar Url"}, "role": {"title": "Role", "type": "string"}, "added_by_user_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Added By User Id"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}}, "required": ["id", "user_id", "email", "role", "created_at"], "title": "SessionParticipantSchema", "type": "object"}, "RenameChatRequest": {"description": "Request to rename a chat session's title.", "properties": {"title": {"maxLength": 255, "minLength": 1, "title": "Title", "type": "string"}}, "required": ["title"], "title": "RenameChatRequest", "type": "object"}, "SubAgentMessagesResponse": {"description": "Paginated transcript of messages attributed to one subagent run.", "properties": {"messages": {"items": {"$ref": "#/components/schemas/AgentChatMessageSchema"}, "title": "Messages", "type": "array"}, "has_more": {"default": false, "title": "Has More", "type": "boolean"}, "transcript_fence_event_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Transcript Fence Event Id"}, "persisted_through_event_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Persisted Through Event Id"}, "persistence_caught_up": {"default": true, "title": "Persistence Caught Up", "type": "boolean"}}, "required": ["messages"], "title": "SubAgentMessagesResponse", "type": "object"}, "ResolveWorkingBranchResponse": {"description": "Response for resolving working branch.", "properties": {"working_branch": {"title": "Working Branch", "type": "string"}, "is_new_branch": {"title": "Is New Branch", "type": "boolean"}, "pr_was_merged": {"title": "Pr Was Merged", "type": "boolean"}, "pr_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Pr Url"}, "branch_exists": {"title": "Branch Exists", "type": "boolean"}}, "required": ["working_branch", "is_new_branch", "pr_was_merged", "branch_exists"], "title": "ResolveWorkingBranchResponse", "type": "object"}, "FinalizeAgentSessionResponse": {"description": "Agent finalize response.", "properties": {"success": {"default": true, "title": "Success", "type": "boolean"}, "message": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Message"}, "branch": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Branch"}, "pr_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Pr Url"}, "num_files": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Num Files"}}, "title": "FinalizeAgentSessionResponse", "type": "object"}, "SessionActionResponse": {"properties": {"ok": {"title": "Ok", "type": "boolean"}}, "required": ["ok"], "title": "SessionActionResponse", "type": "object"}, "DatabaseConnectionRequest": {"properties": {"request_id": {"title": "Request Id", "type": "string"}, "name": {"title": "Name", "type": "string"}, "db_type": {"default": "postgres", "title": "Db Type", "type": "string"}, "connection_string": {"title": "Connection String", "type": "string"}}, "required": ["request_id", "name", "connection_string"], "title": "DatabaseConnectionRequest", "type": "object"}, "UncommittedChangesResponse": {"description": "Response for checking uncommitted changes.", "properties": {"has_uncommitted_changes": {"title": "Has Uncommitted Changes", "type": "boolean"}}, "required": ["has_uncommitted_changes"], "title": "UncommittedChangesResponse", "type": "object"}, "AgentChatStatusSummary": {"description": "User-facing lifecycle summary for a chat session.", "properties": {"kind": {"enum": ["running", "needs_response", "ready", "finished", "failed", "cancelled"], "title": "Kind", "type": "string"}, "label": {"title": "Label", "type": "string"}, "status": {"title": "Status", "type": "string"}, "is_turn_active": {"default": false, "title": "Is Turn Active", "type": "boolean"}, "waiting_for_input": {"default": false, "title": "Waiting For Input", "type": "boolean"}, "needs_user_response": {"default": false, "title": "Needs User Response", "type": "boolean"}, "latest_user_question": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Latest User Question"}, "has_uncommitted_changes": {"default": false, "title": "Has Uncommitted Changes", "type": "boolean"}, "pull_request": {"anyOf": [{"$ref": "#/components/schemas/AgentChatPullRequestStatus"}, {"type": "null"}]}}, "required": ["kind", "label", "status"], "title": "AgentChatStatusSummary", "type": "object"}, "DisplayStatusResponse": {"description": "Response schema for the session's live-browser display status.", "properties": {"ready": {"title": "Ready", "type": "boolean"}}, "required": ["ready"], "title": "DisplayStatusResponse", "type": "object"}, "FinishModeResponse": {"properties": {"armed": {"title": "Armed", "type": "boolean"}, "state": {"enum": ["idle", "armed", "running", "waiting_for_input", "completed", "failed", "cancelled"], "title": "State", "type": "string"}, "generation": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Generation"}, "error_code": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error Code"}, "error_message": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error Message"}, "pr_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Pr Url"}, "updated_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Updated At"}}, "required": ["armed", "state"], "title": "FinishModeResponse", "type": "object"}, "FinishModeRequest": {"properties": {"armed": {"title": "Armed", "type": "boolean"}, "generation": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Generation"}}, "required": ["armed"], "title": "FinishModeRequest", "type": "object"}, "CloudTakeoverRequest": {"description": "Body for POST /agents/chats/{session_id}/cloud-takeover.", "properties": {"force": {"default": false, "description": "Take over even while the device is online (fences its runner).", "title": "Force", "type": "boolean"}}, "title": "CloudTakeoverRequest", "type": "object"}, "DevServerVisualEditTokenResponse": {"description": "Short-lived capability the dashboard hands to the in-page editor runtime.", "properties": {"token": {"title": "Token", "type": "string"}}, "required": ["token"], "title": "DevServerVisualEditTokenResponse", "type": "object"}, "DevServerVisualEditResponse": {"properties": {"success": {"title": "Success", "type": "boolean"}, "updated_files": {"items": {"type": "string"}, "title": "Updated Files", "type": "array"}}, "required": ["success", "updated_files"], "title": "DevServerVisualEditResponse", "type": "object"}, "Change": {"description": "Schema for a change operation with targets and modifications.", "properties": {"targets": {"items": {"$ref": "#/components/schemas/SourceTarget"}, "title": "Targets", "type": "array"}, "encoded_location": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Encoded Location"}, "style_changes": {"items": {"$ref": "#/components/schemas/StyleChange"}, "title": "Style Changes", "type": "array"}, "text_changes": {"items": {"$ref": "#/components/schemas/TextChange"}, "title": "Text Changes", "type": "array"}, "move_changes": {"items": {"$ref": "#/components/schemas/MoveChange"}, "title": "Move Changes", "type": "array"}, "image_data": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Image Data"}, "filename": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Filename"}, "browser_width": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Browser Width"}, "browser_height": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Browser Height"}}, "title": "Change", "type": "object"}, "DevServerVisualEditRequest": {"description": "Targets-based visual changes from the in-page dev-server editor runtime.", "properties": {"changes": {"items": {"$ref": "#/components/schemas/Change"}, "title": "Changes", "type": "array"}}, "required": ["changes"], "title": "DevServerVisualEditRequest", "type": "object"}, "MoveChange": {"description": "Schema for element move/drag & drop operations.", "properties": {"source_location": {"description": "Encoded location of element being moved", "title": "Source Location", "type": "string"}, "target_location": {"description": "Encoded location of drop target", "title": "Target Location", "type": "string"}, "position": {"enum": ["before", "after", "inside", "left", "right"], "title": "Position", "type": "string"}, "source_tag": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Source Tag"}, "target_tag": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Target Tag"}}, "required": ["source_location", "target_location", "position"], "title": "MoveChange", "type": "object"}, "SourceTarget": {"description": "Schema for source code target location.", "properties": {"file": {"title": "File", "type": "string"}, "start": {"title": "Start", "type": "integer"}, "end": {"title": "End", "type": "integer"}}, "required": ["file", "start", "end"], "title": "SourceTarget", "type": "object"}, "StyleChange": {"description": "Schema for style changes.", "properties": {"property": {"title": "Property", "type": "string"}, "old_value": {"title": "Old Value", "type": "string"}, "new_value": {"title": "New Value", "type": "string"}, "is_hover_state": {"default": false, "title": "Is Hover State", "type": "boolean"}, "target": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Target"}, "html_tag": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Html Tag"}}, "required": ["property", "old_value", "new_value"], "title": "StyleChange", "type": "object"}, "TextChange": {"description": "Schema for text changes.", "properties": {"old_text": {"title": "Old Text", "type": "string"}, "new_text": {"title": "New Text", "type": "string"}}, "required": ["old_text", "new_text"], "title": "TextChange", "type": "object"}, "DevServerStatusResponse": {"description": "Live dev server state for a session.\n\n``status`` is one of none | starting | ready | suspended | failed (plus\nbuild/history states on dashboard routes); ``preview_url`` carries a freshly\nsigned token and is only set while starting/ready.", "properties": {"status": {"title": "Status", "type": "string"}, "phase": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Phase"}, "preview_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Preview Url"}, "framework": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Framework"}, "error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error"}, "branch": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Branch"}, "backend_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Backend Url"}, "updated_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Updated At"}, "can_edit": {"default": false, "title": "Can Edit", "type": "boolean"}, "editor_session_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Editor Session Id"}, "agent_session_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Agent Session Id"}}, "required": ["status"], "title": "DevServerStatusResponse", "type": "object"}, "DevServerStartRequest": {"description": "Request body for starting a session's live dev server from the dashboard.", "properties": {"backend_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Remote (staging) backend for the frontend's API calls. Omit/null to use the repo's saved staging backend URL; pass an empty string to run the frontend standalone.", "title": "Backend Url"}, "dev_command": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Override the dev command (auto-detected when omitted).", "title": "Dev Command"}, "working_dir": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Repo-relative frontend subdirectory (for monorepos).", "title": "Working Dir"}, "branch": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Branch to check out (defaults to the session/repo branch).", "title": "Branch"}}, "title": "DevServerStartRequest", "type": "object"}, "RepoFrontendEntry": {"description": "A runnable frontend (from the committed recipe) the dashboard can start.\n\nIdentified by ``working_dir`` (the recipe's unique key; \"\" = repo root).", "properties": {"label": {"title": "Label", "type": "string"}, "working_dir": {"title": "Working Dir", "type": "string"}, "dev_command": {"title": "Dev Command", "type": "string"}, "framework": {"title": "Framework", "type": "string"}, "package_manager": {"title": "Package Manager", "type": "string"}, "default_dev_port": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Default Dev Port"}}, "required": ["label", "working_dir", "dev_command", "framework", "package_manager"], "title": "RepoFrontendEntry", "type": "object"}, "RepoFrontendsResponse": {"description": "A repository's enabled, discovered frontends for the Dev page selector.", "properties": {"frontends": {"items": {"$ref": "#/components/schemas/RepoFrontendEntry"}, "title": "Frontends", "type": "array"}}, "required": ["frontends"], "title": "RepoFrontendsResponse", "type": "object"}, "RepoBranchEntry": {"description": "A single git branch on a repository.", "properties": {"name": {"title": "Name", "type": "string"}}, "required": ["name"], "title": "RepoBranchEntry", "type": "object"}, "RepoBranchesResponse": {"description": "A repository's git branches plus its default branch for default selection.", "properties": {"branches": {"items": {"$ref": "#/components/schemas/RepoBranchEntry"}, "title": "Branches", "type": "array"}, "default_branch": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Default Branch"}}, "required": ["branches"], "title": "RepoBranchesResponse", "type": "object"}, "MicrovmPromotionQaBarrierResponse": {"properties": {"active_content_key": {"title": "Active Content Key", "type": "string"}, "pending_candidate_content_key": {"title": "Pending Candidate Content Key", "type": "string"}, "candidate_content_key": {"title": "Candidate Content Key", "type": "string"}, "armed": {"title": "Armed", "type": "boolean"}, "expires_at": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Expires At"}, "remaining_ttl_seconds": {"title": "Remaining Ttl Seconds", "type": "integer"}}, "required": ["active_content_key", "pending_candidate_content_key", "candidate_content_key", "armed", "expires_at", "remaining_ttl_seconds"], "title": "MicrovmPromotionQaBarrierResponse", "type": "object"}, "MicrovmPromotionQaBarrierRequest": {"properties": {"organization_id": {"title": "Organization Id", "type": "string"}, "frontend_label": {"title": "Frontend Label", "type": "string"}, "candidate_content_key": {"title": "Candidate Content Key", "type": "string"}}, "required": ["organization_id", "frontend_label", "candidate_content_key"], "title": "MicrovmPromotionQaBarrierRequest", "type": "object"}, "MicrovmLaunchQaFixtureResponse": {"properties": {"session_id": {"title": "Session Id", "type": "string"}, "branch": {"title": "Branch", "type": "string"}, "mode": {"title": "Mode", "type": "string"}, "status": {"title": "Status", "type": "string"}}, "required": ["session_id", "branch", "mode", "status"], "title": "MicrovmLaunchQaFixtureResponse", "type": "object"}, "MicrovmLaunchQaFixtureRequest": {"properties": {"organization_id": {"title": "Organization Id", "type": "string"}, "working_dir": {"default": "", "title": "Working Dir", "type": "string"}, "mode": {"title": "Mode", "type": "string"}}, "required": ["organization_id", "mode"], "title": "MicrovmLaunchQaFixtureRequest", "type": "object"}, "MicrovmLaunchQaFixtureEvidenceResponse": {"properties": {"evidence": {"additionalProperties": true, "title": "Evidence", "type": "object"}}, "required": ["evidence"], "title": "MicrovmLaunchQaFixtureEvidenceResponse", "type": "object"}, "DevServerEnvVarItem": {"description": "One resolved dev-server env var as returned to the dashboard.\n\nSECRET values are NEVER returned \u2014 only ``is_set`` reflects whether a secret\nis stored. PUBLIC values are returned inline (they are browser-bundle-safe).", "properties": {"key": {"title": "Key", "type": "string"}, "visibility": {"title": "Visibility", "type": "string"}, "working_dir": {"title": "Working Dir", "type": "string"}, "branch": {"title": "Branch", "type": "string"}, "value": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Value"}, "is_set": {"title": "Is Set", "type": "boolean"}}, "required": ["key", "visibility", "working_dir", "branch", "is_set"], "title": "DevServerEnvVarItem", "type": "object"}, "DevServerEnvVarsResponse": {"description": "A repo's dev-server env vars (optionally scoped to one ``working_dir``).", "properties": {"vars": {"items": {"$ref": "#/components/schemas/DevServerEnvVarItem"}, "title": "Vars", "type": "array"}}, "required": ["vars"], "title": "DevServerEnvVarsResponse", "type": "object"}, "DevServerEnvVarInput": {"description": "One env var to upsert. ``visibility`` defaults to public; secret writes\nare rejected for now (secret storage/delivery is a later, gated phase).", "properties": {"key": {"title": "Key", "type": "string"}, "value": {"default": "", "title": "Value", "type": "string"}, "visibility": {"default": "public", "title": "Visibility", "type": "string"}}, "required": ["key"], "title": "DevServerEnvVarInput", "type": "object"}, "SetDevServerEnvVarsRequest": {"description": "Upsert a batch of env vars for one frontend scope.\n\n``working_dir`` \"\" is the repo-wide default applied to every frontend; a\nnon-empty value targets that recipe frontend's overrides. ``branch`` \"\" is\nthe default applied to every branch; a non-empty branch overrides the\nall-branch default for that branch. Each var's value is validated\nserver-side (blocking) \u2014 a secret-shaped value is refused so a real\ncredential can never be stored as a public var and injected into the VM.", "properties": {"organization_id": {"title": "Organization Id", "type": "string"}, "working_dir": {"default": "", "title": "Working Dir", "type": "string"}, "branch": {"default": "", "title": "Branch", "type": "string"}, "vars": {"items": {"$ref": "#/components/schemas/DevServerEnvVarInput"}, "title": "Vars", "type": "array"}, "replace_branch_overrides": {"default": false, "title": "Replace Branch Overrides", "type": "boolean"}}, "required": ["organization_id", "vars"], "title": "SetDevServerEnvVarsRequest", "type": "object"}, "StandaloneDevServerStatusResponse": {"description": "Standalone dev-server status: the live-dev-server status fields plus the\nopaque session id the dashboard polls and the frontend / provenance behind\nit. A standalone start has no AgentChatSession, so the server is tracked by\n``session_id`` rather than a chat session id.", "properties": {"status": {"title": "Status", "type": "string"}, "phase": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Phase"}, "preview_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Preview Url"}, "framework": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Framework"}, "error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error"}, "branch": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Branch"}, "backend_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Backend Url"}, "updated_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Updated At"}, "can_edit": {"default": false, "title": "Can Edit", "type": "boolean"}, "editor_session_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Editor Session Id"}, "agent_session_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Agent Session Id"}, "session_id": {"title": "Session Id", "type": "string"}, "started_via": {"default": "standalone", "title": "Started Via", "type": "string"}, "frontend_label": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Frontend Label"}}, "required": ["status", "session_id"], "title": "StandaloneDevServerStatusResponse", "type": "object"}, "StandaloneDevServerStartRequest": {"description": "Request body for starting a dev server directly from a recipe frontend.\n\nNo AgentChatSession is involved \u2014 the dashboard picks a frontend from the\ncommitted recipe (identified by its ``working_dir``) and a branch, and the\nbackend claims a dev-server container from the recipe frontend's dev\ncommand, working dir, and system packages. ``working_dir`` may be \"\" for a\nrepo-root frontend.", "properties": {"organization_id": {"title": "Organization Id", "type": "string"}, "working_dir": {"title": "Working Dir", "type": "string"}, "branch": {"title": "Branch", "type": "string"}, "base_branch": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Base Branch"}, "backend_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Backend Url"}, "title": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Title"}}, "required": ["organization_id", "working_dir", "branch"], "title": "StandaloneDevServerStartRequest", "type": "object"}, "DevServerAgentPairingRequest": {"description": "Body for pairing an assistant chat session with a standalone dev server.\n\nPersisted server-side (Redis) so returning to the preview deep link \u2014 even\nfrom another device \u2014 re-attaches the same assistant, instead of relying on\nthe browser's localStorage which is per-device.", "properties": {"agent_session_id": {"title": "Agent Session Id", "type": "string"}}, "required": ["agent_session_id"], "title": "DevServerAgentPairingRequest", "type": "object"}, "OrgDevServerEntryWithSource": {"description": "Org dev-server list entry plus how it was started and which frontend it\nserves, so standalone (agent-less) servers are distinguishable in the list.\n\nThe merged Dev-page list also surfaces idle registrations and reinstatable\nhistory: ``status`` may be ``suspended`` for a live AWS-idle MicroVM,\n``paused`` (spun down, reconnectable), or ``terminated`` (torn down,\nreinstatable) for rows with no live registration, ``id`` is the durable\nMicrovmDevServer UUID (present whenever a durable row backs the entry), and\n``in_use`` flags a live preview a client is connected to right now.", "properties": {"status": {"title": "Status", "type": "string"}, "phase": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Phase"}, "preview_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Preview Url"}, "framework": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Framework"}, "error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error"}, "branch": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Branch"}, "backend_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Backend Url"}, "updated_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Updated At"}, "can_edit": {"default": false, "title": "Can Edit", "type": "boolean"}, "editor_session_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Editor Session Id"}, "agent_session_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Agent Session Id"}, "session_id": {"title": "Session Id", "type": "string"}, "repo_full_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Repo Full Name"}, "session_title": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Session Title"}, "started_via": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Started Via"}, "frontend_label": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Frontend Label"}, "title": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Title"}, "id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Id"}, "working_dir": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Working Dir"}, "in_use": {"default": false, "title": "In Use", "type": "boolean"}, "is_mine": {"default": false, "title": "Is Mine", "type": "boolean"}, "owner_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Owner Name"}}, "required": ["status", "session_id"], "title": "OrgDevServerEntryWithSource", "type": "object"}, "OrgDevServersResponseWithSource": {"description": "All live dev servers in an org, including agent-less standalone ones.", "properties": {"dev_servers": {"items": {"$ref": "#/components/schemas/OrgDevServerEntryWithSource"}, "title": "Dev Servers", "type": "array"}}, "required": ["dev_servers"], "title": "OrgDevServersResponseWithSource", "type": "object"}, "ArchivedDevServerEntry": {"description": "A shipped/archived project row from the durable MicroVM pointer table.", "properties": {"status": {"title": "Status", "type": "string"}, "phase": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Phase"}, "preview_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Preview Url"}, "framework": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Framework"}, "error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error"}, "branch": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Branch"}, "backend_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Backend Url"}, "updated_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Updated At"}, "can_edit": {"default": false, "title": "Can Edit", "type": "boolean"}, "editor_session_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Editor Session Id"}, "agent_session_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Agent Session Id"}, "session_id": {"title": "Session Id", "type": "string"}, "repo_full_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Repo Full Name"}, "session_title": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Session Title"}, "started_via": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Started Via"}, "frontend_label": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Frontend Label"}, "title": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Title"}, "id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Id"}, "working_dir": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Working Dir"}, "in_use": {"default": false, "title": "In Use", "type": "boolean"}, "is_mine": {"default": false, "title": "Is Mine", "type": "boolean"}, "owner_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Owner Name"}, "archived_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Archived At"}, "archive_reason": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Archive Reason"}, "archived_pr_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Archived Pr Url"}, "archived_pr_number": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Archived Pr Number"}}, "required": ["status", "session_id"], "title": "ArchivedDevServerEntry", "type": "object"}, "ArchivedDevServersResponse": {"description": "Paginated shipped/archived Dev-page projects.\n\n``total`` counts rows VISIBLE to the caller. It is exact whenever the\nscan finished inside the bounded window (``total_is_exact``); past the\nbound the endpoint reports what it saw and says so, rather than\npresenting exact-looking numbers over a truncated scan. ``has_more`` is\nthe pager signal: more visible rows exist beyond the returned page.", "properties": {"total": {"title": "Total", "type": "integer"}, "total_is_exact": {"default": true, "title": "Total Is Exact", "type": "boolean"}, "has_more": {"default": false, "title": "Has More", "type": "boolean"}, "page": {"title": "Page", "type": "integer"}, "page_size": {"title": "Page Size", "type": "integer"}, "items": {"items": {"$ref": "#/components/schemas/ArchivedDevServerEntry"}, "title": "Items", "type": "array"}}, "required": ["total", "page", "page_size", "items"], "title": "ArchivedDevServersResponse", "type": "object"}, "RenameDevServerResponse": {"description": "Result of renaming one Dev-page project.", "properties": {"ok": {"title": "Ok", "type": "boolean"}, "session_id": {"title": "Session Id", "type": "string"}, "title": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Title"}}, "required": ["ok", "session_id"], "title": "RenameDevServerResponse", "type": "object"}, "RenameDevServerRequest": {"description": "Body for renaming a Dev-page project.", "properties": {"title": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Title"}}, "title": "RenameDevServerRequest", "type": "object"}, "DevServerInstanceActionResponse": {"description": "Result of a stop / terminate / rebuild action on one dev server.", "properties": {"ok": {"title": "Ok", "type": "boolean"}, "session_id": {"title": "Session Id", "type": "string"}, "status": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Status"}, "terminated": {"default": false, "title": "Terminated", "type": "boolean"}, "stopped": {"default": false, "title": "Stopped", "type": "boolean"}, "rebuild": {"default": false, "title": "Rebuild", "type": "boolean"}, "error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error"}}, "required": ["ok", "session_id"], "title": "DevServerInstanceActionResponse", "type": "object"}, "DevServerInstanceEntry": {"description": "One live dev server for the org-scoped management surface.\n\nKeyed by ``session_id`` \u2014 the identity of the box. Its live runtime state is\nthe per-session Redis registration, but the durable ``MicrovmDevServer`` row\nunder the same ``session_id`` is what survives a teardown, which is why a\npairing stays readable while no registration exists. ``backend``\ndistinguishes MicroVM from the deprecating EC2 backend. ``branch`` /\n``repo_full_name`` / ``session_title`` name the box (standalone dashboard\nservers have no chat, so ``session_title`` is None and the UI falls back to\nrepo/branch).\n\nOWNERSHIP AND PRESENCE ARE SEPARATE FIELDS, deliberately not conflated:\n\n- ``paired_agent_session_id`` / ``paired_agent_title`` \u2014 OWNERSHIP: the\n  assistant chat that owns this preview's write route, with its display\n  title. Set even for a standalone preview whose ``session_id`` is nothing\n  like the chat's (so ``session_title`` stays None), which is what answers\n  \"which of these boxes is mine?\" for a REST or agent consumer.\n  ``pairing_suspended`` means that ownership is retained while runtime\n  routing is temporarily withdrawn (post-rebuild / owner-gone) \u2014 still that\n  chat's box, not an unpaired one.\n- ``in_use`` \u2014 PRESENCE: a client is connected to the preview right now, so\n  the UI can warn before a (forced) terminate. It says nothing about pairing.\n\nThe pairing fields are optional/defaulted, so clients predating them are\nunaffected.", "properties": {"session_id": {"title": "Session Id", "type": "string"}, "status": {"title": "Status", "type": "string"}, "backend": {"title": "Backend", "type": "string"}, "branch": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Branch"}, "repo_full_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Repo Full Name"}, "session_title": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Session Title"}, "in_use": {"default": false, "title": "In Use", "type": "boolean"}, "paired_agent_session_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Paired Agent Session Id"}, "paired_agent_title": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Paired Agent Title"}, "pairing_suspended": {"default": false, "title": "Pairing Suspended", "type": "boolean"}, "updated_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Updated At"}}, "required": ["session_id", "status", "backend"], "title": "DevServerInstanceEntry", "type": "object"}, "DevServerInstancesResponse": {"description": "All live dev servers in an org (management list).", "properties": {"instances": {"items": {"$ref": "#/components/schemas/DevServerInstanceEntry"}, "title": "Instances", "type": "array"}}, "required": ["instances"], "title": "DevServerInstancesResponse", "type": "object"}, "DevServerChatEntry": {"description": "One assistant chat associated with a dev-server preview.\n\n``is_active`` marks the chat currently paired with the preview (the Redis\nwrite-source pairing); the rest are prior chats kept via the append-only\n``AgentChatDevServerLink`` rows. ``is_participant`` reports whether the\nVIEWER can send in the chat \u2014 a participant row or an automation write\ngrant, mirroring the session write gates. Everyone else opens it\nread-only.", "properties": {"session_id": {"title": "Session Id", "type": "string"}, "title": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Title"}, "status": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Status"}, "created_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created At"}, "last_message_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last Message At"}, "is_participant": {"default": false, "title": "Is Participant", "type": "boolean"}, "is_active": {"default": false, "title": "Is Active", "type": "boolean"}, "owner_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Owner Name"}}, "required": ["session_id"], "title": "DevServerChatEntry", "type": "object"}, "DevServerChatsResponse": {"description": "Chats associated with one dev-server preview, newest first.\n\n``has_more`` is True when the bounded page truncated older chats, so the\nmenu can say so instead of implying the list is complete.", "properties": {"chats": {"items": {"$ref": "#/components/schemas/DevServerChatEntry"}, "title": "Chats", "type": "array"}, "has_more": {"default": false, "title": "Has More", "type": "boolean"}}, "required": ["chats"], "title": "DevServerChatsResponse", "type": "object"}, "PreviewModuleItem": {"description": "A single preview module item.", "properties": {"entry": {"title": "Entry", "type": "string"}, "js": {"title": "Js", "type": "string"}, "error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error"}, "build_error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Build Error"}, "warnings": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Warnings"}, "used_fallback": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Used Fallback"}, "route": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Route"}, "router_kind": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Router Kind"}}, "required": ["entry", "js"], "title": "PreviewModuleItem", "type": "object"}, "PreviewModuleResponse": {"description": "Response containing preview modules.", "properties": {"modules": {"items": {"$ref": "#/components/schemas/PreviewModuleItem"}, "title": "Modules", "type": "array"}, "preview_css": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Preview Css"}, "css_error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Css Error"}}, "required": ["modules"], "title": "PreviewModuleResponse", "type": "object"}, "PreviewModuleRequest": {"description": "Request for building preview modules.", "properties": {"session_id": {"description": "Claude session id", "title": "Session Id", "type": "string"}, "entries": {"description": "Repo-relative entry paths to bundle", "items": {"type": "string"}, "title": "Entries", "type": "array"}, "env_vars": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"type": "null"}], "description": "Environment variables to define during build (from webpack DefinePlugin)", "title": "Env Vars"}, "page_css": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Existing CSS on the page for delta computation", "title": "Page Css"}}, "required": ["session_id", "entries"], "title": "PreviewModuleRequest", "type": "object"}, "PreviewStateModule": {"description": "A preview module loaded from S3 collaborative store.", "properties": {"entry": {"title": "Entry", "type": "string"}, "code": {"title": "Code", "type": "string"}, "route": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Route"}, "router_kind": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Router Kind"}}, "required": ["entry", "code"], "title": "PreviewStateModule", "type": "object"}, "PreviewStateResponse": {"description": "Response containing collaborative preview state from S3.", "properties": {"modules": {"items": {"$ref": "#/components/schemas/PreviewStateModule"}, "title": "Modules", "type": "array"}, "css": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Css"}, "updated_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Updated At"}}, "required": ["modules"], "title": "PreviewStateResponse", "type": "object"}, "CopyPreviewRequest": {"description": "Request to copy preview state from one branch to another.", "properties": {"repo": {"description": "owner/name", "title": "Repo", "type": "string"}, "source_branch": {"title": "Source Branch", "type": "string"}, "target_branch": {"title": "Target Branch", "type": "string"}}, "required": ["repo", "source_branch", "target_branch"], "title": "CopyPreviewRequest", "type": "object"}, "PreviewShareLinkResponse": {"description": "Response containing a preview share link.", "properties": {"id": {"title": "Id", "type": "string"}, "repo": {"title": "Repo", "type": "string"}, "branch": {"title": "Branch", "type": "string"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}}, "required": ["id", "repo", "branch", "created_at"], "title": "PreviewShareLinkResponse", "type": "object"}, "CreatePreviewShareLinkRequest": {"description": "Request for creating a preview share link.", "properties": {"repo": {"description": "owner/name", "title": "Repo", "type": "string"}, "branch": {"title": "Branch", "type": "string"}}, "required": ["repo", "branch"], "title": "CreatePreviewShareLinkRequest", "type": "object"}, "HandoffPacketResponse": {"properties": {"id": {"title": "Id", "type": "string"}, "session_id": {"title": "Session Id", "type": "string"}, "organization_id": {"title": "Organization Id", "type": "string"}, "title": {"title": "Title", "type": "string"}, "content_type": {"title": "Content Type", "type": "string"}, "size_bytes": {"title": "Size Bytes", "type": "integer"}, "pr_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Pr Url"}, "view_url": {"title": "View Url", "type": "string"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}}, "required": ["id", "session_id", "organization_id", "title", "content_type", "size_bytes", "view_url", "created_at", "updated_at"], "title": "HandoffPacketResponse", "type": "object"}, "DesignCommentListResponse": {"description": "Branch-overview list of design comment threads.", "properties": {"comments": {"items": {"$ref": "#/components/schemas/DesignCommentOut"}, "title": "Comments", "type": "array"}}, "required": ["comments"], "title": "DesignCommentListResponse", "type": "object"}, "DesignCommentOut": {"description": "A serialized design comment thread with its nested replies.\n\nThe paired ``dev_server``/``agent_session`` pointers are stored server-side\n(audit + dispatch-bound agent resolution) but deliberately NOT surfaced here:\nthey are access-controlled, participant-scoped identifiers gated on the\ndev-server/session surfaces, so an org-visible comment must not leak them.", "properties": {"id": {"title": "Id", "type": "string"}, "organization_id": {"title": "Organization Id", "type": "string"}, "repository_id": {"description": "GitHub repository id (github_id).", "title": "Repository Id", "type": "integer"}, "branch": {"title": "Branch", "type": "string"}, "working_dir": {"title": "Working Dir", "type": "string"}, "author_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Author Id"}, "status": {"title": "Status", "type": "string"}, "body": {"title": "Body", "type": "string"}, "page_identity": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Page Identity"}, "anchor": {"additionalProperties": true, "title": "Anchor", "type": "object"}, "anchor_version": {"title": "Anchor Version", "type": "integer"}, "resolved_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Resolved At"}, "reopened_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Reopened At"}, "resolved_by_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Resolved By Id"}, "resolution_source": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Resolution Source"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}, "replies": {"items": {"$ref": "#/components/schemas/DesignCommentReplyOut"}, "title": "Replies", "type": "array"}}, "required": ["id", "organization_id", "repository_id", "branch", "working_dir", "author_id", "status", "body", "page_identity", "anchor", "anchor_version", "resolved_at", "reopened_at", "resolved_by_id", "resolution_source", "created_at", "updated_at", "replies"], "title": "DesignCommentOut", "type": "object"}, "DesignCommentReplyOut": {"description": "A serialized reply on a design comment thread.", "properties": {"id": {"title": "Id", "type": "string"}, "author_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Author Id"}, "author_kind": {"title": "Author Kind", "type": "string"}, "body": {"title": "Body", "type": "string"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}}, "required": ["id", "author_id", "author_kind", "body", "created_at", "updated_at"], "title": "DesignCommentReplyOut", "type": "object"}, "CommentEncodedLocationIn": {"description": "Decoded ``codepress-data-fp`` (CommentEncodedLocation in commentAnchor.ts).\n\nNull on the anchor when the pin landed on an uninstrumented element.", "properties": {"fp": {"title": "Fp", "type": "string"}, "file": {"title": "File", "type": "string"}, "start": {"title": "Start", "type": "integer"}, "end": {"title": "End", "type": "integer"}}, "required": ["fp", "file", "start", "end"], "title": "CommentEncodedLocationIn", "type": "object"}, "CommentFallbackIn": {"description": "Absolute-coordinate fallback (CommentFallback in commentAnchor.ts).", "properties": {"pageX": {"title": "Pagex", "type": "number"}, "pageY": {"title": "Pagey", "type": "number"}, "viewportWidth": {"title": "Viewportwidth", "type": "number"}, "scrollX": {"title": "Scrollx", "type": "number"}, "scrollY": {"title": "Scrolly", "type": "number"}}, "required": ["pageX", "pageY", "viewportWidth", "scrollX", "scrollY"], "title": "CommentFallbackIn", "type": "object"}, "CommentInstancePathIn": {"description": "Same-``fp`` instance discriminator (CommentInstancePath in commentAnchor.ts).\n\n``fp`` is null for uninstrumented elements, where ``fpInstanceIndex`` is -1.", "properties": {"fp": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Fp"}, "fpInstanceIndex": {"title": "Fpinstanceindex", "type": "integer"}, "domPath": {"title": "Dompath", "type": "string"}}, "required": ["fpInstanceIndex", "domPath"], "title": "CommentInstancePathIn", "type": "object"}, "CommentOffsetIn": {"description": "Normalized click point inside the anchor element's box (0..1).", "properties": {"xPct": {"title": "Xpct", "type": "number"}, "yPct": {"title": "Ypct", "type": "number"}}, "required": ["xPct", "yPct"], "title": "CommentOffsetIn", "type": "object"}, "DesignCommentAnchorIn": {"additionalProperties": true, "description": "The redundant pin anchor, mirroring CommentAnchor in commentAnchor.ts.\n\n``extra=\"allow\"`` preserves additive anchor fields (paired with an\n``anchor_version`` bump) instead of silently dropping them; the whole object\nis stored in ``DesignComment.anchor``.", "properties": {"encodedLocation": {"anyOf": [{"$ref": "#/components/schemas/CommentEncodedLocationIn"}, {"type": "null"}]}, "instancePath": {"$ref": "#/components/schemas/CommentInstancePathIn"}, "contentHash": {"title": "Contenthash", "type": "string"}, "textSnippet": {"anyOf": [{"maxLength": 120, "type": "string"}, {"type": "null"}], "title": "Textsnippet"}, "offset": {"$ref": "#/components/schemas/CommentOffsetIn"}, "fallback": {"$ref": "#/components/schemas/CommentFallbackIn"}, "identity": {"enum": ["fp", "content", "coords"], "title": "Identity", "type": "string"}}, "required": ["instancePath", "contentHash", "offset", "fallback", "identity"], "title": "DesignCommentAnchorIn", "type": "object"}, "DesignCommentCreate": {"description": "Create-a-pin payload (the shape Slice 2/3's frontend POSTs).", "properties": {"client_request_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "description": "Optional client-generated UUID used as the comment row id and idempotency key for safe create retries.", "title": "Client Request Id"}, "organization_id": {"title": "Organization Id", "type": "string"}, "repository_id": {"description": "GitHub repository id (github_id).", "title": "Repository Id", "type": "integer"}, "branch": {"title": "Branch", "type": "string"}, "working_dir": {"default": "", "description": "Frontend scope within the repo (\"\" = repo-root / single frontend).", "title": "Working Dir", "type": "string"}, "dev_server_session_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Dev Server Session Id"}, "agent_session_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Agent Session Id"}, "body": {"minLength": 1, "title": "Body", "type": "string"}, "anchor": {"$ref": "#/components/schemas/DesignCommentAnchorIn"}, "page_identity": {"anyOf": [{"maxLength": 8192, "type": "string"}, {"type": "null"}], "description": "Canonical preview-relative URL (/path?query#fragment).", "title": "Page Identity"}}, "required": ["organization_id", "repository_id", "branch", "body", "anchor"], "title": "DesignCommentCreate", "type": "object"}, "DesignCommentAgentAuthorization": {"description": "Lifecycle-specific capability for one dispatched comment.", "properties": {"comment_id": {"title": "Comment Id", "type": "string"}, "dispatch_token": {"format": "uuid", "title": "Dispatch Token", "type": "string"}}, "required": ["comment_id", "dispatch_token"], "title": "DesignCommentAgentAuthorization", "type": "object"}, "DesignCommentAgentDispatchResponse": {"description": "Pending capabilities passed to the visible assistant message.", "properties": {"dispatch_id": {"format": "uuid", "title": "Dispatch Id", "type": "string"}, "authorizations": {"items": {"$ref": "#/components/schemas/DesignCommentAgentAuthorization"}, "title": "Authorizations", "type": "array"}, "scope": {"$ref": "#/components/schemas/DesignCommentResolutionScope"}}, "required": ["dispatch_id", "authorizations", "scope"], "title": "DesignCommentAgentDispatchResponse", "type": "object"}, "DesignCommentResolutionScope": {"description": "Canonical durable scope copied from dispatch into the agent tool call.", "properties": {"organization_id": {"title": "Organization Id", "type": "string"}, "repository_id": {"description": "GitHub repository id (github_id).", "title": "Repository Id", "type": "integer"}, "branch": {"title": "Branch", "type": "string"}, "working_dir": {"title": "Working Dir", "type": "string"}}, "required": ["organization_id", "repository_id", "branch", "working_dir"], "title": "DesignCommentResolutionScope", "type": "object"}, "DesignCommentAgentDispatchRequest": {"description": "Prepare one bounded batch for a visible assistant dispatch.", "properties": {"organization_id": {"title": "Organization Id", "type": "string"}, "repository_id": {"description": "GitHub repository id (github_id).", "title": "Repository Id", "type": "integer"}, "branch": {"title": "Branch", "type": "string"}, "working_dir": {"title": "Working Dir", "type": "string"}, "dispatch_id": {"format": "uuid", "title": "Dispatch Id", "type": "string"}, "dev_server_session_id": {"minLength": 1, "title": "Dev Server Session Id", "type": "string"}, "agent_session_id": {"minLength": 1, "title": "Agent Session Id", "type": "string"}, "comment_ids": {"items": {"format": "uuid", "type": "string"}, "maxItems": 100, "minItems": 1, "title": "Comment Ids", "type": "array"}}, "required": ["organization_id", "repository_id", "branch", "working_dir", "dispatch_id", "dev_server_session_id", "agent_session_id", "comment_ids"], "title": "DesignCommentAgentDispatchRequest", "type": "object"}, "DesignCommentAgentDispatchFinalizeResponse": {"description": "Prepared dispatch finalization result.", "properties": {"dispatch_id": {"format": "uuid", "title": "Dispatch Id", "type": "string"}, "comment_count": {"title": "Comment Count", "type": "integer"}}, "required": ["dispatch_id", "comment_count"], "title": "DesignCommentAgentDispatchFinalizeResponse", "type": "object"}, "DesignCommentAgentDispatchFinalizeRequest": {"description": "Commit or abort one prepared multi-batch dispatch.", "properties": {"organization_id": {"title": "Organization Id", "type": "string"}, "repository_id": {"description": "GitHub repository id (github_id).", "title": "Repository Id", "type": "integer"}, "branch": {"title": "Branch", "type": "string"}, "working_dir": {"title": "Working Dir", "type": "string"}, "dispatch_id": {"format": "uuid", "title": "Dispatch Id", "type": "string"}, "agent_session_id": {"minLength": 1, "title": "Agent Session Id", "type": "string"}, "expected_comment_count": {"minimum": 1, "title": "Expected Comment Count", "type": "integer"}}, "required": ["organization_id", "repository_id", "branch", "working_dir", "dispatch_id", "agent_session_id", "expected_comment_count"], "title": "DesignCommentAgentDispatchFinalizeRequest", "type": "object"}, "DesignCommentDeleteResponse": {"description": "Result of deleting a design comment.", "properties": {"success": {"default": true, "title": "Success", "type": "boolean"}, "id": {"title": "Id", "type": "string"}}, "required": ["id"], "title": "DesignCommentDeleteResponse", "type": "object"}, "DesignCommentReplyCreate": {"description": "Append-a-reply payload.", "properties": {"client_request_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "description": "Optional client-generated UUID used as the reply row id and idempotency key for safe reply retries.", "title": "Client Request Id"}, "body": {"minLength": 1, "title": "Body", "type": "string"}}, "required": ["body"], "title": "DesignCommentReplyCreate", "type": "object"}, "AgentDeviceCheckout": {"description": "One local repo checkout a device advertises for local sessions.", "properties": {"repo_full_name": {"description": "owner/name", "title": "Repo Full Name", "type": "string"}, "path": {"description": "Absolute path of the checkout on the device", "title": "Path", "type": "string"}, "current_branch": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Current Branch"}, "dirty": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Dirty"}, "default_branch": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Default Branch"}}, "required": ["repo_full_name", "path"], "title": "AgentDeviceCheckout", "type": "object"}, "AgentDeviceOut": {"description": "A registered device as shown to the web run-target picker.", "properties": {"device_id": {"title": "Device Id", "type": "string"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name"}, "hostname": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hostname"}, "platform": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Platform"}, "app_version": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "App Version"}, "status": {"title": "Status", "type": "string"}, "online": {"title": "Online", "type": "boolean"}, "last_seen_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Last Seen At"}, "repo_checkouts": {"items": {"$ref": "#/components/schemas/AgentDeviceCheckout"}, "title": "Repo Checkouts", "type": "array"}, "capabilities": {"additionalProperties": true, "title": "Capabilities", "type": "object"}}, "required": ["device_id", "name", "hostname", "platform", "app_version", "status", "online", "last_seen_at", "repo_checkouts", "capabilities"], "title": "AgentDeviceOut", "type": "object"}, "RegisterAgentDeviceResponse": {"description": "Registration ack with the channel endpoints the device should use.", "properties": {"device": {"$ref": "#/components/schemas/AgentDeviceOut"}, "device_channel_path": {"description": "WebSocket path for the device command channel", "title": "Device Channel Path", "type": "string"}, "heartbeat_interval_seconds": {"title": "Heartbeat Interval Seconds", "type": "integer"}}, "required": ["device", "device_channel_path", "heartbeat_interval_seconds"], "title": "RegisterAgentDeviceResponse", "type": "object"}, "RegisterAgentDeviceRequest": {"description": "Terminal-app device registration (upsert by device_id).", "properties": {"device_id": {"maxLength": 128, "title": "Device Id", "type": "string"}, "organization_id": {"title": "Organization Id", "type": "string"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name"}, "hostname": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hostname"}, "platform": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Platform"}, "app_version": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "App Version"}, "repo_checkouts": {"anyOf": [{"items": {"$ref": "#/components/schemas/AgentDeviceCheckout"}, "type": "array"}, {"type": "null"}], "title": "Repo Checkouts"}, "capabilities": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Capabilities"}}, "required": ["device_id", "organization_id"], "title": "RegisterAgentDeviceRequest", "type": "object"}, "AgentDeviceListResponse": {"description": "Org-scoped device list.", "properties": {"devices": {"items": {"$ref": "#/components/schemas/AgentDeviceOut"}, "title": "Devices", "type": "array"}}, "required": ["devices"], "title": "AgentDeviceListResponse", "type": "object"}, "AgentDeviceCheckoutsRequest": {"description": "Full replacement of a device's advertised checkouts.", "properties": {"repo_checkouts": {"items": {"$ref": "#/components/schemas/AgentDeviceCheckout"}, "title": "Repo Checkouts", "type": "array"}}, "required": ["repo_checkouts"], "title": "AgentDeviceCheckoutsRequest", "type": "object"}, "LocalPreviewStatusResponse": {"description": "Desktop-hosted Design preview status.", "properties": {"status": {"title": "Status", "type": "string"}, "phase": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Phase"}, "preview_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Preview Url"}, "framework": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Framework"}, "error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error"}, "branch": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Branch"}, "backend_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Backend Url"}, "updated_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Updated At"}, "can_edit": {"default": false, "title": "Can Edit", "type": "boolean"}, "editor_session_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Editor Session Id"}, "agent_session_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Agent Session Id"}, "session_id": {"title": "Session Id", "type": "string"}, "started_via": {"default": "local_device", "title": "Started Via", "type": "string"}, "frontend_label": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Frontend Label"}, "device_id": {"title": "Device Id", "type": "string"}, "local_repo_path": {"title": "Local Repo Path", "type": "string"}, "runtime": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Runtime"}}, "required": ["status", "session_id", "device_id", "local_repo_path"], "title": "LocalPreviewStatusResponse", "type": "object"}, "LocalPreviewStartRequest": {"description": "Start a recipe frontend on a registered desktop checkout.", "properties": {"organization_id": {"title": "Organization Id", "type": "string"}, "device_id": {"maxLength": 128, "title": "Device Id", "type": "string"}, "checkout_path": {"maxLength": 4096, "minLength": 1, "title": "Checkout Path", "type": "string"}, "working_dir": {"default": "", "maxLength": 512, "title": "Working Dir", "type": "string"}, "branch": {"anyOf": [{"maxLength": 255, "type": "string"}, {"type": "null"}], "title": "Branch"}, "backend_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Backend Url"}}, "required": ["organization_id", "device_id", "checkout_path"], "title": "LocalPreviewStartRequest", "type": "object"}, "UpdateChatModelRequest": {"description": "Request to update the agent_type and/or model on a chat session.\n\nEither or both fields may be provided; missing fields leave the existing\nvalue untouched. The new values are written to the session row so every\nsurface (web, desktop, mobile) that re-reads the chat detail picks up\nthe latest user-chosen model.", "properties": {"agent_type": {"anyOf": [{"maxLength": 32, "type": "string"}, {"type": "null"}], "title": "Agent Type"}, "model": {"anyOf": [{"maxLength": 64, "type": "string"}, {"type": "null"}], "title": "Model"}}, "title": "UpdateChatModelRequest", "type": "object"}, "UpdateChatNotificationPreferenceRequest": {"description": "Request to set where a chat should ping the user for required answers.", "properties": {"surface": {"description": "Where to notify the user when the agent is blocked on an answer", "enum": ["whatsapp", "slack", "email", "none"], "title": "Surface", "type": "string"}}, "required": ["surface"], "title": "UpdateChatNotificationPreferenceRequest", "type": "object"}, "ChatHideRuleListResponse": {"description": "List of the current user's chat hide rules.", "properties": {"rules": {"items": {"$ref": "#/components/schemas/ChatHideRuleSchema"}, "title": "Rules", "type": "array"}}, "required": ["rules"], "title": "ChatHideRuleListResponse", "type": "object"}, "ChatHideRuleSchema": {"description": "A single per-user rule that hides matching chats from the sidebar.", "properties": {"id": {"title": "Id", "type": "string"}, "organization_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Organization Id"}, "title_contains": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Title Contains"}, "match_source": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Match Source"}, "label": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Label"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}}, "required": ["id", "created_at", "updated_at"], "title": "ChatHideRuleSchema", "type": "object"}, "CreateChatHideRuleRequest": {"description": "Create a new chat hide rule. At least one match field must be set.", "properties": {"organization_id": {"anyOf": [{"maxLength": 64, "type": "string"}, {"type": "null"}], "title": "Organization Id"}, "title_contains": {"anyOf": [{"maxLength": 255, "type": "string"}, {"type": "null"}], "title": "Title Contains"}, "match_source": {"anyOf": [{"maxLength": 32, "type": "string"}, {"type": "null"}], "title": "Match Source"}, "label": {"anyOf": [{"maxLength": 255, "type": "string"}, {"type": "null"}], "title": "Label"}}, "title": "CreateChatHideRuleRequest", "type": "object"}, "UpdateChatHideRuleRequest": {"description": "Update a chat hide rule. Send only fields you want to change.", "properties": {"organization_id": {"anyOf": [{"maxLength": 64, "type": "string"}, {"type": "null"}], "title": "Organization Id"}, "title_contains": {"anyOf": [{"maxLength": 255, "type": "string"}, {"type": "null"}], "title": "Title Contains"}, "match_source": {"anyOf": [{"maxLength": 32, "type": "string"}, {"type": "null"}], "title": "Match Source"}, "label": {"anyOf": [{"maxLength": 255, "type": "string"}, {"type": "null"}], "title": "Label"}}, "title": "UpdateChatHideRuleRequest", "type": "object"}, "HideChatRequest": {"description": "Hide an existing chat by creating a rule from its current title.", "properties": {"organization_id": {"anyOf": [{"maxLength": 64, "type": "string"}, {"type": "null"}], "title": "Organization Id"}}, "title": "HideChatRequest", "type": "object"}, "MyWorkItem": {"description": "One agent chat/thread shown in the My Work dashboard.", "properties": {"session_id": {"title": "Session Id", "type": "string"}, "title": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Title"}, "agent_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Agent Type"}, "state": {"enum": ["changes_requested", "stale_pr", "open_pr", "branch_only", "no_pr_yet", "needs_response", "running", "review_requested", "merged", "closed_unmerged", "canceled"], "title": "State", "type": "string"}, "state_label": {"title": "State Label", "type": "string"}, "repo": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Repo"}, "repo_owner": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Repo Owner"}, "branch": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Branch"}, "pr_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Pr Url"}, "pr_state": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Pr State"}, "owner_user_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Owner User Id"}, "owner_email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Owner Email"}, "owner_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Owner Name"}, "owner_github_username": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Owner Github Username"}, "owner_avatar_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Owner Avatar Url"}, "owner_role": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Owner Role"}, "owner_kind": {"anyOf": [{"enum": ["user", "automation"], "type": "string"}, {"type": "null"}], "title": "Owner Kind"}, "automation_run_uuid": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Automation Run Uuid"}, "automation_run_status": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Automation Run Status"}, "automation_config_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Automation Config Id"}, "automation_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Automation Name"}, "preview_available": {"default": false, "title": "Preview Available", "type": "boolean"}, "last_activity_at": {"format": "date-time", "title": "Last Activity At", "type": "string"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}, "archived": {"default": false, "title": "Archived", "type": "boolean"}, "archived_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Archived At"}, "canceled": {"default": false, "title": "Canceled", "type": "boolean"}, "canceled_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Canceled At"}, "primary_action": {"enum": ["resume", "open_pr", "open_preview", "start_follow_up"], "title": "Primary Action", "type": "string"}, "reason": {"title": "Reason", "type": "string"}, "initial_user_request": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Initial User Request"}, "initial_user_request_preview": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Initial User Request Preview"}, "pr_description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Pr Description"}, "chat_url_path": {"title": "Chat Url Path", "type": "string"}}, "required": ["session_id", "state", "state_label", "last_activity_at", "created_at", "updated_at", "primary_action", "reason", "chat_url_path"], "title": "MyWorkItem", "type": "object"}, "MyWorkListResponse": {"description": "Paginated response for the My Work dashboard.", "properties": {"items": {"items": {"$ref": "#/components/schemas/MyWorkItem"}, "title": "Items", "type": "array"}, "total": {"title": "Total", "type": "integer"}, "limit": {"title": "Limit", "type": "integer"}, "offset": {"title": "Offset", "type": "integer"}}, "required": ["items", "total", "limit", "offset"], "title": "MyWorkListResponse", "type": "object"}, "MyWorkDetailResponse": {"description": "Drawer detail payload for one My Work item.", "properties": {"item": {"$ref": "#/components/schemas/MyWorkItem"}, "recent_activity": {"default": [], "items": {"additionalProperties": true, "type": "object"}, "title": "Recent Activity", "type": "array"}}, "required": ["item"], "title": "MyWorkDetailResponse", "type": "object"}, "SessionParticipantsResponse": {"description": "Response containing session participants.", "properties": {"participants": {"items": {"$ref": "#/components/schemas/SessionParticipantSchema"}, "title": "Participants", "type": "array"}}, "required": ["participants"], "title": "SessionParticipantsResponse", "type": "object"}, "AddParticipantRequest": {"description": "Request to add a participant to a session.", "properties": {"user_id": {"title": "User Id", "type": "string"}}, "required": ["user_id"], "title": "AddParticipantRequest", "type": "object"}, "OrgUsageListResponse": {"description": "Paginated list of org usage summaries.", "properties": {"orgs": {"items": {"$ref": "#/components/schemas/OrgUsageSummary"}, "title": "Orgs", "type": "array"}, "total": {"title": "Total", "type": "integer"}}, "required": ["orgs", "total"], "title": "OrgUsageListResponse", "type": "object"}, "OrgUsageSummary": {"description": "Usage summary for a single organization.", "properties": {"org_id": {"title": "Org Id", "type": "string"}, "org_name": {"title": "Org Name", "type": "string"}, "org_slug": {"title": "Org Slug", "type": "string"}, "total_sessions": {"title": "Total Sessions", "type": "integer"}, "total_api_calls": {"title": "Total Api Calls", "type": "integer"}, "total_tokens": {"title": "Total Tokens", "type": "integer"}, "total_input_tokens": {"title": "Total Input Tokens", "type": "integer"}, "total_output_tokens": {"title": "Total Output Tokens", "type": "integer"}, "non_cache_input_tokens": {"title": "Non Cache Input Tokens", "type": "integer"}, "cache_read_tokens": {"title": "Cache Read Tokens", "type": "integer"}, "cache_creation_tokens": {"title": "Cache Creation Tokens", "type": "integer"}, "cache_creation_5m_tokens": {"title": "Cache Creation 5M Tokens", "type": "integer"}, "cache_creation_1h_tokens": {"title": "Cache Creation 1H Tokens", "type": "integer"}, "metered_tokens": {"title": "Metered Tokens", "type": "integer"}, "total_cost_usd": {"title": "Total Cost Usd", "type": "number"}, "billable_cost_usd": {"title": "Billable Cost Usd", "type": "number"}, "external_estimated_cost_usd": {"title": "External Estimated Cost Usd", "type": "number"}, "billable_metered_tokens": {"title": "Billable Metered Tokens", "type": "integer"}, "external_metered_tokens": {"title": "External Metered Tokens", "type": "integer"}, "provider_usage": {"$ref": "#/components/schemas/ProviderUsageRollups"}, "first_session_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "First Session At"}, "last_session_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last Session At"}}, "required": ["org_id", "org_name", "org_slug", "total_sessions", "total_api_calls", "total_tokens", "total_input_tokens", "total_output_tokens", "non_cache_input_tokens", "cache_read_tokens", "cache_creation_tokens", "cache_creation_5m_tokens", "cache_creation_1h_tokens", "metered_tokens", "total_cost_usd", "billable_cost_usd", "external_estimated_cost_usd", "billable_metered_tokens", "external_metered_tokens", "provider_usage"], "title": "OrgUsageSummary", "type": "object"}, "ProviderPlanUsage": {"description": "Future provider weekly-limit usage fields.", "properties": {"usage_percent": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Usage Percent"}, "plan_cost_usd": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Plan Cost Usd"}, "extra_cost_usd": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Extra Cost Usd"}}, "title": "ProviderPlanUsage", "type": "object"}, "ProviderUsageRollup": {"description": "Provider-specific usage and billing rollup.", "properties": {"tokens": {"title": "Tokens", "type": "integer"}, "input_tokens": {"title": "Input Tokens", "type": "integer"}, "output_tokens": {"title": "Output Tokens", "type": "integer"}, "non_cache_input_tokens": {"title": "Non Cache Input Tokens", "type": "integer"}, "cache_read_tokens": {"title": "Cache Read Tokens", "type": "integer"}, "cache_creation_tokens": {"title": "Cache Creation Tokens", "type": "integer"}, "estimated_cost_usd": {"title": "Estimated Cost Usd", "type": "number"}, "codepress_cost_usd": {"title": "Codepress Cost Usd", "type": "number"}, "external_cost_usd": {"title": "External Cost Usd", "type": "number"}, "billing_mode": {"enum": ["codepress", "provider_api_key", "provider_oauth", "mixed"], "title": "Billing Mode", "type": "string"}, "plan_usage": {"anyOf": [{"$ref": "#/components/schemas/ProviderPlanUsage"}, {"type": "null"}]}}, "required": ["tokens", "input_tokens", "output_tokens", "non_cache_input_tokens", "cache_read_tokens", "cache_creation_tokens", "estimated_cost_usd", "codepress_cost_usd", "external_cost_usd", "billing_mode"], "title": "ProviderUsageRollup", "type": "object"}, "ProviderUsageRollups": {"description": "Provider rollups exposed consistently to usage tracker clients.", "properties": {"anthropic": {"$ref": "#/components/schemas/ProviderUsageRollup"}, "openai": {"$ref": "#/components/schemas/ProviderUsageRollup"}, "openrouter": {"$ref": "#/components/schemas/ProviderUsageRollup"}, "other": {"$ref": "#/components/schemas/ProviderUsageRollup"}}, "required": ["anthropic", "openai", "openrouter", "other"], "title": "ProviderUsageRollups", "type": "object"}, "OrgWeeklyUsageResponse": {"description": "Weekly usage breakdown for an organization.", "properties": {"org_id": {"title": "Org Id", "type": "string"}, "org_name": {"title": "Org Name", "type": "string"}, "org_slug": {"title": "Org Slug", "type": "string"}, "weeks": {"items": {"$ref": "#/components/schemas/WeeklyUsage"}, "title": "Weeks", "type": "array"}, "total_sessions": {"title": "Total Sessions", "type": "integer"}, "total_api_calls": {"title": "Total Api Calls", "type": "integer"}, "total_tokens": {"title": "Total Tokens", "type": "integer"}, "total_cost_usd": {"title": "Total Cost Usd", "type": "number"}, "billable_cost_usd": {"title": "Billable Cost Usd", "type": "number"}, "external_estimated_cost_usd": {"title": "External Estimated Cost Usd", "type": "number"}, "billable_metered_tokens": {"title": "Billable Metered Tokens", "type": "integer"}, "external_metered_tokens": {"title": "External Metered Tokens", "type": "integer"}, "provider_usage": {"$ref": "#/components/schemas/ProviderUsageRollups"}, "user_usage": {"items": {"$ref": "#/components/schemas/UserUsageRollup"}, "title": "User Usage", "type": "array"}}, "required": ["org_id", "org_name", "org_slug", "weeks", "total_sessions", "total_api_calls", "total_tokens", "total_cost_usd", "billable_cost_usd", "external_estimated_cost_usd", "billable_metered_tokens", "external_metered_tokens", "provider_usage"], "title": "OrgWeeklyUsageResponse", "type": "object"}, "UserUsageRollup": {"description": "Usage rollup for one user inside an organization usage window.", "properties": {"user_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "User Id"}, "user_email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "User Email"}, "user_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "User Name"}, "last_activity": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last Activity"}, "sessions": {"title": "Sessions", "type": "integer"}, "api_calls": {"title": "Api Calls", "type": "integer"}, "total_tokens": {"title": "Total Tokens", "type": "integer"}, "input_tokens": {"title": "Input Tokens", "type": "integer"}, "output_tokens": {"title": "Output Tokens", "type": "integer"}, "non_cache_input_tokens": {"title": "Non Cache Input Tokens", "type": "integer"}, "cache_read_tokens": {"title": "Cache Read Tokens", "type": "integer"}, "cache_creation_tokens": {"title": "Cache Creation Tokens", "type": "integer"}, "metered_tokens": {"title": "Metered Tokens", "type": "integer"}, "total_cost_usd": {"title": "Total Cost Usd", "type": "number"}, "billable_cost_usd": {"title": "Billable Cost Usd", "type": "number"}, "external_estimated_cost_usd": {"title": "External Estimated Cost Usd", "type": "number"}, "billable_metered_tokens": {"title": "Billable Metered Tokens", "type": "integer"}, "external_metered_tokens": {"title": "External Metered Tokens", "type": "integer"}, "provider_usage": {"$ref": "#/components/schemas/ProviderUsageRollups"}}, "required": ["sessions", "api_calls", "total_tokens", "input_tokens", "output_tokens", "non_cache_input_tokens", "cache_read_tokens", "cache_creation_tokens", "metered_tokens", "total_cost_usd", "billable_cost_usd", "external_estimated_cost_usd", "billable_metered_tokens", "external_metered_tokens", "provider_usage"], "title": "UserUsageRollup", "type": "object"}, "WeeklyUsage": {"description": "Usage data for a single week.", "properties": {"week": {"title": "Week", "type": "string"}, "sessions": {"title": "Sessions", "type": "integer"}, "api_calls": {"title": "Api Calls", "type": "integer"}, "total_tokens": {"title": "Total Tokens", "type": "integer"}, "input_tokens": {"title": "Input Tokens", "type": "integer"}, "output_tokens": {"title": "Output Tokens", "type": "integer"}, "non_cache_input_tokens": {"title": "Non Cache Input Tokens", "type": "integer"}, "cache_read_tokens": {"title": "Cache Read Tokens", "type": "integer"}, "cache_creation_tokens": {"title": "Cache Creation Tokens", "type": "integer"}, "cache_creation_5m_tokens": {"title": "Cache Creation 5M Tokens", "type": "integer"}, "cache_creation_1h_tokens": {"title": "Cache Creation 1H Tokens", "type": "integer"}, "metered_tokens": {"title": "Metered Tokens", "type": "integer"}, "cost_usd": {"title": "Cost Usd", "type": "number"}, "billable_cost_usd": {"title": "Billable Cost Usd", "type": "number"}, "external_estimated_cost_usd": {"title": "External Estimated Cost Usd", "type": "number"}, "billable_metered_tokens": {"title": "Billable Metered Tokens", "type": "integer"}, "external_metered_tokens": {"title": "External Metered Tokens", "type": "integer"}, "provider_usage": {"$ref": "#/components/schemas/ProviderUsageRollups"}}, "required": ["week", "sessions", "api_calls", "total_tokens", "input_tokens", "output_tokens", "non_cache_input_tokens", "cache_read_tokens", "cache_creation_tokens", "cache_creation_5m_tokens", "cache_creation_1h_tokens", "metered_tokens", "cost_usd", "billable_cost_usd", "external_estimated_cost_usd", "billable_metered_tokens", "external_metered_tokens", "provider_usage"], "title": "WeeklyUsage", "type": "object"}, "DatabaseConnectionResponse": {"description": "Response containing database connection details.", "properties": {"id": {"title": "Id", "type": "integer"}, "name": {"title": "Name", "type": "string"}, "db_type": {"title": "Db Type", "type": "string"}, "scope": {"description": "'organization' if shared with org, else 'user'", "title": "Scope", "type": "string"}, "can_edit": {"description": "Whether the current user can edit this connection", "title": "Can Edit", "type": "boolean"}, "can_delete": {"description": "Whether the current user can delete this connection", "title": "Can Delete", "type": "boolean"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}}, "required": ["id", "name", "db_type", "scope", "can_edit", "can_delete", "created_at", "updated_at"], "title": "DatabaseConnectionResponse", "type": "object"}, "CreateDatabaseConnectionRequest": {"description": "Request for creating a database connection.", "properties": {"name": {"description": "User-friendly name for this connection", "title": "Name", "type": "string"}, "db_type": {"description": "Database type: postgres, mysql, or sqlite", "title": "Db Type", "type": "string"}, "connection_string": {"description": "Database connection string", "title": "Connection String", "type": "string"}, "organization_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Organization ID (for org-level connection)", "title": "Organization Id"}, "scope": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "user", "description": "Visibility scope: 'user' (private, default) or 'organization' (all org members)", "title": "Scope"}}, "required": ["name", "db_type", "connection_string"], "title": "CreateDatabaseConnectionRequest", "type": "object"}, "DatabaseConnectionListResponse": {"description": "Response containing a list of database connections.", "properties": {"connections": {"items": {"$ref": "#/components/schemas/DatabaseConnectionResponse"}, "title": "Connections", "type": "array"}}, "required": ["connections"], "title": "DatabaseConnectionListResponse", "type": "object"}, "UpdateDatabaseConnectionRequest": {"description": "Request for updating a database connection.", "properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "User-friendly name for this connection", "title": "Name"}, "connection_string": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Database connection string", "title": "Connection String"}, "scope": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Visibility scope: 'user' (private) or 'organization' (all org members)", "title": "Scope"}}, "title": "UpdateDatabaseConnectionRequest", "type": "object"}, "DeletedResponse": {"description": "Delete acknowledgement response.", "properties": {"ok": {"default": true, "title": "Ok", "type": "boolean"}, "deleted": {"default": true, "title": "Deleted", "type": "boolean"}}, "title": "DeletedResponse", "type": "object"}, "DatabaseConnectionTestResponse": {"description": "Database connection test result.", "properties": {"ok": {"default": true, "title": "Ok", "type": "boolean"}, "message": {"title": "Message", "type": "string"}, "error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error"}}, "required": ["message"], "title": "DatabaseConnectionTestResponse", "type": "object"}, "TerminalTranscriptImportResponse": {"properties": {"session_id": {"title": "Session Id", "type": "string"}, "generation": {"title": "Generation", "type": "integer"}, "imported_messages": {"title": "Imported Messages", "type": "integer"}, "provider": {"title": "Provider", "type": "string"}, "provider_session_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Provider Session Id"}, "storage_path": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Storage Path"}, "title": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Title"}}, "required": ["session_id", "generation", "imported_messages", "provider"], "title": "TerminalTranscriptImportResponse", "type": "object"}, "TerminalTranscriptImportRequest": {"properties": {"provider": {"enum": ["claude", "codex"], "title": "Provider", "type": "string"}, "transcript_content": {"title": "Transcript Content", "type": "string"}, "provider_session_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Provider Session Id"}, "transcript_path": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Transcript Path"}, "cwd": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Cwd"}, "git_cwd": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Git Cwd"}, "organization_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Organization Id"}, "session_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Session Id"}, "device_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Device Id"}, "tab_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Tab Id"}, "workflow_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Workflow Id"}, "generation": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Generation"}, "repo_full_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Repo Full Name"}, "branch": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Branch"}}, "required": ["provider", "transcript_content"], "title": "TerminalTranscriptImportRequest", "type": "object"}, "TerminalTranscriptExportResponse": {"properties": {"session_id": {"title": "Session Id", "type": "string"}, "generation": {"title": "Generation", "type": "integer"}, "provider": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Provider"}, "provider_session_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Provider Session Id"}, "transcript_content": {"title": "Transcript Content", "type": "string"}, "filename": {"title": "Filename", "type": "string"}}, "required": ["session_id", "generation", "transcript_content", "filename"], "title": "TerminalTranscriptExportResponse", "type": "object"}, "SyncStateResponse": {"properties": {"session_id": {"title": "Session Id", "type": "string"}, "generation": {"title": "Generation", "type": "integer"}, "locked": {"title": "Locked", "type": "boolean"}, "lease_surface": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Lease Surface"}, "lease_holder_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Lease Holder Id"}, "lease_state": {"title": "Lease State", "type": "string"}, "lease_expires_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Lease Expires At"}, "terminal_device_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Terminal Device Id"}, "terminal_tab_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Terminal Tab Id"}, "terminal_workflow_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Terminal Workflow Id"}, "presence": {"additionalProperties": true, "title": "Presence", "type": "object"}}, "required": ["session_id", "generation", "locked", "lease_state", "presence"], "title": "SyncStateResponse", "type": "object"}, "SyncLeaseAcquireRequest": {"properties": {"surface": {"enum": ["terminal", "web"], "title": "Surface", "type": "string"}, "holder_id": {"title": "Holder Id", "type": "string"}, "state": {"default": "active_turn", "enum": ["active_turn", "syncing"], "title": "State", "type": "string"}, "ttl_seconds": {"default": 180, "title": "Ttl Seconds", "type": "integer"}, "device_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Device Id"}, "tab_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Tab Id"}, "workflow_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Workflow Id"}, "base_generation": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Base Generation"}}, "required": ["surface", "holder_id"], "title": "SyncLeaseAcquireRequest", "type": "object"}, "SyncLeaseReleaseRequest": {"properties": {"surface": {"enum": ["terminal", "web"], "title": "Surface", "type": "string"}, "holder_id": {"title": "Holder Id", "type": "string"}, "final_generation": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Final Generation"}}, "required": ["surface", "holder_id"], "title": "SyncLeaseReleaseRequest", "type": "object"}, "SyncPresenceRequest": {"properties": {"surface": {"enum": ["terminal", "web"], "title": "Surface", "type": "string"}, "holder_id": {"title": "Holder Id", "type": "string"}, "device_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Device Id"}, "tab_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Tab Id"}, "workflow_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Workflow Id"}, "active": {"default": true, "title": "Active", "type": "boolean"}}, "required": ["surface", "holder_id"], "title": "SyncPresenceRequest", "type": "object"}, "SyncHandoffResponse": {"properties": {"session_id": {"title": "Session Id", "type": "string"}, "dispatch": {"enum": ["live", "restarted"], "title": "Dispatch", "type": "string"}, "web_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Web Url"}}, "required": ["session_id", "dispatch"], "title": "SyncHandoffResponse", "type": "object"}, "SyncHandoffRequest": {"properties": {"branch": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Branch"}, "message": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Message"}}, "title": "SyncHandoffRequest", "type": "object"}, "SendMessageRequest": {"additionalProperties": true, "description": "Follow-up chat message sent over the SSE up-channel.\n\nMirrors the fields the WS consumer reads from ``content`` in its ``message``\nbranch. ``extra=\"allow\"`` keeps any other follow-up field the client sends\n(the WS path forwards the entire ``content`` dict as ``full_payload``), so\nthe runner still receives them via ``full_payload`` even when not declared\nhere.", "properties": {"text": {"default": "", "title": "Text", "type": "string"}, "attachments": {"items": {"additionalProperties": true, "type": "object"}, "title": "Attachments", "type": "array"}, "images": {"items": {"additionalProperties": true, "type": "object"}, "title": "Images", "type": "array"}, "mentions": {"items": {}, "title": "Mentions", "type": "array"}, "automation_mentions": {"items": {}, "title": "Automation Mentions", "type": "array"}, "page_mentions": {"items": {}, "title": "Page Mentions", "type": "array"}, "chat_mentions": {"items": {}, "title": "Chat Mentions", "type": "array"}, "client_message_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Client Message Id"}, "context": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Context"}, "additional_context": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Additional Context"}, "open_pr_on_commit": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Open Pr On Commit"}, "permission_mode": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Permission Mode"}, "plan_approved": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Plan Approved"}}, "title": "SendMessageRequest", "type": "object"}, "UserQuestionResponseRequest": {"properties": {"answers": {"additionalProperties": true, "title": "Answers", "type": "object"}}, "title": "UserQuestionResponseRequest", "type": "object"}, "CompactRequest": {"properties": {"instructions": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Instructions"}}, "title": "CompactRequest", "type": "object"}, "FocusStateRequest": {"properties": {"focused": {"title": "Focused", "type": "boolean"}}, "required": ["focused"], "title": "FocusStateRequest", "type": "object"}, "VaultSecretsResponseRequest": {"properties": {"request_id": {"title": "Request Id", "type": "string"}, "secrets": {"additionalProperties": true, "title": "Secrets", "type": "object"}}, "required": ["request_id"], "title": "VaultSecretsResponseRequest", "type": "object"}, "VaultActionResponseRequest": {"properties": {"request_id": {"title": "Request Id", "type": "string"}, "payload": {"additionalProperties": true, "title": "Payload", "type": "object"}}, "required": ["request_id"], "title": "VaultActionResponseRequest", "type": "object"}, "ForkRequest": {"additionalProperties": true, "description": "Edit-and-resend of an earlier user message.\n\nCarries the full follow-up payload (inherited from ``SendMessageRequest``)\nso a forked turn preserves permission mode, attachments, mentions, and\ncontext exactly like a normal message \u2014 only the pivot id is extra.", "properties": {"text": {"default": "", "title": "Text", "type": "string"}, "attachments": {"items": {"additionalProperties": true, "type": "object"}, "title": "Attachments", "type": "array"}, "images": {"items": {"additionalProperties": true, "type": "object"}, "title": "Images", "type": "array"}, "mentions": {"items": {}, "title": "Mentions", "type": "array"}, "automation_mentions": {"items": {}, "title": "Automation Mentions", "type": "array"}, "page_mentions": {"items": {}, "title": "Page Mentions", "type": "array"}, "chat_mentions": {"items": {}, "title": "Chat Mentions", "type": "array"}, "client_message_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Client Message Id"}, "context": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Context"}, "additional_context": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Additional Context"}, "open_pr_on_commit": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Open Pr On Commit"}, "permission_mode": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Permission Mode"}, "plan_approved": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Plan Approved"}, "fork_from_message_id": {"title": "Fork From Message Id", "type": "integer"}}, "required": ["fork_from_message_id"], "title": "ForkRequest", "type": "object"}, "ReleaseAnnouncementOut": {"description": "Response shape for read + create.", "properties": {"id": {"title": "Id", "type": "string"}, "release_key": {"title": "Release Key", "type": "string"}, "title": {"title": "Title", "type": "string"}, "ship_at_local_date": {"title": "Ship At Local Date", "type": "string"}, "ship_at_local_hour": {"title": "Ship At Local Hour", "type": "integer"}, "target_org_ids": {"items": {"type": "string"}, "title": "Target Org Ids", "type": "array"}, "fully_delivered_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Fully Delivered At"}}, "required": ["id", "release_key", "title", "ship_at_local_date", "ship_at_local_hour", "target_org_ids", "fully_delivered_at"], "title": "ReleaseAnnouncementOut", "type": "object"}, "ReleaseAnnouncementCreate": {"description": "Payload for creating a release announcement.\n\nFields:\n    release_key: Stable identifier (e.g. \"agent-teammates-2026-05-08\").\n        Re-using the same key on a second POST returns the original row\n        instead of creating a duplicate fan-out.\n    title: Sidebar title for the seeded chat session.\n    body_markdown: Assistant message body. Markdown rendered by the chat UI.\n    screenshot_url: Optional hero image (use a stable URL \u2014 e.g. the\n        pr-assets release on the codepress repo).\n    ship_at_local_date: YYYY-MM-DD wall-clock date in each org's timezone.\n    ship_at_local_hour: 0\u201323, defaults to noon. Same number applied per org.\n    target_org_ids: Empty = every org. Pass a list to scope a smoke test.", "properties": {"release_key": {"title": "Release Key", "type": "string"}, "title": {"title": "Title", "type": "string"}, "body_markdown": {"title": "Body Markdown", "type": "string"}, "screenshot_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Screenshot Url"}, "ship_at_local_date": {"title": "Ship At Local Date", "type": "string"}, "ship_at_local_hour": {"default": 12, "title": "Ship At Local Hour", "type": "integer"}, "target_org_ids": {"default": [], "items": {"type": "string"}, "title": "Target Org Ids", "type": "array"}}, "required": ["release_key", "title", "body_markdown", "ship_at_local_date"], "title": "ReleaseAnnouncementCreate", "type": "object"}, "ListPlansResponse": {"description": "Response containing list of available plans.", "properties": {"items": {"items": {"$ref": "#/components/schemas/PlanPriceResponse"}, "title": "Items", "type": "array"}}, "required": ["items"], "title": "ListPlansResponse", "type": "object"}, "PlanPriceResponse": {"description": "Response containing plan pricing details.", "properties": {"stripe_price_id": {"title": "Stripe Price Id", "type": "string"}, "lookup_key": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Lookup Key"}, "interval": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Interval"}, "unit_amount": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Unit Amount"}, "currency": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Currency"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name"}, "product_description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Product Description"}, "plan_description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Plan Description"}}, "required": ["stripe_price_id"], "title": "PlanPriceResponse", "type": "object"}, "CreateCheckoutSessionResponse": {"description": "Response containing checkout session details.", "properties": {"session_id": {"title": "Session Id", "type": "string"}, "client_secret": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Client Secret"}, "url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Url"}}, "required": ["session_id"], "title": "CreateCheckoutSessionResponse", "type": "object"}, "CreateCheckoutSessionRequest": {"description": "Request for creating a Stripe checkout session.", "properties": {"organization_id": {"title": "Organization Id", "type": "string"}, "price_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Price Id"}, "price_lookup_key": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Price Lookup Key"}, "quantity": {"anyOf": [{"type": "integer"}, {"type": "null"}], "default": 1, "title": "Quantity"}, "embedded": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Embedded"}, "trial_onboarding": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "default": false, "title": "Trial Onboarding"}, "success_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Success Url"}, "cancel_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Cancel Url"}, "return_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Return Url"}}, "required": ["organization_id"], "title": "CreateCheckoutSessionRequest", "type": "object"}, "CreatePortalSessionResponse": {"description": "Response containing portal session URL.", "properties": {"url": {"title": "Url", "type": "string"}}, "required": ["url"], "title": "CreatePortalSessionResponse", "type": "object"}, "CreatePortalSessionRequest": {"description": "Request for creating a Stripe portal session.", "properties": {"organization_id": {"title": "Organization Id", "type": "string"}, "return_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Return Url"}}, "required": ["organization_id"], "title": "CreatePortalSessionRequest", "type": "object"}, "BillingStatusResponse": {"description": "Response containing billing status for an organization.", "properties": {"organization_id": {"title": "Organization Id", "type": "string"}, "subscription_status": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Subscription Status"}, "plan_price_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Plan Price Id"}, "plan_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Plan Name"}, "plan_lookup_key": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Plan Lookup Key"}, "seats_purchased": {"default": 0, "title": "Seats Purchased", "type": "integer"}, "has_active_paid_plan": {"default": false, "title": "Has Active Paid Plan", "type": "boolean"}, "has_active_agent_entitlement": {"default": false, "title": "Has Active Agent Entitlement", "type": "boolean"}}, "required": ["organization_id"], "title": "BillingStatusResponse", "type": "object"}, "PendingPlanChangeSummary": {"description": "Summary of a pending plan change.", "properties": {"new_plan_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "New Plan Name"}, "new_plan_lookup_key": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "New Plan Lookup Key"}, "effective_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Effective At"}, "action": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Action"}}, "title": "PendingPlanChangeSummary", "type": "object"}, "StripeInvoiceSummary": {"description": "Summary of a Stripe invoice.", "properties": {"id": {"title": "Id", "type": "string"}, "status": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Status"}, "created": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Created"}, "hosted_invoice_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Hosted Invoice Url"}, "invoice_pdf": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Invoice Pdf"}, "amount_due": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Amount Due"}, "amount_paid": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Amount Paid"}, "currency": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Currency"}}, "required": ["id"], "title": "StripeInvoiceSummary", "type": "object"}, "StripePaymentMethodSummary": {"description": "Summary of a Stripe payment method.", "properties": {"brand": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Brand"}, "last4": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last4"}, "exp_month": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Exp Month"}, "exp_year": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Exp Year"}, "billing_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Billing Name"}, "billing_email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Billing Email"}}, "title": "StripePaymentMethodSummary", "type": "object"}, "StripeSubscriptionItemSummary": {"description": "Summary of a Stripe subscription item.", "properties": {"price_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Price Id"}, "lookup_key": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Lookup Key"}, "product_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Product Name"}, "unit_amount": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Unit Amount"}, "currency": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Currency"}, "interval": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Interval"}, "quantity": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Quantity"}}, "title": "StripeSubscriptionItemSummary", "type": "object"}, "StripeSubscriptionSummary": {"description": "Summary of a Stripe subscription.", "properties": {"id": {"title": "Id", "type": "string"}, "status": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Status"}, "cancel_at_period_end": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Cancel At Period End"}, "current_period_start": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Current Period Start"}, "current_period_end": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Current Period End"}, "trial_end": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Trial End"}, "items": {"default": [], "items": {"$ref": "#/components/schemas/StripeSubscriptionItemSummary"}, "title": "Items", "type": "array"}}, "required": ["id"], "title": "StripeSubscriptionSummary", "type": "object"}, "StripeSummaryResponse": {"description": "Complete Stripe billing summary for a customer.", "properties": {"customer_id": {"title": "Customer Id", "type": "string"}, "email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Email"}, "default_payment_method": {"anyOf": [{"$ref": "#/components/schemas/StripePaymentMethodSummary"}, {"type": "null"}]}, "subscription": {"anyOf": [{"$ref": "#/components/schemas/StripeSubscriptionSummary"}, {"type": "null"}]}, "agent_subscription": {"anyOf": [{"$ref": "#/components/schemas/StripeSubscriptionSummary"}, {"type": "null"}]}, "invoices": {"default": [], "items": {"$ref": "#/components/schemas/StripeInvoiceSummary"}, "title": "Invoices", "type": "array"}, "pending_plan_change": {"anyOf": [{"$ref": "#/components/schemas/PendingPlanChangeSummary"}, {"type": "null"}]}, "upcoming_invoice_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Upcoming Invoice At"}}, "required": ["customer_id"], "title": "StripeSummaryResponse", "type": "object"}, "ListInvoicesResponse": {"description": "Paginated list of invoices.", "properties": {"items": {"items": {"$ref": "#/components/schemas/StripeInvoiceSummary"}, "title": "Items", "type": "array"}, "has_more": {"default": false, "title": "Has More", "type": "boolean"}, "next_cursor": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Next Cursor"}, "prev_cursor": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Prev Cursor"}}, "required": ["items"], "title": "ListInvoicesResponse", "type": "object"}, "SchedulePlanChangeResponse": {"description": "Response containing scheduled plan change details.", "properties": {"schedule_id": {"title": "Schedule Id", "type": "string"}, "effective_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Effective At"}}, "required": ["schedule_id"], "title": "SchedulePlanChangeResponse", "type": "object"}, "SchedulePlanChangeRequest": {"description": "Request for scheduling a plan change.", "properties": {"price_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Price Id"}, "price_lookup_key": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Price Lookup Key"}}, "title": "SchedulePlanChangeRequest", "type": "object"}, "OkResponse": {"description": "Simple ok response.", "properties": {"ok": {"default": true, "title": "Ok", "type": "boolean"}}, "title": "OkResponse", "type": "object"}, "UpdateSeatsRequest": {"description": "Request for updating subscription seats.", "properties": {"quantity": {"title": "Quantity", "type": "integer"}}, "required": ["quantity"], "title": "UpdateSeatsRequest", "type": "object"}, "CancelAtPeriodEndItem": {"description": "Result of canceling a subscription at period end.", "properties": {"subscription_id": {"title": "Subscription Id", "type": "string"}, "cancel_at_period_end": {"title": "Cancel At Period End", "type": "boolean"}, "error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error"}, "schedule_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Schedule Id"}, "schedule_cancelled": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Schedule Cancelled"}, "schedule_error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Schedule Error"}}, "required": ["subscription_id", "cancel_at_period_end"], "title": "CancelAtPeriodEndItem", "type": "object"}, "CancelAtPeriodEndResponse": {"description": "Response for subscription cancellation requests.", "properties": {"items": {"items": {"$ref": "#/components/schemas/CancelAtPeriodEndItem"}, "title": "Items", "type": "array"}}, "required": ["items"], "title": "CancelAtPeriodEndResponse", "type": "object"}, "ResumeSubscriptionItem": {"description": "Result of resuming a subscription.", "properties": {"subscription_id": {"title": "Subscription Id", "type": "string"}, "cancel_at_period_end": {"title": "Cancel At Period End", "type": "boolean"}, "error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error"}, "schedule_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Schedule Id"}, "schedule_released": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Schedule Released"}, "schedule_error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Schedule Error"}}, "required": ["subscription_id", "cancel_at_period_end"], "title": "ResumeSubscriptionItem", "type": "object"}, "ResumeSubscriptionsResponse": {"description": "Response for subscription resume requests.", "properties": {"items": {"items": {"$ref": "#/components/schemas/ResumeSubscriptionItem"}, "title": "Items", "type": "array"}}, "required": ["items"], "title": "ResumeSubscriptionsResponse", "type": "object"}, "ReceivedResponse": {"description": "Simple received acknowledgement.", "properties": {"received": {"title": "Received", "type": "boolean"}}, "required": ["received"], "title": "ReceivedResponse", "type": "object"}, "VercelInstallationRead": {"description": "Schema for reading Vercel installation information.", "properties": {"id": {"title": "Id", "type": "integer"}, "organization_id": {"title": "Organization Id", "type": "integer"}, "organization_name": {"title": "Organization Name", "type": "string"}, "connected_by_user_id": {"title": "Connected By User Id", "type": "string"}, "connected_by_username": {"title": "Connected By Username", "type": "string"}, "team_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Team Id"}, "team_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Team Name"}, "username_vercel": {"title": "Username Vercel", "type": "string"}, "email_vercel": {"title": "Email Vercel", "type": "string"}, "is_active": {"title": "Is Active", "type": "boolean"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}}, "required": ["id", "organization_id", "organization_name", "connected_by_user_id", "connected_by_username", "username_vercel", "email_vercel", "is_active", "created_at", "updated_at"], "title": "VercelInstallationRead", "type": "object"}, "VercelInstallationStatus": {"description": "Schema for Vercel installation status for a user's organizations.", "properties": {"user_organizations": {"items": {"$ref": "#/components/schemas/VercelOrganizationStatus"}, "title": "User Organizations", "type": "array"}}, "required": ["user_organizations"], "title": "VercelInstallationStatus", "type": "object"}, "VercelOrganizationStatus": {"description": "Schema for Vercel status of a specific organization.", "properties": {"organization_id": {"title": "Organization Id", "type": "integer"}, "organization_name": {"title": "Organization Name", "type": "string"}, "is_connected": {"title": "Is Connected", "type": "boolean"}, "can_manage": {"title": "Can Manage", "type": "boolean"}, "installation": {"anyOf": [{"$ref": "#/components/schemas/VercelInstallationRead"}, {"type": "null"}]}}, "required": ["organization_id", "organization_name", "is_connected", "can_manage"], "title": "VercelOrganizationStatus", "type": "object"}, "VercelOAuthStateResponse": {"description": "Schema for OAuth state token response.", "properties": {"state_token": {"description": "Signed state token for OAuth flow", "title": "State Token", "type": "string"}, "expires_in_minutes": {"description": "Token expiration time in minutes", "title": "Expires In Minutes", "type": "integer"}}, "required": ["state_token", "expires_in_minutes"], "title": "VercelOAuthStateResponse", "type": "object"}, "VercelOAuthStateRequest": {"description": "Schema for requesting a new OAuth state token.", "properties": {"organization_id": {"description": "Organization ID to connect", "title": "Organization Id", "type": "integer"}, "redirect_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Optional redirect URL after OAuth", "title": "Redirect Url"}}, "required": ["organization_id"], "title": "VercelOAuthStateRequest", "type": "object"}, "VercelInstallationSummary": {"description": "Compact installation payload returned by OAuth connect flows.", "properties": {"id": {"title": "Id", "type": "integer"}, "username": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Username"}, "email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Email"}, "team_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Team Name"}}, "required": ["id"], "title": "VercelInstallationSummary", "type": "object"}, "VercelOAuthConnectResponse": {"description": "Response for successful Vercel OAuth callback/token exchange.", "properties": {"success": {"title": "Success", "type": "boolean"}, "message": {"title": "Message", "type": "string"}, "installation": {"$ref": "#/components/schemas/VercelInstallationSummary"}}, "required": ["success", "message", "installation"], "title": "VercelOAuthConnectResponse", "type": "object"}, "VercelOAuthTokenRequest": {"description": "Schema for OAuth token exchange request.", "properties": {"code": {"description": "OAuth authorization code", "title": "Code", "type": "string"}, "state": {"description": "OAuth state parameter", "title": "State", "type": "string"}}, "required": ["code", "state"], "title": "VercelOAuthTokenRequest", "type": "object"}, "VercelDisconnectResponse": {"description": "Response for successful Vercel disconnect operation.", "properties": {"success": {"title": "Success", "type": "boolean"}, "message": {"title": "Message", "type": "string"}}, "required": ["success", "message"], "title": "VercelDisconnectResponse", "type": "object"}, "VercelDisconnectRequest": {"description": "Schema for Vercel disconnect request.", "properties": {"organization_id": {"title": "Organization Id", "type": "integer"}}, "required": ["organization_id"], "title": "VercelDisconnectRequest", "type": "object"}, "VercelDeploymentRead": {"description": "Schema for reading Vercel deployment information.", "properties": {"id": {"title": "Id", "type": "integer"}, "deployment_id": {"title": "Deployment Id", "type": "string"}, "deployment_url": {"title": "Deployment Url", "type": "string"}, "project_name": {"title": "Project Name", "type": "string"}, "project_id": {"title": "Project Id", "type": "string"}, "git_branch": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Git Branch"}, "git_commit_sha": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Git Commit Sha"}, "git_commit_message": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Git Commit Message"}, "git_repo_owner": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Git Repo Owner"}, "git_repo_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Git Repo Name"}, "deployment_state": {"title": "Deployment State", "type": "string"}, "deployment_ready_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Deployment Ready At"}, "is_production": {"title": "Is Production", "type": "boolean"}, "notified_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Notified At"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}}, "required": ["id", "deployment_id", "deployment_url", "project_name", "project_id", "deployment_state", "is_production", "created_at", "updated_at"], "title": "VercelDeploymentRead", "type": "object"}, "VercelWebhookResponse": {"description": "Webhook acknowledgement response.", "properties": {"received": {"title": "Received", "type": "boolean"}, "processed": {"title": "Processed", "type": "boolean"}}, "required": ["received", "processed"], "title": "VercelWebhookResponse", "type": "object"}, "VercelWebhookHealthResponse": {"description": "Webhook health response.", "properties": {"status": {"title": "Status", "type": "string"}, "service": {"title": "Service", "type": "string"}}, "required": ["status", "service"], "title": "VercelWebhookHealthResponse", "type": "object"}, "WaitlistSignupResponse": {"description": "Response schema for waitlist signup.", "properties": {"message": {"title": "Message", "type": "string"}}, "required": ["message"], "title": "WaitlistSignupResponse", "type": "object"}, "WaitlistSignupRequest": {"description": "Request schema for waitlist signup.", "properties": {"email": {"format": "email", "title": "Email", "type": "string"}, "source": {"anyOf": [{"type": "string"}, {"type": "null"}], "default": "unknown", "title": "Source"}, "client_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Client Id"}, "turnstile_token": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Turnstile Token"}}, "required": ["email"], "title": "WaitlistSignupRequest", "type": "object"}, "SupportTicketResponse": {"description": "Response schema for support ticket creation.", "properties": {"id": {"title": "Id", "type": "string"}, "message": {"title": "Message", "type": "string"}}, "required": ["id", "message"], "title": "SupportTicketResponse", "type": "object"}, "SupportTicketCreate": {"description": "Request schema for creating a support ticket.", "properties": {"name": {"title": "Name", "type": "string"}, "email": {"format": "email", "title": "Email", "type": "string"}, "subject": {"title": "Subject", "type": "string"}, "message": {"title": "Message", "type": "string"}, "captcha_token": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Captcha Token"}}, "required": ["name", "email", "subject", "message"], "title": "SupportTicketCreate", "type": "object"}, "UpdateFileBatchResponse": {"description": "Response for batch file updates.", "properties": {"success": {"title": "Success", "type": "boolean"}, "message": {"title": "Message", "type": "string"}, "pr_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Pr Url"}, "updated_files": {"items": {"type": "string"}, "title": "Updated Files", "type": "array"}}, "required": ["success", "message"], "title": "UpdateFileBatchResponse", "type": "object"}, "UpdateFileBatchRequest": {"description": "Request for batch file updates.", "properties": {"github_repo_name": {"title": "Github Repo Name", "type": "string"}, "changes": {"items": {"$ref": "#/components/schemas/Change"}, "title": "Changes", "type": "array"}, "github_branch_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Github Branch Name"}, "github_base_branch_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Github Base Branch Name"}, "github_pr_branch_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Github Pr Branch Name"}, "commit_message": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Commit Message"}}, "required": ["github_repo_name", "changes"], "title": "UpdateFileBatchRequest", "type": "object"}, "FileContentResponse": {"description": "Response containing file content.", "properties": {"file_path": {"title": "File Path", "type": "string"}, "content": {"title": "Content", "type": "string"}, "sha": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Sha"}}, "required": ["file_path", "content"], "title": "FileContentResponse", "type": "object"}, "FileContentRequest": {"description": "Request for getting file content.", "properties": {"repo_name": {"title": "Repo Name", "type": "string"}, "file_path": {"title": "File Path", "type": "string"}, "branch_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Branch Name"}}, "required": ["repo_name", "file_path"], "title": "FileContentRequest", "type": "object"}, "DeploymentState": {"description": "GitHub webhook event types we handle.", "enum": ["unsaved", "committed", "deployment_started", "deployment_failed", "deployment_completed"], "title": "DeploymentState", "type": "string"}, "PreviewResponse": {"description": "Response containing preview URL.", "properties": {"preview_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Preview Url"}, "commit_date": {"format": "date-time", "title": "Commit Date", "type": "string"}, "state": {"$ref": "#/components/schemas/DeploymentState"}, "commit_hash": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Commit Hash"}}, "required": ["commit_date", "state"], "title": "PreviewResponse", "type": "object"}, "PreviewRequest": {"description": "Request for getting preview URL.", "properties": {"repo_name": {"title": "Repo Name", "type": "string"}, "branch_name": {"title": "Branch Name", "type": "string"}}, "required": ["repo_name", "branch_name"], "title": "PreviewRequest", "type": "object"}, "DeleteResponse": {"description": "Response for branch deletion.", "properties": {"success": {"title": "Success", "type": "boolean"}, "branch_name": {"title": "Branch Name", "type": "string"}}, "required": ["success", "branch_name"], "title": "DeleteResponse", "type": "object"}, "DeleteRequest": {"description": "Request for deleting a branch.", "properties": {"repo_name": {"title": "Repo Name", "type": "string"}, "branch_name": {"title": "Branch Name", "type": "string"}}, "required": ["repo_name", "branch_name"], "title": "DeleteRequest", "type": "object"}, "GetChangesResponse": {"description": "Schema for the response from the get-changes endpoint.", "properties": {"success": {"title": "Success", "type": "boolean"}, "message": {"title": "Message", "type": "string"}, "updated_files": {"additionalProperties": {"type": "string"}, "title": "Updated Files", "type": "object"}}, "required": ["success", "message", "updated_files"], "title": "GetChangesResponse", "type": "object"}, "ElementChange": {"description": "Schema for individual element changes within a file.", "properties": {"style_changes": {"anyOf": [{"items": {"$ref": "#/components/schemas/StyleChange"}, "type": "array"}, {"type": "null"}], "title": "Style Changes"}, "text_changes": {"anyOf": [{"items": {"$ref": "#/components/schemas/TextChange"}, "type": "array"}, {"type": "null"}], "title": "Text Changes"}, "move_changes": {"anyOf": [{"items": {"$ref": "#/components/schemas/MoveChange"}, "type": "array"}, {"type": "null"}], "title": "Move Changes"}, "target_element": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Target Element"}}, "title": "ElementChange", "type": "object"}, "FileChangeItem": {"description": "Schema for file changes with grouped element changes.", "properties": {"encoded_location": {"title": "Encoded Location", "type": "string"}, "file_content": {"title": "File Content", "type": "string"}, "changes": {"items": {"$ref": "#/components/schemas/ElementChange"}, "title": "Changes", "type": "array"}, "browser_width": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Browser Width"}, "browser_height": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Browser Height"}}, "required": ["encoded_location", "file_content", "changes"], "title": "FileChangeItem", "type": "object"}, "GetChangesRequest": {"description": "Schema for getting LLM changes for multiple files.", "properties": {"github_repo_name": {"title": "Github Repo Name", "type": "string"}, "file_changes": {"items": {"$ref": "#/components/schemas/FileChangeItem"}, "title": "File Changes", "type": "array"}, "additional_context": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Additional Context"}}, "required": ["github_repo_name", "file_changes"], "title": "GetChangesRequest", "type": "object"}, "GetAgentChangesResponse": {"description": "Schema for get-agent-changes response.", "properties": {"success": {"title": "Success", "type": "boolean"}, "message": {"title": "Message", "type": "string"}, "updated_files": {"additionalProperties": {"type": "string"}, "title": "Updated Files", "type": "object"}}, "required": ["success", "message", "updated_files"], "title": "GetAgentChangesResponse", "type": "object"}, "GetAgentChangesRequest": {"description": "Schema for getting agent-based changes.", "properties": {"encoded_location": {"title": "Encoded Location", "type": "string"}, "file_content": {"title": "File Content", "type": "string"}, "github_repo_name": {"title": "Github Repo Name", "type": "string"}, "user_instruction": {"title": "User Instruction", "type": "string"}, "branch_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Branch Name"}, "additional_context": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Additional Context"}}, "required": ["encoded_location", "file_content", "github_repo_name", "user_instruction"], "title": "GetAgentChangesRequest", "type": "object"}, "AgentChangesCommitRequest": {"description": "Schema for committing agent-based changes to GitHub.", "properties": {"encoded_location": {"title": "Encoded Location", "type": "string"}, "github_repo_name": {"title": "Github Repo Name", "type": "string"}, "user_instruction": {"title": "User Instruction", "type": "string"}, "additional_context": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Additional Context"}, "github_branch_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Github Branch Name"}, "github_base_branch_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Github Base Branch Name"}, "github_pr_branch_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Github Pr Branch Name"}, "commit_message": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Commit Message"}}, "required": ["encoded_location", "github_repo_name", "user_instruction"], "title": "AgentChangesCommitRequest", "type": "object"}, "AnalyzeRepoStyleResponse": {"description": "Schema for the response from analyze repository style endpoint.\n\nAgent-based analysis runs asynchronously. When a fresh cache entry exists\nthe endpoint returns it inline (status=\"cached\"); otherwise it dispatches\nthe analysis task and returns immediately (status=\"queued\") so clients\ncan poll for the cached field to update.", "properties": {"success": {"title": "Success", "type": "boolean"}, "message": {"title": "Message", "type": "string"}, "repository_name": {"title": "Repository Name", "type": "string"}, "branch": {"title": "Branch", "type": "string"}, "status": {"default": "cached", "title": "Status", "type": "string"}, "total_files": {"default": 0, "title": "Total Files", "type": "integer"}, "analysis": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Analysis"}}, "required": ["success", "message", "repository_name", "branch"], "title": "AnalyzeRepoStyleResponse", "type": "object"}, "AnalyzeRepoStyleRequest": {"description": "Schema for analyzing repository styling conventions.", "properties": {"repository_name": {"title": "Repository Name", "type": "string"}, "branch": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Branch"}}, "required": ["repository_name"], "title": "AnalyzeRepoStyleRequest", "type": "object"}, "SlackInstallResponse": {"description": "Response with Slack OAuth URL.", "properties": {"oauth_url": {"description": "URL to redirect user to for Slack OAuth", "title": "Oauth Url", "type": "string"}, "state": {"description": "OAuth state token for verification", "title": "State", "type": "string"}}, "required": ["oauth_url", "state"], "title": "SlackInstallResponse", "type": "object"}, "SlackInstallRequest": {"description": "Request to initiate Slack OAuth installation.", "properties": {"organization_id": {"description": "Organization to install Slack for", "format": "uuid", "title": "Organization Id", "type": "string"}, "return_to": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Optional URL to redirect to after OAuth completes", "title": "Return To"}}, "required": ["organization_id"], "title": "SlackInstallRequest", "type": "object"}, "SlackInstallationResponse": {"description": "Response with Slack installation details.", "properties": {"id": {"title": "Id", "type": "integer"}, "organization_id": {"title": "Organization Id", "type": "string"}, "team_id": {"title": "Team Id", "type": "string"}, "team_name": {"title": "Team Name", "type": "string"}, "is_active": {"title": "Is Active", "type": "boolean"}, "connected_at": {"format": "date-time", "title": "Connected At", "type": "string"}, "connected_by_email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Connected By Email"}}, "required": ["id", "organization_id", "team_id", "team_name", "is_active", "connected_at"], "title": "SlackInstallationResponse", "type": "object"}, "SlackStatusResponse": {"description": "Response with Slack installation status for user's organizations.", "properties": {"installations": {"items": {"$ref": "#/components/schemas/SlackInstallationResponse"}, "title": "Installations", "type": "array"}}, "required": ["installations"], "title": "SlackStatusResponse", "type": "object"}, "SlackDisconnectResponse": {"description": "Response after disconnecting Slack.", "properties": {"success": {"title": "Success", "type": "boolean"}, "message": {"title": "Message", "type": "string"}}, "required": ["success", "message"], "title": "SlackDisconnectResponse", "type": "object"}, "SlackDisconnectRequest": {"description": "Request to disconnect Slack from organization.", "properties": {"team_id": {"description": "Slack workspace ID to disconnect", "title": "Team Id", "type": "string"}}, "required": ["team_id"], "title": "SlackDisconnectRequest", "type": "object"}, "SlackLinkStatusResponse": {"description": "Response with user's Slack link status.", "properties": {"is_linked": {"title": "Is Linked", "type": "boolean"}, "links": {"items": {"additionalProperties": true, "type": "object"}, "title": "Links", "type": "array"}}, "required": ["is_linked"], "title": "SlackLinkStatusResponse", "type": "object"}, "SlackLinkCompleteRequest": {"description": "Request to complete Slack user linking.", "properties": {"state": {"description": "OAuth state token for linking", "title": "State", "type": "string"}}, "required": ["state"], "title": "SlackLinkCompleteRequest", "type": "object"}, "SlackNotificationPreferenceResponse": {"description": "Response with user's Slack notification preferences.", "properties": {"notify_on_user_question": {"default": true, "title": "Notify On User Question", "type": "boolean"}, "notify_on_turn_complete": {"default": true, "title": "Notify On Turn Complete", "type": "boolean"}}, "title": "SlackNotificationPreferenceResponse", "type": "object"}, "SlackNotificationPreferenceUpdate": {"description": "Request to update notification preferences.", "properties": {"notify_on_user_question": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Notify On User Question"}, "notify_on_turn_complete": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Notify On Turn Complete"}}, "title": "SlackNotificationPreferenceUpdate", "type": "object"}, "SlackWebhookResponse": {"description": "Webhook acknowledgement or Slack URL verification challenge.", "properties": {"ok": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Ok"}, "challenge": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Challenge"}}, "title": "SlackWebhookResponse", "type": "object"}, "AgentSlackIdentityStartResponse": {"description": "Response with the Slack OAuth authorize URL for the popup.", "properties": {"authorization_url": {"description": "Open this in a popup. Slack guides the user through (or login + consent) and redirects back to our callback.", "title": "Authorization Url", "type": "string"}}, "required": ["authorization_url"], "title": "AgentSlackIdentityStartResponse", "type": "object"}, "AgentSlackIdentityStartRequest": {"description": "Request to start the per-agent Slack user OAuth flow.", "properties": {"agent_teammate_id": {"description": "AgentTeammate that should gain a Slack identity", "format": "uuid", "title": "Agent Teammate Id", "type": "string"}}, "required": ["agent_teammate_id"], "title": "AgentSlackIdentityStartRequest", "type": "object"}, "AgentSlackAccountSummary": {"description": "Per-agent Slack identity record exposed to the frontend.", "properties": {"id": {"title": "Id", "type": "integer"}, "slack_team_id": {"title": "Slack Team Id", "type": "string"}, "slack_team_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Slack Team Name"}, "slack_user_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Slack User Id"}, "slack_email": {"title": "Slack Email", "type": "string"}, "slack_display_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Slack Display Name"}, "status": {"title": "Status", "type": "string"}, "invite_received_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Invite Received At"}, "signup_completed_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Signup Completed At"}, "last_event_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Last Event At"}}, "required": ["id", "slack_team_id", "slack_email", "status"], "title": "AgentSlackAccountSummary", "type": "object"}, "AgentSlackIdentityStatusResponse": {"description": "All Slack identities (one per workspace) for an AgentTeammate.", "properties": {"accounts": {"items": {"$ref": "#/components/schemas/AgentSlackAccountSummary"}, "title": "Accounts", "type": "array"}}, "required": ["accounts"], "title": "AgentSlackIdentityStatusResponse", "type": "object"}, "StagingEnvironment": {"description": "A selectable staging backend target.", "properties": {"namespace": {"title": "Namespace", "type": "string"}, "label": {"title": "Label", "type": "string"}, "api_base_url": {"title": "Api Base Url", "type": "string"}, "branch": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Branch"}, "repo": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Repo"}, "current": {"default": false, "title": "Current", "type": "boolean"}}, "required": ["namespace", "label", "api_base_url"], "title": "StagingEnvironment", "type": "object"}, "StagingEnvironmentsResponse": {"description": "Available staging backend targets.", "properties": {"environments": {"items": {"$ref": "#/components/schemas/StagingEnvironment"}, "title": "Environments", "type": "array"}}, "required": ["environments"], "title": "StagingEnvironmentsResponse", "type": "object"}, "StagingNamespacePartialTeardownResponse": {"description": "Acknowledgment for an asynchronously queued partial teardown.", "properties": {"namespace": {"title": "Namespace", "type": "string"}, "status": {"const": "partial_queued", "default": "partial_queued", "title": "Status", "type": "string"}}, "required": ["namespace"], "title": "StagingNamespacePartialTeardownResponse", "type": "object"}, "GlobalProviderKeyResponse": {"description": "A configured global provider credential (token values are never returned).", "properties": {"provider": {"title": "Provider", "type": "string"}, "credential_type": {"enum": ["api_key", "oauth"], "title": "Credential Type", "type": "string"}, "is_active": {"title": "Is Active", "type": "boolean"}, "has_refresh_token": {"title": "Has Refresh Token", "type": "boolean"}, "expires_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Expires At"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}}, "required": ["provider", "credential_type", "is_active", "has_refresh_token", "created_at", "updated_at"], "title": "GlobalProviderKeyResponse", "type": "object"}, "SetGlobalProviderKeyRequest": {"description": "Set the single deployment-wide provider credential used as a BYOS fallback.", "properties": {"provider": {"enum": ["openai", "anthropic"], "title": "Provider", "type": "string"}, "api_key": {"title": "Api Key", "type": "string"}, "credential_type": {"default": "oauth", "enum": ["api_key", "oauth"], "title": "Credential Type", "type": "string"}, "refresh_token": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Refresh Token"}, "expires_at": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Expires At"}, "is_active": {"default": true, "title": "Is Active", "type": "boolean"}}, "required": ["provider", "api_key"], "title": "SetGlobalProviderKeyRequest", "type": "object"}, "GlobalProviderKeyListResponse": {"description": "All configured global provider credentials.", "properties": {"keys": {"items": {"$ref": "#/components/schemas/GlobalProviderKeyResponse"}, "title": "Keys", "type": "array"}, "enabled": {"title": "Enabled", "type": "boolean"}}, "required": ["keys", "enabled"], "title": "GlobalProviderKeyListResponse", "type": "object"}, "GlobalProviderKeyMessageResponse": {"properties": {"message": {"title": "Message", "type": "string"}}, "required": ["message"], "title": "GlobalProviderKeyMessageResponse", "type": "object"}, "GlobalOpenAIDeviceAuthStartRequest": {"description": "Start OpenAI device auth for a global staging BYOS credential.", "properties": {"organization_id": {"format": "uuid", "title": "Organization Id", "type": "string"}}, "required": ["organization_id"], "title": "GlobalOpenAIDeviceAuthStartRequest", "type": "object"}, "AvailableService": {"description": "One service the wizard exposes as a toggle, with its required scopes.", "properties": {"key": {"title": "Key", "type": "string"}, "name": {"title": "Name", "type": "string"}, "description": {"title": "Description", "type": "string"}, "scopes": {"items": {"type": "string"}, "title": "Scopes", "type": "array"}}, "required": ["key", "name", "description"], "title": "AvailableService", "type": "object"}, "SetupInfoResponse": {"description": "Deprecated DWD setup config shape kept for API compatibility.", "properties": {"client_id": {"title": "Client Id", "type": "string"}, "admin_console_url": {"default": "https://admin.google.com/ac/owl/domainwidedelegation", "title": "Admin Console Url", "type": "string"}, "available_services": {"items": {"$ref": "#/components/schemas/AvailableService"}, "title": "Available Services", "type": "array"}}, "required": ["client_id"], "title": "SetupInfoResponse", "type": "object"}, "ConnectResponse": {"description": "Deprecated Google Workspace DWD connect response shape.", "properties": {"success": {"title": "Success", "type": "boolean"}, "status": {"title": "Status", "type": "string"}, "message": {"title": "Message", "type": "string"}, "verification_error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Verification Error"}}, "required": ["success", "status", "message"], "title": "ConnectResponse", "type": "object"}, "ConnectRequest": {"description": "Deprecated request to connect Google Workspace DWD for an organization.", "properties": {"organization_id": {"format": "uuid", "title": "Organization Id", "type": "string"}, "workspace_domain": {"description": "Google Workspace domain", "minLength": 3, "title": "Workspace Domain", "type": "string"}, "test_email": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Email to use for verification (defaults to admin@domain)", "title": "Test Email"}, "enabled_services": {"description": "List of Google service names to enable (e.g., ['calendar', 'drive'])", "items": {"type": "string"}, "title": "Enabled Services", "type": "array"}, "custom_scopes": {"description": "Extra OAuth scope URLs (e.g. 'https://www.googleapis.com/auth/admin.directory.user') unioned with the scopes derived from enabled_services.", "items": {"type": "string"}, "title": "Custom Scopes", "type": "array"}}, "required": ["organization_id", "workspace_domain"], "title": "ConnectRequest", "type": "object"}, "StatusResponse": {"description": "Response containing a status string.", "properties": {"status": {"title": "Status", "type": "string"}}, "required": ["status"], "title": "StatusResponse", "type": "object"}, "VerifyResponse": {"description": "Deprecated Google Workspace DWD verify response shape.", "properties": {"success": {"title": "Success", "type": "boolean"}, "message": {"title": "Message", "type": "string"}, "verification_error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Verification Error"}}, "required": ["success", "message"], "title": "VerifyResponse", "type": "object"}, "DisconnectResponse": {"description": "Response after disconnecting Google Workspace.", "properties": {"success": {"title": "Success", "type": "boolean"}, "message": {"title": "Message", "type": "string"}}, "required": ["success", "message"], "title": "DisconnectResponse", "type": "object"}, "UpdateServicesResponse": {"description": "Deprecated Google Workspace DWD service-update response shape.", "properties": {"success": {"title": "Success", "type": "boolean"}, "enabled_services": {"items": {"type": "string"}, "title": "Enabled Services", "type": "array"}, "custom_scopes": {"items": {"type": "string"}, "title": "Custom Scopes", "type": "array"}, "scopes": {"title": "Scopes", "type": "string"}, "message": {"title": "Message", "type": "string"}}, "required": ["success", "enabled_services", "scopes", "message"], "title": "UpdateServicesResponse", "type": "object"}, "UpdateServicesRequest": {"description": "Deprecated request to update enabled Google Workspace DWD services.", "properties": {"enabled_services": {"description": "List of Google service names to enable", "items": {"type": "string"}, "title": "Enabled Services", "type": "array"}, "custom_scopes": {"description": "Extra OAuth scope URLs unioned with enabled_services scopes.", "items": {"type": "string"}, "title": "Custom Scopes", "type": "array"}}, "required": ["enabled_services"], "title": "UpdateServicesRequest", "type": "object"}, "MCPSidecarActivationResponse": {"description": "Activation payload returned to the trusted MCP sidecar.", "properties": {"session_id": {"title": "Session Id", "type": "string"}, "org_id": {"title": "Org Id", "type": "string"}, "user_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "User Id"}, "mcp_server_id": {"title": "Mcp Server Id", "type": "integer"}, "instance_id": {"title": "Instance Id", "type": "integer"}, "display_name": {"title": "Display Name", "type": "string"}, "execution_type": {"title": "Execution Type", "type": "string"}, "package_or_image": {"title": "Package Or Image", "type": "string"}, "version": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Version"}, "args": {"items": {"type": "string"}, "title": "Args", "type": "array"}, "env_vars": {"additionalProperties": {"type": "string"}, "title": "Env Vars", "type": "object"}, "credential_files": {"additionalProperties": {"type": "string"}, "title": "Credential Files", "type": "object"}, "auth_header": {"title": "Auth Header", "type": "string"}, "isolated_cli_command_names": {"items": {"type": "string"}, "title": "Isolated Cli Command Names", "type": "array"}}, "required": ["session_id", "org_id", "mcp_server_id", "instance_id", "display_name", "execution_type", "package_or_image", "auth_header"], "title": "MCPSidecarActivationResponse", "type": "object"}, "MCPSidecarActivationRequest": {"description": "Request payload for sidecar-issued executable MCP activation.", "properties": {"mcp_server_id": {"title": "Mcp Server Id", "type": "integer"}, "env_overrides": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"type": "null"}], "title": "Env Overrides"}}, "required": ["mcp_server_id"], "title": "MCPSidecarActivationRequest", "type": "object"}, "MCPSidecarToolsRecordResponse": {"description": "Acknowledgement for sidecar-recorded executable MCP tool metadata.", "properties": {"ok": {"default": true, "title": "Ok", "type": "boolean"}, "updated": {"default": false, "title": "Updated", "type": "boolean"}, "tool_count": {"default": 0, "title": "Tool Count", "type": "integer"}, "embedding_count": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Embedding Count"}, "embedding_error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Embedding Error"}}, "title": "MCPSidecarToolsRecordResponse", "type": "object"}, "MCPSidecarToolsRecordRequest": {"description": "Tool catalog payload observed by the trusted sidecar stdio broker.", "properties": {"mcp_server_id": {"title": "Mcp Server Id", "type": "integer"}, "tools": {"items": {"additionalProperties": true, "type": "object"}, "title": "Tools", "type": "array"}}, "required": ["mcp_server_id"], "title": "MCPSidecarToolsRecordRequest", "type": "object"}, "MCPAttachedSkillRead": {"description": "A skill pack entry attached to an MCP server.", "properties": {"slug": {"title": "Slug", "type": "string"}, "name": {"title": "Name", "type": "string"}, "description": {"title": "Description", "type": "string"}, "content_markdown": {"title": "Content Markdown", "type": "string"}, "required_capabilities": {"default": [], "items": {"type": "string"}, "title": "Required Capabilities", "type": "array"}, "sort_order": {"default": 0, "title": "Sort Order", "type": "integer"}, "is_active": {"default": true, "title": "Is Active", "type": "boolean"}}, "required": ["slug", "name", "description", "content_markdown"], "title": "MCPAttachedSkillRead", "type": "object"}, "MCPAuthType": {"description": "Authentication types for MCP servers.", "enum": ["none", "api_key", "oauth"], "title": "MCPAuthType", "type": "string"}, "MCPCredentialFieldDefinition": {"description": "Rich metadata describing how to render a credential field.", "properties": {"key": {"title": "Key", "type": "string"}, "label": {"title": "Label", "type": "string"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "input_type": {"default": "secret", "enum": ["text", "secret", "textarea", "multiselect"], "title": "Input Type", "type": "string"}, "options": {"items": {"$ref": "#/components/schemas/MCPCredentialFieldOption"}, "title": "Options", "type": "array"}}, "required": ["key", "label"], "title": "MCPCredentialFieldDefinition", "type": "object"}, "MCPCredentialFieldOption": {"description": "Selectable option for a credential field.", "properties": {"value": {"title": "Value", "type": "string"}, "label": {"title": "Label", "type": "string"}}, "required": ["value", "label"], "title": "MCPCredentialFieldOption", "type": "object"}, "MCPOAuthProvider": {"description": "OAuth provider keys for first-party MCP OAuth flows.", "enum": ["google", "figma", "microsoft"], "title": "MCPOAuthProvider", "type": "string"}, "MCPServerListRead": {"description": "Schema for listing global MCP servers.", "properties": {"id": {"title": "Id", "type": "integer"}, "name": {"title": "Name", "type": "string"}, "url": {"title": "Url", "type": "string"}, "transport_type": {"$ref": "#/components/schemas/MCPTransportType"}, "auth_type": {"$ref": "#/components/schemas/MCPAuthType"}, "oauth_provider": {"anyOf": [{"$ref": "#/components/schemas/MCPOAuthProvider"}, {"type": "null"}]}, "oauth_service": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Oauth Service"}, "required_scopes": {"default": [], "items": {"type": "string"}, "title": "Required Scopes", "type": "array"}, "supports_oauth_connect": {"default": false, "title": "Supports Oauth Connect", "type": "boolean"}, "oauth_connect_label": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Oauth Connect Label"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "setup_instructions": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Setup Instructions"}, "attached_skills": {"default": [], "items": {"$ref": "#/components/schemas/MCPAttachedSkillRead"}, "title": "Attached Skills", "type": "array"}, "tools_count": {"default": 0, "title": "Tools Count", "type": "integer"}, "resources_count": {"default": 0, "title": "Resources Count", "type": "integer"}, "is_oauth_configured": {"default": false, "title": "Is Oauth Configured", "type": "boolean"}, "is_executable": {"default": false, "title": "Is Executable", "type": "boolean"}, "execution_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Execution Type"}, "required_env_vars": {"default": [], "items": {"type": "string"}, "title": "Required Env Vars", "type": "array"}, "static_env_var_keys": {"default": [], "items": {"type": "string"}, "title": "Static Env Var Keys", "type": "array"}, "credential_files": {"additionalProperties": {"type": "string"}, "title": "Credential Files", "type": "object"}, "credential_fields": {"items": {"$ref": "#/components/schemas/MCPCredentialFieldDefinition"}, "title": "Credential Fields", "type": "array"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}}, "required": ["id", "name", "url", "transport_type", "auth_type", "created_at"], "title": "MCPServerListRead", "type": "object"}, "MCPTransportType": {"description": "Transport types supported by MCP protocol.", "enum": ["sse", "streamable_http"], "title": "MCPTransportType", "type": "string"}, "MCPResourceSchema": {"description": "Schema for an MCP resource definition.", "properties": {"uri": {"description": "Resource URI", "title": "Uri", "type": "string"}, "name": {"description": "Resource name", "title": "Name", "type": "string"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Resource description", "title": "Description"}, "mime_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "MIME type of the resource", "title": "Mime Type"}}, "required": ["uri", "name"], "title": "MCPResourceSchema", "type": "object"}, "MCPServerRead": {"description": "Schema for reading a global MCP server definition.", "properties": {"id": {"title": "Id", "type": "integer"}, "name": {"title": "Name", "type": "string"}, "url": {"title": "Url", "type": "string"}, "transport_type": {"$ref": "#/components/schemas/MCPTransportType"}, "auth_type": {"$ref": "#/components/schemas/MCPAuthType"}, "oauth_provider": {"anyOf": [{"$ref": "#/components/schemas/MCPOAuthProvider"}, {"type": "null"}]}, "oauth_service": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Oauth Service"}, "required_scopes": {"default": [], "items": {"type": "string"}, "title": "Required Scopes", "type": "array"}, "supports_oauth_connect": {"default": false, "title": "Supports Oauth Connect", "type": "boolean"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "attached_skills": {"default": [], "items": {"$ref": "#/components/schemas/MCPAttachedSkillRead"}, "title": "Attached Skills", "type": "array"}, "tools": {"default": [], "items": {"$ref": "#/components/schemas/MCPToolSchema"}, "title": "Tools", "type": "array"}, "resources": {"default": [], "items": {"$ref": "#/components/schemas/MCPResourceSchema"}, "title": "Resources", "type": "array"}, "is_oauth_configured": {"default": false, "title": "Is Oauth Configured", "type": "boolean"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}}, "required": ["id", "name", "url", "transport_type", "auth_type", "created_at", "updated_at"], "title": "MCPServerRead", "type": "object"}, "MCPToolSchema": {"description": "Schema for an MCP tool definition.", "properties": {"name": {"description": "Tool name", "title": "Name", "type": "string"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Tool description", "title": "Description"}, "input_schema": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "description": "JSON Schema for tool input", "title": "Input Schema"}}, "required": ["name"], "title": "MCPToolSchema", "type": "object"}, "IntegrationAuthoritySummary": {"description": "Read-only metadata describing whose access backs an integration path.", "properties": {"authority_type": {"$ref": "#/components/schemas/IntegrationAuthorityType"}, "label": {"title": "Label", "type": "string"}, "source": {"title": "Source", "type": "string"}, "owner_user_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Owner User Id"}, "owner_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Owner Name"}, "owner_email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Owner Email"}, "is_default": {"default": false, "title": "Is Default", "type": "boolean"}, "count": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Count"}}, "required": ["authority_type", "label", "source"], "title": "IntegrationAuthoritySummary", "type": "object"}, "IntegrationAuthorityType": {"description": "Product-facing owner of the authority behind an integration.", "enum": ["workspace_owned", "codepress_teammate", "shared_teammate_connection", "private_user_connection"], "title": "IntegrationAuthorityType", "type": "string"}, "MCPDelegationMode": {"description": "Controls who can use the shared org fallback credential.", "enum": ["org", "specific_users"], "title": "MCPDelegationMode", "type": "string"}, "MCPServerStatus": {"description": "Status of an MCP server connection.", "enum": ["active", "inactive", "error"], "title": "MCPServerStatus", "type": "string"}, "OrganizationMCPListRead": {"description": "Schema for listing an org's MCPs.", "properties": {"id": {"title": "Id", "type": "integer"}, "organization_id": {"title": "Organization Id", "type": "string"}, "mcp_server_id": {"title": "Mcp Server Id", "type": "integer"}, "display_name": {"title": "Display Name", "type": "string"}, "mcp_server_url": {"title": "Mcp Server Url", "type": "string"}, "transport_type": {"$ref": "#/components/schemas/MCPTransportType"}, "auth_type": {"$ref": "#/components/schemas/MCPAuthType"}, "oauth_provider": {"anyOf": [{"$ref": "#/components/schemas/MCPOAuthProvider"}, {"type": "null"}]}, "oauth_service": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Oauth Service"}, "custom_scopes": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Custom Scopes"}, "default_scopes": {"items": {"type": "string"}, "title": "Default Scopes", "type": "array"}, "scope_picker_supported": {"default": false, "title": "Scope Picker Supported", "type": "boolean"}, "is_enabled": {"title": "Is Enabled", "type": "boolean"}, "status": {"$ref": "#/components/schemas/MCPServerStatus"}, "tools_count": {"default": 0, "title": "Tools Count", "type": "integer"}, "resources_count": {"default": 0, "title": "Resources Count", "type": "integer"}, "has_any_credentials": {"default": false, "title": "Has Any Credentials", "type": "boolean"}, "has_org_fallback": {"default": false, "title": "Has Org Fallback", "type": "boolean"}, "org_fallback_user_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Org Fallback User Name"}, "has_user_credentials": {"default": false, "title": "Has User Credentials", "type": "boolean"}, "is_user_org_fallback": {"default": false, "title": "Is User Org Fallback", "type": "boolean"}, "user_token_expired": {"default": false, "title": "User Token Expired", "type": "boolean"}, "delegation_mode": {"allOf": [{"$ref": "#/components/schemas/MCPDelegationMode"}], "default": "org"}, "delegate_count": {"default": 0, "title": "Delegate Count", "type": "integer"}, "is_user_delegated": {"default": false, "title": "Is User Delegated", "type": "boolean"}, "shared_credential_count": {"default": 0, "title": "Shared Credential Count", "type": "integer"}, "is_user_sharing": {"default": false, "title": "Is User Sharing", "type": "boolean"}, "user_tenant_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "User Tenant Id"}, "user_tenant_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "User Tenant Name"}, "org_fallback_tenant_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Org Fallback Tenant Id"}, "org_fallback_tenant_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Org Fallback Tenant Name"}, "target_tenant_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Target Tenant Id"}, "target_tenant_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Target Tenant Name"}, "team_access_authority": {"anyOf": [{"$ref": "#/components/schemas/IntegrationAuthoritySummary"}, {"type": "null"}]}, "personal_access_authority": {"anyOf": [{"$ref": "#/components/schemas/IntegrationAuthoritySummary"}, {"type": "null"}]}, "available_authorities": {"items": {"$ref": "#/components/schemas/IntegrationAuthoritySummary"}, "title": "Available Authorities", "type": "array"}, "can_manage": {"default": false, "title": "Can Manage", "type": "boolean"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}}, "required": ["id", "organization_id", "mcp_server_id", "display_name", "mcp_server_url", "transport_type", "auth_type", "is_enabled", "status", "created_at"], "title": "OrganizationMCPListRead", "type": "object"}, "OrganizationMCPRead": {"description": "Schema for reading an org's MCP configuration.", "properties": {"id": {"title": "Id", "type": "integer"}, "organization_id": {"title": "Organization Id", "type": "string"}, "mcp_server_id": {"title": "Mcp Server Id", "type": "integer"}, "mcp_server": {"$ref": "#/components/schemas/MCPServerRead"}, "display_name": {"title": "Display Name", "type": "string"}, "custom_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Custom Name"}, "custom_scopes": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Custom Scopes"}, "default_scopes": {"items": {"type": "string"}, "title": "Default Scopes", "type": "array"}, "scope_picker_supported": {"default": false, "title": "Scope Picker Supported", "type": "boolean"}, "is_enabled": {"title": "Is Enabled", "type": "boolean"}, "status": {"$ref": "#/components/schemas/MCPServerStatus"}, "last_error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last Error"}, "oauth_provider": {"anyOf": [{"$ref": "#/components/schemas/MCPOAuthProvider"}, {"type": "null"}]}, "oauth_service": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Oauth Service"}, "created_by_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By Id"}, "can_manage": {"default": false, "title": "Can Manage", "type": "boolean"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}, "has_any_credentials": {"default": false, "title": "Has Any Credentials", "type": "boolean"}, "has_org_fallback": {"default": false, "title": "Has Org Fallback", "type": "boolean"}, "org_fallback_user_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Org Fallback User Name"}, "user_tenant_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "User Tenant Id"}, "user_tenant_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "User Tenant Name"}, "org_fallback_tenant_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Org Fallback Tenant Id"}, "org_fallback_tenant_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Org Fallback Tenant Name"}, "target_tenant_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Target Tenant Id"}, "target_tenant_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Target Tenant Name"}, "granted_members_count": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Granted Members Count"}, "team_access_authority": {"anyOf": [{"$ref": "#/components/schemas/IntegrationAuthoritySummary"}, {"type": "null"}]}, "personal_access_authority": {"anyOf": [{"$ref": "#/components/schemas/IntegrationAuthoritySummary"}, {"type": "null"}]}, "available_authorities": {"items": {"$ref": "#/components/schemas/IntegrationAuthoritySummary"}, "title": "Available Authorities", "type": "array"}}, "required": ["id", "organization_id", "mcp_server_id", "mcp_server", "display_name", "is_enabled", "status", "created_at", "updated_at"], "title": "OrganizationMCPRead", "type": "object"}, "OrganizationMCPCreate": {"description": "Schema for enabling an MCP for an organization.", "properties": {"mcp_server_id": {"description": "ID of the global MCP server to enable", "title": "Mcp Server Id", "type": "integer"}, "custom_name": {"anyOf": [{"maxLength": 255, "type": "string"}, {"type": "null"}], "description": "Optional custom name for this org", "title": "Custom Name"}, "is_enabled": {"default": true, "description": "Whether the MCP is enabled", "title": "Is Enabled", "type": "boolean"}}, "required": ["mcp_server_id"], "title": "OrganizationMCPCreate", "type": "object"}, "MCPServerQuickAdd": {"description": "Simple schema for quick-adding an MCP server.\n\nLike: claude mcp add --transport http linear https://mcp.linear.app/mcp", "properties": {"transport": {"allOf": [{"$ref": "#/components/schemas/MCPTransportType"}], "default": "sse", "description": "Transport type: 'sse' or 'streamable_http'"}, "url": {"description": "MCP server URL (e.g., https://mcp.linear.app/mcp)", "title": "Url", "type": "string"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Optional name (auto-derived from URL if not provided)", "title": "Name"}}, "required": ["url"], "title": "MCPServerQuickAdd", "type": "object"}, "MCPAttachedSkillUpsert": {"description": "Skill payload for MCP create/update APIs.", "properties": {"slug": {"maxLength": 100, "minLength": 1, "title": "Slug", "type": "string"}, "name": {"maxLength": 255, "minLength": 1, "title": "Name", "type": "string"}, "description": {"minLength": 1, "title": "Description", "type": "string"}, "content_markdown": {"minLength": 1, "title": "Content Markdown", "type": "string"}, "required_capabilities": {"items": {"type": "string"}, "title": "Required Capabilities", "type": "array"}, "sort_order": {"default": 0, "minimum": 0, "title": "Sort Order", "type": "integer"}, "is_active": {"default": true, "title": "Is Active", "type": "boolean"}}, "required": ["slug", "name", "description", "content_markdown"], "title": "MCPAttachedSkillUpsert", "type": "object"}, "MCPExecutableCreate": {"description": "Schema for creating an executable MCP server with its config.", "properties": {"name": {"description": "Display name for the MCP", "maxLength": 255, "minLength": 1, "title": "Name", "type": "string"}, "execution_type": {"allOf": [{"$ref": "#/components/schemas/MCPExecutionTypeSchema"}], "default": "npx", "description": "How to run the MCP server"}, "package_or_image": {"description": "Package name (npx/pip), S3 URL (binary), or image URI (docker)", "maxLength": 500, "minLength": 1, "title": "Package Or Image", "type": "string"}, "docker_image": {"anyOf": [{"maxLength": 500, "type": "string"}, {"type": "null"}], "description": "Custom Docker image URI for ECS. If null, uses default mcp-runner image.", "title": "Docker Image"}, "version": {"anyOf": [{"maxLength": 100, "type": "string"}, {"type": "null"}], "description": "Optional version pin", "title": "Version"}, "args": {"description": "Command line arguments", "items": {"type": "string"}, "title": "Args", "type": "array"}, "required_env_vars": {"description": "Required environment variable names (e.g. LOOKER_CLIENT_ID)", "items": {"type": "string"}, "title": "Required Env Vars", "type": "array"}, "static_env_var_keys": {"description": "Environment variable names sourced from backend runtime env and forwarded to MCP containers", "items": {"type": "string"}, "title": "Static Env Var Keys", "type": "array"}, "credential_files": {"additionalProperties": {"type": "string"}, "description": "Map of env var names to file extensions for file-based credentials", "title": "Credential Files", "type": "object"}, "auth_type": {"allOf": [{"$ref": "#/components/schemas/MCPAuthType"}], "default": "api_key", "description": "Authentication type"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Description of the MCP server", "title": "Description"}, "attached_skills": {"anyOf": [{"items": {"$ref": "#/components/schemas/MCPAttachedSkillUpsert"}, "type": "array"}, {"type": "null"}], "description": "Optional skill pack entries to attach to this executable MCP", "title": "Attached Skills"}}, "required": ["name", "package_or_image"], "title": "MCPExecutableCreate", "type": "object"}, "MCPExecutionTypeSchema": {"description": "Execution types for executable MCP servers.", "enum": ["npx", "pip", "binary", "docker", "script"], "title": "MCPExecutionTypeSchema", "type": "string"}, "OrganizationMCPUpdate": {"description": "Schema for updating an org's MCP configuration.", "properties": {"custom_name": {"anyOf": [{"maxLength": 255, "type": "string"}, {"type": "null"}], "title": "Custom Name"}, "is_enabled": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Enabled"}, "custom_scopes": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "description": "Per-org OAuth scope override. Pass a list of provider-specific scope strings (e.g. Microsoft Graph scopes like 'Mail.Read', 'Calendars.ReadWrite') to override the default scope set for this org only. Pass an empty list to clear the override and revert to defaults. Omit the field to leave it unchanged. A re-auth is required for the new scopes to take effect.", "title": "Custom Scopes"}}, "title": "OrganizationMCPUpdate", "type": "object"}, "MCPCredentialStatus": {"description": "Status of user credentials.", "enum": ["active", "expired", "revoked", "reauthorization_required"], "title": "MCPCredentialStatus", "type": "string"}, "MCPCredentialStatusResponse": {"description": "Response with credential status for current user.", "properties": {"has_personal_credentials": {"description": "Whether the user has their own credentials", "title": "Has Personal Credentials", "type": "boolean"}, "personal_credential_status": {"anyOf": [{"$ref": "#/components/schemas/MCPCredentialStatus"}, {"type": "null"}]}, "is_sharing_with_org": {"default": false, "description": "Whether user is sharing credentials with org", "title": "Is Sharing With Org", "type": "boolean"}, "active_credential_type": {"$ref": "#/components/schemas/MCPCredentialType", "description": "Type of credential that would be used"}, "active_credential_owner_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Active Credential Owner Id"}, "active_credential_owner_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Active Credential Owner Name"}, "active_credential_owner_email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Active Credential Owner Email"}, "needs_authentication": {"description": "Whether user needs to authenticate", "title": "Needs Authentication", "type": "boolean"}, "token_expires_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Token Expires At"}, "needs_refresh": {"default": false, "title": "Needs Refresh", "type": "boolean"}}, "required": ["has_personal_credentials", "active_credential_type", "needs_authentication"], "title": "MCPCredentialStatusResponse", "type": "object"}, "MCPCredentialType": {"description": "Type of credential being used.", "enum": ["user", "org_fallback", "none"], "title": "MCPCredentialType", "type": "string"}, "MCPUserCredentialCreate": {"description": "Schema for creating user credentials (API key auth).", "properties": {"api_key": {"description": "API key for authentication", "title": "Api Key", "type": "string"}}, "required": ["api_key"], "title": "MCPUserCredentialCreate", "type": "object"}, "MCPUserEnvVarsResponse": {"description": "Response after saving user env vars.", "properties": {"success": {"title": "Success", "type": "boolean"}, "message": {"title": "Message", "type": "string"}, "warnings": {"items": {"type": "string"}, "title": "Warnings", "type": "array"}, "prompt_share": {"default": false, "title": "Prompt Share", "type": "boolean"}}, "required": ["success", "message"], "title": "MCPUserEnvVarsResponse", "type": "object"}, "MCPUserEnvVarsCreate": {"description": "Schema for setting user environment variables for an MCP.", "properties": {"env_vars": {"additionalProperties": {"type": "string"}, "description": "Environment variable key-value pairs", "title": "Env Vars", "type": "object"}}, "required": ["env_vars"], "title": "MCPUserEnvVarsCreate", "type": "object"}, "MCPCredentialFieldsResponse": {"description": "Describes what credential fields an MCP needs.", "properties": {"mcp_server_id": {"title": "Mcp Server Id", "type": "integer"}, "mcp_server_name": {"title": "Mcp Server Name", "type": "string"}, "oauth_provider": {"anyOf": [{"$ref": "#/components/schemas/MCPOAuthProvider"}, {"type": "null"}]}, "oauth_service": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Oauth Service"}, "supports_oauth_connect": {"default": false, "title": "Supports Oauth Connect", "type": "boolean"}, "oauth_connect_label": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Oauth Connect Label"}, "setup_instructions": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Setup Instructions"}, "required_env_vars": {"items": {"type": "string"}, "title": "Required Env Vars", "type": "array"}, "credential_files": {"additionalProperties": {"type": "string"}, "description": "Map of env var names to file extensions for file-based credentials", "title": "Credential Files", "type": "object"}, "credential_fields": {"description": "Rich field metadata for rendering MCP credential inputs", "items": {"$ref": "#/components/schemas/MCPCredentialFieldDefinition"}, "title": "Credential Fields", "type": "array"}, "has_user_credentials": {"title": "Has User Credentials", "type": "boolean"}, "configured_vars": {"description": "Which env vars the user has already set", "items": {"type": "string"}, "title": "Configured Vars", "type": "array"}}, "required": ["mcp_server_id", "mcp_server_name", "required_env_vars", "has_user_credentials"], "title": "MCPCredentialFieldsResponse", "type": "object"}, "MCPOrgCredentialSummary": {"description": "Summary of credentials for an org's MCP (admin view).", "properties": {"total_authenticated_users": {"title": "Total Authenticated Users", "type": "integer"}, "has_org_fallback": {"title": "Has Org Fallback", "type": "boolean"}, "org_fallback_user": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Org Fallback User"}, "authenticated_users": {"default": [], "items": {"additionalProperties": true, "type": "object"}, "title": "Authenticated Users", "type": "array"}}, "required": ["total_authenticated_users", "has_org_fallback"], "title": "MCPOrgCredentialSummary", "type": "object"}, "MCPServerTestResponse": {"description": "Schema for MCP server connection test response.", "properties": {"success": {"title": "Success", "type": "boolean"}, "message": {"title": "Message", "type": "string"}, "tools": {"default": [], "items": {"$ref": "#/components/schemas/MCPToolSchema"}, "title": "Tools", "type": "array"}, "resources": {"default": [], "items": {"$ref": "#/components/schemas/MCPResourceSchema"}, "title": "Resources", "type": "array"}, "response_time_ms": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Response Time Ms"}}, "required": ["success", "message"], "title": "MCPServerTestResponse", "type": "object"}, "MCPOAuthStartResponse": {"description": "Response when starting OAuth flow.", "properties": {"authorization_url": {"title": "Authorization Url", "type": "string"}, "state": {"title": "State", "type": "string"}, "expires_in_minutes": {"title": "Expires In Minutes", "type": "integer"}, "instructions": {"title": "Instructions", "type": "string"}}, "required": ["authorization_url", "state", "expires_in_minutes", "instructions"], "title": "MCPOAuthStartResponse", "type": "object"}, "MCPOAuthCallbackResponse": {"description": "Response after completing OAuth authorization.", "properties": {"success": {"title": "Success", "type": "boolean"}, "message": {"title": "Message", "type": "string"}, "server_id": {"title": "Server Id", "type": "integer"}, "server_name": {"title": "Server Name", "type": "string"}, "organization_id": {"description": "Organization ID for share endpoint", "title": "Organization Id", "type": "string"}, "org_mcp_id": {"description": "OrganizationMCP ID for share endpoint", "title": "Org Mcp Id", "type": "integer"}, "prompt_share": {"default": false, "description": "Whether to prompt user to share with org", "title": "Prompt Share", "type": "boolean"}, "org_slug": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Organization slug for redirecting back to the correct org", "title": "Org Slug"}}, "required": ["success", "message", "server_id", "server_name", "organization_id", "org_mcp_id"], "title": "MCPOAuthCallbackResponse", "type": "object"}, "MCPOAuthClientSource": {"description": "Source of OAuth client configuration.", "enum": ["managed", "organization_byo"], "title": "MCPOAuthClientSource", "type": "string"}, "MCPOAuthStatusResponse": {"description": "Response with OAuth status for user's credentials.", "properties": {"organization_mcp_id": {"title": "Organization Mcp Id", "type": "integer"}, "is_oauth_configured": {"description": "Whether OAuth is configured on the server", "title": "Is Oauth Configured", "type": "boolean"}, "has_personal_credentials": {"description": "Whether user has their own OAuth credentials", "title": "Has Personal Credentials", "type": "boolean"}, "token_expires_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "description": "When the access token expires", "title": "Token Expires At"}, "needs_reauthorization": {"default": false, "description": "Whether token is expired and needs refresh", "title": "Needs Reauthorization", "type": "boolean"}, "requires_reconnect": {"default": false, "description": "Whether the credential cannot be used until the user reconnects", "title": "Requires Reconnect", "type": "boolean"}, "reconnect_reason": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Provider-specific reconnect reason, e.g. m365_graph_scope_upgrade", "title": "Reconnect Reason"}, "missing_capability_reasons": {"description": "Provider capability gaps such as admin_consent_required, missing_scope, missing_copilot_license, tenant_disabled, or token_refresh_failed", "items": {"type": "string"}, "title": "Missing Capability Reasons", "type": "array"}, "granted_scopes": {"description": "OAuth scopes the provider reported on the stored credential", "items": {"type": "string"}, "title": "Granted Scopes", "type": "array"}, "is_sharing_with_org": {"default": false, "description": "Whether sharing with org", "title": "Is Sharing With Org", "type": "boolean"}, "oauth_client_source": {"anyOf": [{"$ref": "#/components/schemas/MCPOAuthClientSource"}, {"type": "null"}], "description": "Source of OAuth client configuration for provider-based integrations"}}, "required": ["organization_mcp_id", "is_oauth_configured", "has_personal_credentials"], "title": "MCPOAuthStatusResponse", "type": "object"}, "MCPGoogleOAuthStartResponse": {"description": "Response when starting Google OAuth flow.", "properties": {"authorization_url": {"title": "Authorization Url", "type": "string"}, "state": {"title": "State", "type": "string"}, "expires_in_minutes": {"title": "Expires In Minutes", "type": "integer"}}, "required": ["authorization_url", "state", "expires_in_minutes"], "title": "MCPGoogleOAuthStartResponse", "type": "object"}, "MCPGoogleOAuthClientStatusResponse": {"description": "Status response for org-level Google OAuth client configuration.", "properties": {"provider": {"allOf": [{"$ref": "#/components/schemas/MCPOAuthProvider"}], "default": "google"}, "is_configured": {"title": "Is Configured", "type": "boolean"}, "client_source": {"$ref": "#/components/schemas/MCPOAuthClientSource"}}, "required": ["is_configured", "client_source"], "title": "MCPGoogleOAuthClientStatusResponse", "type": "object"}, "MCPGoogleOAuthClientUpsertRequest": {"description": "Request payload for saving org-level Google OAuth client JSON.", "properties": {"oauth_client_json": {"description": "Full Google OAuth client JSON content", "title": "Oauth Client Json", "type": "string"}}, "required": ["oauth_client_json"], "title": "MCPGoogleOAuthClientUpsertRequest", "type": "object"}, "MCPMicrosoftOAuthClientStatusResponse": {"description": "Status response for org-level Microsoft OAuth client configuration.", "properties": {"provider": {"allOf": [{"$ref": "#/components/schemas/MCPOAuthProvider"}], "default": "microsoft"}, "is_configured": {"title": "Is Configured", "type": "boolean"}, "client_source": {"$ref": "#/components/schemas/MCPOAuthClientSource"}, "tenant_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Tenant Id"}}, "required": ["is_configured", "client_source"], "title": "MCPMicrosoftOAuthClientStatusResponse", "type": "object"}, "MCPMicrosoftOAuthClientUpsertRequest": {"description": "Request payload for saving org-level Microsoft OAuth client fields.", "properties": {"client_id": {"description": "Microsoft Entra app client ID", "minLength": 1, "title": "Client Id", "type": "string"}, "client_secret": {"description": "Microsoft Entra app secret", "minLength": 1, "title": "Client Secret", "type": "string"}, "tenant_id": {"default": "common", "description": "Tenant id, domain, or common", "title": "Tenant Id", "type": "string"}}, "required": ["client_id", "client_secret"], "title": "MCPMicrosoftOAuthClientUpsertRequest", "type": "object"}, "MCPCredentialShareResponse": {"description": "Response after toggling credential sharing.", "properties": {"success": {"title": "Success", "type": "boolean"}, "is_org_fallback": {"title": "Is Org Fallback", "type": "boolean"}, "delegation_mode": {"allOf": [{"$ref": "#/components/schemas/MCPDelegationMode"}], "default": "org"}, "message": {"title": "Message", "type": "string"}}, "required": ["success", "is_org_fallback", "message"], "title": "MCPCredentialShareResponse", "type": "object"}, "MCPCredentialShareRequest": {"description": "Request to toggle credential sharing.", "properties": {"share_with_org": {"description": "Whether to share credentials with org", "title": "Share With Org", "type": "boolean"}, "delegation_mode": {"allOf": [{"$ref": "#/components/schemas/MCPDelegationMode"}], "default": "org", "description": "Who can use the shared credential: entire org or specific users"}, "user_ids": {"description": "User IDs to delegate access to (only used when delegation_mode is specific_users)", "items": {"type": "string"}, "title": "User Ids", "type": "array"}}, "required": ["share_with_org"], "title": "MCPCredentialShareRequest", "type": "object"}, "MCPDelegateUser": {"description": "A user who has been delegated access to an MCP's shared credential.", "properties": {"user_id": {"title": "User Id", "type": "string"}, "email": {"title": "Email", "type": "string"}, "display_name": {"title": "Display Name", "type": "string"}, "avatar_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Avatar Url"}, "github_username": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Github Username"}}, "required": ["user_id", "email", "display_name"], "title": "MCPDelegateUser", "type": "object"}, "MCPDelegateAddRequest": {"description": "Request to add a delegate to an MCP.", "properties": {"user_id": {"description": "User ID to delegate access to", "title": "User Id", "type": "string"}}, "required": ["user_id"], "title": "MCPDelegateAddRequest", "type": "object"}, "MCPShareWithTeamResponse": {"description": "Response after toggling multi-tenant credential sharing.", "properties": {"success": {"title": "Success", "type": "boolean"}, "is_shared": {"title": "Is Shared", "type": "boolean"}}, "required": ["success", "is_shared"], "title": "MCPShareWithTeamResponse", "type": "object"}, "MCPShareWithTeamRequest": {"description": "Request to toggle multi-tenant credential sharing.", "properties": {"share": {"description": "Whether to share credentials with the team", "title": "Share", "type": "boolean"}}, "required": ["share"], "title": "MCPShareWithTeamRequest", "type": "object"}, "MCPSharedCredentialUser": {"description": "A user who has shared their credentials for an MCP.", "properties": {"user_id": {"title": "User Id", "type": "string"}, "display_name": {"title": "Display Name", "type": "string"}, "email": {"title": "Email", "type": "string"}, "avatar_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Avatar Url"}, "authority": {"anyOf": [{"$ref": "#/components/schemas/IntegrationAuthoritySummary"}, {"type": "null"}]}}, "required": ["user_id", "display_name", "email"], "title": "MCPSharedCredentialUser", "type": "object"}, "MCPSharedCredentialsResponse": {"description": "Response listing users who have shared their credentials for an MCP.", "properties": {"shared_credentials": {"default": [], "items": {"$ref": "#/components/schemas/MCPSharedCredentialUser"}, "title": "Shared Credentials", "type": "array"}}, "title": "MCPSharedCredentialsResponse", "type": "object"}, "MCPDelegationModeUpdateRequest": {"description": "Request to update delegation mode.", "properties": {"delegation_mode": {"$ref": "#/components/schemas/MCPDelegationMode", "description": "New delegation mode"}}, "required": ["delegation_mode"], "title": "MCPDelegationModeUpdateRequest", "type": "object"}, "TunnelSubscriptionStatusResponse": {"description": "Response containing user's tunnel subscription status.", "properties": {"has_subscription": {"title": "Has Subscription", "type": "boolean"}, "subscription_source": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Subscription Source"}, "has_tunnel_access": {"default": false, "title": "Has Tunnel Access", "type": "boolean"}, "tunnel_access_source": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Tunnel Access Source"}, "tunnels_free": {"default": false, "title": "Tunnels Free", "type": "boolean"}, "org_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Org Name"}, "status": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Status"}, "plan_interval": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Plan Interval"}, "current_period_end": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Current Period End"}, "cancel_at_period_end": {"default": false, "title": "Cancel At Period End", "type": "boolean"}}, "required": ["has_subscription"], "title": "TunnelSubscriptionStatusResponse", "type": "object"}, "ListTunnelPlansResponse": {"description": "Response containing available tunnel subscription plans.", "properties": {"items": {"items": {"$ref": "#/components/schemas/TunnelPlanResponse"}, "title": "Items", "type": "array"}}, "required": ["items"], "title": "ListTunnelPlansResponse", "type": "object"}, "TunnelPlanResponse": {"description": "Response containing tunnel plan pricing details.", "properties": {"lookup_key": {"title": "Lookup Key", "type": "string"}, "name": {"title": "Name", "type": "string"}, "interval": {"title": "Interval", "type": "string"}, "unit_amount": {"title": "Unit Amount", "type": "integer"}, "currency": {"title": "Currency", "type": "string"}}, "required": ["lookup_key", "name", "interval", "unit_amount", "currency"], "title": "TunnelPlanResponse", "type": "object"}, "CreateTunnelCheckoutResponse": {"description": "Response containing the Stripe checkout session details.", "properties": {"session_id": {"title": "Session Id", "type": "string"}, "url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Url"}}, "required": ["session_id"], "title": "CreateTunnelCheckoutResponse", "type": "object"}, "CreateTunnelCheckoutRequest": {"description": "Request to create a Stripe checkout session for tunnel subscription.", "properties": {"price_lookup_key": {"description": "Stripe price lookup key (tunnel:sub:monthly or tunnel:sub:yearly)", "title": "Price Lookup Key", "type": "string"}, "success_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Success Url"}, "cancel_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Cancel Url"}}, "required": ["price_lookup_key"], "title": "CreateTunnelCheckoutRequest", "type": "object"}, "CreateTunnelPortalResponse": {"description": "Response containing the billing portal URL.", "properties": {"url": {"title": "Url", "type": "string"}}, "required": ["url"], "title": "CreateTunnelPortalResponse", "type": "object"}, "CreateTunnelPortalRequest": {"description": "Request to create a Stripe billing portal session.", "properties": {"return_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Return Url"}}, "title": "CreateTunnelPortalRequest", "type": "object"}, "HostnameRegistrationResponse": {"description": "Registered hostname response.", "properties": {"hostname": {"title": "Hostname", "type": "string"}, "registered": {"title": "Registered", "type": "boolean"}}, "required": ["hostname", "registered"], "title": "HostnameRegistrationResponse", "type": "object"}, "RegisterFreeTunnelRequest": {"description": "Request to register a free tunnel hostname for ownership validation.", "properties": {"hostname": {"title": "Hostname", "type": "string"}}, "required": ["hostname"], "title": "RegisterFreeTunnelRequest", "type": "object"}, "TunnelResponse": {"description": "Response containing tunnel details.", "properties": {"id": {"title": "Id", "type": "string"}, "subdomain": {"title": "Subdomain", "type": "string"}, "hostname": {"title": "Hostname", "type": "string"}, "tunnel_id": {"title": "Tunnel Id", "type": "string"}, "is_active": {"title": "Is Active", "type": "boolean"}, "device_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Device Name"}, "last_connected_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Last Connected At"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}}, "required": ["id", "subdomain", "hostname", "tunnel_id", "is_active", "created_at"], "title": "TunnelResponse", "type": "object"}, "CreateTunnelRequest": {"description": "Request to create a new persistent tunnel.", "properties": {"subdomain": {"description": "Subdomain for the tunnel URL (e.g., 'alice' for alice.codepress.dev)", "maxLength": 63, "minLength": 3, "title": "Subdomain", "type": "string"}, "device_name": {"anyOf": [{"maxLength": 100, "type": "string"}, {"type": "null"}], "description": "Optional label for this tunnel, typically the machine/device name", "title": "Device Name"}}, "required": ["subdomain"], "title": "CreateTunnelRequest", "type": "object"}, "TunnelListResponse": {"description": "Response containing list of user's tunnels.", "properties": {"tunnels": {"items": {"$ref": "#/components/schemas/TunnelResponse"}, "title": "Tunnels", "type": "array"}}, "required": ["tunnels"], "title": "TunnelListResponse", "type": "object"}, "TunnelTokenResponse": {"description": "Response containing the tunnel token for connecting.", "properties": {"tunnel_token": {"title": "Tunnel Token", "type": "string"}, "hostname": {"title": "Hostname", "type": "string"}, "tunnel_id": {"title": "Tunnel Id", "type": "string"}}, "required": ["tunnel_token", "hostname", "tunnel_id"], "title": "TunnelTokenResponse", "type": "object"}, "GetTunnelTokenRequest": {"description": "Request to get tunnel token with optional port configuration.", "properties": {"local_port": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Local Port"}}, "title": "GetTunnelTokenRequest", "type": "object"}, "WebhookReceiptResponse": {"description": "Webhook processing acknowledgement.", "properties": {"received": {"title": "Received", "type": "boolean"}, "processed": {"title": "Processed", "type": "boolean"}}, "required": ["received", "processed"], "title": "WebhookReceiptResponse", "type": "object"}, "ValidateAccessResponse": {"description": "Response for token validation.", "properties": {"valid": {"title": "Valid", "type": "boolean"}, "token_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Token Type"}, "expires_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Expires At"}, "error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error"}}, "required": ["valid"], "title": "ValidateAccessResponse", "type": "object"}, "ValidateAccessRequest": {"description": "Request to validate an access token.", "properties": {"token": {"title": "Token", "type": "string"}}, "required": ["token"], "title": "ValidateAccessRequest", "type": "object"}, "OwnershipValidationResponse": {"description": "Tunnel ownership validation response.", "properties": {"ok": {"default": true, "title": "Ok", "type": "boolean"}, "is_owner": {"title": "Is Owner", "type": "boolean"}, "hostname": {"title": "Hostname", "type": "string"}}, "required": ["is_owner", "hostname"], "title": "OwnershipValidationResponse", "type": "object"}, "ValidateOwnershipRequest": {"description": "Request to validate tunnel ownership.", "properties": {"hostname": {"title": "Hostname", "type": "string"}}, "required": ["hostname"], "title": "ValidateOwnershipRequest", "type": "object"}, "TunnelHealthResponse": {"description": "Response for tunnel health check.", "properties": {"tunnel_id": {"title": "Tunnel Id", "type": "string"}, "hostname": {"title": "Hostname", "type": "string"}, "status": {"title": "Status", "type": "string"}, "connectors": {"title": "Connectors", "type": "integer"}}, "required": ["tunnel_id", "hostname", "status", "connectors"], "title": "TunnelHealthResponse", "type": "object"}, "UpdateTunnelRequest": {"description": "Request to update mutable tunnel fields.", "properties": {"device_name": {"anyOf": [{"maxLength": 100, "type": "string"}, {"type": "null"}], "description": "New label for this tunnel. Pass empty string to clear.", "title": "Device Name"}}, "title": "UpdateTunnelRequest", "type": "object"}, "ChangeSubdomainRequest": {"description": "Request to change the subdomain (and therefore URL) of a tunnel.", "properties": {"subdomain": {"description": "New subdomain (e.g., 'alice' \u2192 alice-codepress-terminal-tunnel.codepress.dev)", "maxLength": 63, "minLength": 3, "title": "Subdomain", "type": "string"}}, "required": ["subdomain"], "title": "ChangeSubdomainRequest", "type": "object"}, "SubdomainAvailabilityResponse": {"description": "Subdomain availability response.", "properties": {"available": {"title": "Available", "type": "boolean"}, "subdomain": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Subdomain"}, "reason": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Reason"}}, "required": ["available"], "title": "SubdomainAvailabilityResponse", "type": "object"}, "EnableSecureAccessResponse": {"description": "Response containing the access token for secure mode.", "properties": {"access_token": {"title": "Access Token", "type": "string"}, "secure_access_enabled": {"title": "Secure Access Enabled", "type": "boolean"}}, "required": ["access_token", "secure_access_enabled"], "title": "EnableSecureAccessResponse", "type": "object"}, "SecureAccessStatusResponse": {"description": "Response containing the secure access status.", "properties": {"secure_access_enabled": {"title": "Secure Access Enabled", "type": "boolean"}}, "required": ["secure_access_enabled"], "title": "SecureAccessStatusResponse", "type": "object"}, "ShareLinkResponse": {"description": "Response containing share link details.", "properties": {"id": {"title": "Id", "type": "string"}, "share_url": {"title": "Share Url", "type": "string"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name"}, "expires_at": {"format": "date-time", "title": "Expires At", "type": "string"}, "expires_in_minutes": {"title": "Expires In Minutes", "type": "integer"}, "is_active": {"title": "Is Active", "type": "boolean"}, "use_count": {"title": "Use Count", "type": "integer"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}}, "required": ["id", "share_url", "expires_at", "expires_in_minutes", "is_active", "use_count", "created_at"], "title": "ShareLinkResponse", "type": "object"}, "CreateShareLinkRequest": {"description": "Request to create a share link.", "properties": {"expires_in_minutes": {"default": 45, "description": "How long the share link is valid (5-1440 minutes)", "maximum": 1440, "minimum": 5, "title": "Expires In Minutes", "type": "integer"}, "name": {"anyOf": [{"maxLength": 100, "type": "string"}, {"type": "null"}], "description": "Optional friendly name for the share link", "title": "Name"}}, "title": "CreateShareLinkRequest", "type": "object"}, "ListShareLinksResponse": {"description": "Response containing list of share links.", "properties": {"share_links": {"items": {"$ref": "#/components/schemas/ShareLinkResponse"}, "title": "Share Links", "type": "array"}}, "required": ["share_links"], "title": "ListShareLinksResponse", "type": "object"}, "RevokedCountResponse": {"description": "Bulk revoke response.", "properties": {"ok": {"default": true, "title": "Ok", "type": "boolean"}, "revoked_count": {"title": "Revoked Count", "type": "integer"}}, "required": ["revoked_count"], "title": "RevokedCountResponse", "type": "object"}, "SecureAccessEnabledResponse": {"description": "Secure access status by hostname.", "properties": {"secure_access_enabled": {"title": "Secure Access Enabled", "type": "boolean"}}, "required": ["secure_access_enabled"], "title": "SecureAccessEnabledResponse", "type": "object"}, "CanStreamResponse": {"description": "Response for checking if user can stream. Works for both auth and anonymous.", "properties": {"can_stream": {"title": "Can Stream", "type": "boolean"}, "reason": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Reason"}, "remaining_seconds": {"title": "Remaining Seconds", "type": "integer"}, "has_active_subscription": {"title": "Has Active Subscription", "type": "boolean"}}, "required": ["can_stream", "remaining_seconds", "has_active_subscription"], "title": "CanStreamResponse", "type": "object"}, "StreamingCheckRequest": {"description": "Request to check streaming eligibility. Works for both auth and anonymous users.", "properties": {"machine_id": {"description": "SHA-256 hash of the machine ID (64 hex characters)", "maxLength": 64, "minLength": 64, "title": "Machine Id", "type": "string"}}, "required": ["machine_id"], "title": "StreamingCheckRequest", "type": "object"}, "StreamingUsageResponse": {"description": "Response containing streaming usage information.", "properties": {"user_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "User Id"}, "machine_id_hash": {"title": "Machine Id Hash", "type": "string"}, "total_seconds_used": {"title": "Total Seconds Used", "type": "integer"}, "remaining_seconds": {"title": "Remaining Seconds", "type": "integer"}, "free_tier_limit_seconds": {"title": "Free Tier Limit Seconds", "type": "integer"}, "session_count": {"title": "Session Count", "type": "integer"}, "has_active_subscription": {"title": "Has Active Subscription", "type": "boolean"}, "is_limit_exceeded": {"title": "Is Limit Exceeded", "type": "boolean"}, "usage_percentage": {"title": "Usage Percentage", "type": "number"}}, "required": ["machine_id_hash", "total_seconds_used", "remaining_seconds", "free_tier_limit_seconds", "session_count", "has_active_subscription", "is_limit_exceeded", "usage_percentage"], "title": "StreamingUsageResponse", "type": "object"}, "StreamingSessionResponse": {"description": "Response containing streaming session details.", "properties": {"id": {"title": "Id", "type": "string"}, "session_id": {"title": "Session Id", "type": "string"}, "user_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "User Id"}, "organization_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Organization Id"}, "started_at": {"format": "date-time", "title": "Started At", "type": "string"}, "ended_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Ended At"}, "duration_seconds": {"title": "Duration Seconds", "type": "integer"}, "is_active": {"title": "Is Active", "type": "boolean"}, "stream_type": {"title": "Stream Type", "type": "string"}, "window_title": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Window Title"}}, "required": ["id", "session_id", "started_at", "duration_seconds", "is_active", "stream_type"], "title": "StreamingSessionResponse", "type": "object"}, "StartStreamingSessionRequest": {"description": "Request to start a streaming session.", "properties": {"session_id": {"title": "Session Id", "type": "string"}, "machine_id": {"description": "SHA-256 hash of the machine ID (64 hex characters)", "maxLength": 64, "minLength": 64, "title": "Machine Id", "type": "string"}, "stream_type": {"default": "screen", "title": "Stream Type", "type": "string"}, "window_title": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Window Title"}, "organization_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Organization Id"}}, "required": ["session_id", "machine_id"], "title": "StartStreamingSessionRequest", "type": "object"}, "StopStreamingSessionRequest": {"description": "Request to stop a streaming session.", "properties": {"session_id": {"title": "Session Id", "type": "string"}, "machine_id": {"description": "SHA-256 hash of the machine ID (64 hex characters)", "maxLength": 64, "minLength": 64, "title": "Machine Id", "type": "string"}}, "required": ["session_id", "machine_id"], "title": "StopStreamingSessionRequest", "type": "object"}, "HeartbeatResponse": {"description": "Response for heartbeat request.", "properties": {"remaining_seconds": {"title": "Remaining Seconds", "type": "integer"}, "success": {"default": true, "title": "Success", "type": "boolean"}}, "required": ["remaining_seconds"], "title": "HeartbeatResponse", "type": "object"}, "HeartbeatRequest": {"description": "Request for session heartbeat.", "properties": {"session_id": {"title": "Session Id", "type": "string"}, "machine_id": {"description": "SHA-256 hash of the machine ID (64 hex characters)", "maxLength": 64, "minLength": 64, "title": "Machine Id", "type": "string"}, "seconds": {"default": 30, "description": "Number of seconds to record (1-120)", "maximum": 120, "minimum": 1, "title": "Seconds", "type": "integer"}}, "required": ["session_id", "machine_id"], "title": "HeartbeatRequest", "type": "object"}, "AckWebhookDeliveryResponse": {"description": "Response after acknowledging a webhook delivery.", "properties": {"ok": {"default": true, "title": "Ok", "type": "boolean"}}, "title": "AckWebhookDeliveryResponse", "type": "object"}, "AckWebhookDeliveryRequest": {"description": "Request to acknowledge receipt of a webhook event.", "properties": {"delivery_id": {"title": "Delivery Id", "type": "integer"}}, "required": ["delivery_id"], "title": "AckWebhookDeliveryRequest", "type": "object"}, "ClaimWebhookDeliveryResponse": {"description": "Result of a claim attempt.\n\nWhen ``granted`` is false, ``retry_after_ms`` (if set) tells the terminal\nwhen re-claiming might succeed (origin grace window or claim TTL expiry).", "properties": {"granted": {"title": "Granted", "type": "boolean"}, "reason": {"default": "", "title": "Reason", "type": "string"}, "retry_after_ms": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Retry After Ms"}}, "required": ["granted"], "title": "ClaimWebhookDeliveryResponse", "type": "object"}, "ClaimWebhookDeliveryRequest": {"description": "Request to claim exclusive injection rights for a webhook event.", "properties": {"delivery_id": {"title": "Delivery Id", "type": "integer"}, "terminal_origin_id": {"title": "Terminal Origin Id", "type": "string"}}, "required": ["delivery_id", "terminal_origin_id"], "title": "ClaimWebhookDeliveryRequest", "type": "object"}, "UploadPowerSamplesResponse": {"description": "Response after ingesting power profiling samples.", "properties": {"accepted": {"title": "Accepted", "type": "integer"}}, "required": ["accepted"], "title": "UploadPowerSamplesResponse", "type": "object"}, "PowerSampleItem": {"description": "One power profiling sample interval from the desktop terminal.", "properties": {"sampled_at": {"format": "date-time", "title": "Sampled At", "type": "string"}, "interval_seconds": {"exclusiveMinimum": 0, "maximum": 3600, "title": "Interval Seconds", "type": "number"}, "cpu_seconds": {"additionalProperties": {"type": "number"}, "description": "Per-component CPU seconds consumed during the interval", "title": "Cpu Seconds", "type": "object"}, "rss_mb": {"additionalProperties": {"type": "number"}, "description": "Per-component resident memory (MB) snapshot at sample time", "title": "Rss Mb", "type": "object"}, "render": {"additionalProperties": {"type": "number"}, "description": "xterm render-metrics rollup for the interval", "title": "Render", "type": "object"}, "agent_tabs": {"default": 0, "minimum": 0, "title": "Agent Tabs", "type": "integer"}, "total_tabs": {"default": 0, "minimum": 0, "title": "Total Tabs", "type": "integer"}, "client_visible": {"default": false, "title": "Client Visible", "type": "boolean"}}, "required": ["sampled_at", "interval_seconds"], "title": "PowerSampleItem", "type": "object"}, "UploadPowerSamplesRequest": {"description": "Batch of power profiling samples uploaded by the desktop terminal.", "properties": {"machine_id": {"maxLength": 128, "minLength": 1, "title": "Machine Id", "type": "string"}, "window_id": {"default": "1", "maxLength": 64, "title": "Window Id", "type": "string"}, "terminal_version": {"default": "", "maxLength": 64, "title": "Terminal Version", "type": "string"}, "platform": {"default": "", "maxLength": 32, "title": "Platform", "type": "string"}, "samples": {"items": {"$ref": "#/components/schemas/PowerSampleItem"}, "maxItems": 120, "minItems": 1, "title": "Samples", "type": "array"}}, "required": ["machine_id", "samples"], "title": "UploadPowerSamplesRequest", "type": "object"}, "AutomationConfigSchema": {"description": "Response schema for an automation configuration.", "properties": {"automation_type": {"title": "Automation Type", "type": "string"}, "is_enabled": {"title": "Is Enabled", "type": "boolean"}, "trigger_events": {"items": {"type": "string"}, "title": "Trigger Events", "type": "array"}, "slack_channel_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Slack Channel Id"}, "slack_message_prefix": {"default": "<!channel>", "title": "Slack Message Prefix", "type": "string"}, "slack_dm_notify_on_user_question": {"default": false, "title": "Slack Dm Notify On User Question", "type": "boolean"}, "slack_dm_notify_on_turn_complete": {"default": false, "title": "Slack Dm Notify On Turn Complete", "type": "boolean"}, "cooldown_seconds": {"default": 0, "title": "Cooldown Seconds", "type": "integer"}, "max_concurrent_runs": {"default": 50, "title": "Max Concurrent Runs", "type": "integer"}, "settings": {"additionalProperties": true, "default": {}, "title": "Settings", "type": "object"}, "configured_by_email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Configured By Email"}}, "required": ["automation_type", "is_enabled", "trigger_events"], "title": "AutomationConfigSchema", "type": "object"}, "AutomationConfigUpdateSchema": {"description": "Request schema for updating an automation configuration.", "properties": {"is_enabled": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Enabled"}, "trigger_events": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Trigger Events"}, "slack_channel_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Slack Channel Id"}, "slack_message_prefix": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Slack Message Prefix"}, "slack_dm_notify_on_user_question": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Slack Dm Notify On User Question"}, "slack_dm_notify_on_turn_complete": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Slack Dm Notify On Turn Complete"}, "cooldown_seconds": {"anyOf": [{"maximum": 86400, "minimum": 0, "type": "integer"}, {"type": "null"}], "title": "Cooldown Seconds"}, "max_concurrent_runs": {"anyOf": [{"minimum": 1, "type": "integer"}, {"type": "null"}], "title": "Max Concurrent Runs"}, "settings": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Settings"}}, "title": "AutomationConfigUpdateSchema", "type": "object"}, "AutomationStatusSchema": {"description": "Response schema for status check (used by integrations page).", "properties": {"enabled": {"title": "Enabled", "type": "boolean"}, "automation_types": {"default": [], "items": {"type": "string"}, "title": "Automation Types", "type": "array"}}, "required": ["enabled"], "title": "AutomationStatusSchema", "type": "object"}, "AutomationRunListSchema": {"description": "Response schema for paginated run list.", "properties": {"runs": {"items": {"$ref": "#/components/schemas/AutomationRunSchema"}, "title": "Runs", "type": "array"}, "total": {"title": "Total", "type": "integer"}}, "required": ["runs", "total"], "title": "AutomationRunListSchema", "type": "object"}, "AutomationRunSchema": {"description": "Response schema for an automation run.", "properties": {"id": {"title": "Id", "type": "integer"}, "uuid": {"title": "Uuid", "type": "string"}, "config_id": {"title": "Config Id", "type": "string"}, "automation_type": {"title": "Automation Type", "type": "string"}, "trigger_event_type": {"title": "Trigger Event Type", "type": "string"}, "execution_target": {"default": "live", "title": "Execution Target", "type": "string"}, "trigger_data": {"additionalProperties": true, "default": {}, "title": "Trigger Data", "type": "object"}, "classified_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Classified Type"}, "status": {"title": "Status", "type": "string"}, "grouping_key": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Grouping Key"}, "metadata": {"additionalProperties": true, "default": {}, "title": "Metadata", "type": "object"}, "result_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Result Url"}, "result_data": {"anyOf": [{}, {"type": "null"}], "title": "Result Data"}, "error_message": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error Message"}, "retry_count": {"default": 0, "title": "Retry Count", "type": "integer"}, "started_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Started At"}, "scheduled_for": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Scheduled For"}, "completed_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Completed At"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "repository_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Repository Name"}, "agent_session_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Agent Session Id"}, "usage_summary": {"anyOf": [{"$ref": "#/components/schemas/AutomationRunUsageSchema"}, {"type": "null"}]}}, "required": ["id", "uuid", "config_id", "automation_type", "trigger_event_type", "status", "created_at"], "title": "AutomationRunSchema", "type": "object"}, "AutomationRunUsageSchema": {"description": "Aggregated AI usage for an automation run and its workflow children.", "properties": {"session_count": {"default": 0, "title": "Session Count", "type": "integer"}, "api_calls": {"default": 0, "title": "Api Calls", "type": "integer"}, "input_tokens": {"default": 0, "title": "Input Tokens", "type": "integer"}, "output_tokens": {"default": 0, "title": "Output Tokens", "type": "integer"}, "total_tokens": {"default": 0, "title": "Total Tokens", "type": "integer"}, "cache_read_tokens": {"default": 0, "title": "Cache Read Tokens", "type": "integer"}, "cache_creation_tokens": {"default": 0, "title": "Cache Creation Tokens", "type": "integer"}, "cache_creation_5m_tokens": {"default": 0, "title": "Cache Creation 5M Tokens", "type": "integer"}, "cache_creation_1h_tokens": {"default": 0, "title": "Cache Creation 1H Tokens", "type": "integer"}, "billable_metered_tokens": {"default": 0, "title": "Billable Metered Tokens", "type": "integer"}, "external_metered_tokens": {"default": 0, "title": "External Metered Tokens", "type": "integer"}, "total_cost_usd": {"default": 0, "title": "Total Cost Usd", "type": "number"}, "billable_cost_usd": {"default": 0, "title": "Billable Cost Usd", "type": "number"}, "external_estimated_cost_usd": {"default": 0, "title": "External Estimated Cost Usd", "type": "number"}, "byos_weekly_limit_percent": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Byos Weekly Limit Percent"}}, "title": "AutomationRunUsageSchema", "type": "object"}, "ScheduledAutomationRunCreateSchema": {"description": "Request schema for creating a one-off scheduled automation run.", "properties": {"run_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Run At"}, "delay_seconds": {"anyOf": [{"maximum": 31536000, "minimum": 30, "type": "integer"}, {"type": "null"}], "title": "Delay Seconds"}, "payload": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Payload"}, "reason": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Reason"}}, "title": "ScheduledAutomationRunCreateSchema", "type": "object"}, "AutomationRunStepListSchema": {"description": "Response schema for workflow steps belonging to a run.", "properties": {"steps": {"items": {"$ref": "#/components/schemas/AutomationRunStepSchema"}, "title": "Steps", "type": "array"}}, "required": ["steps"], "title": "AutomationRunStepListSchema", "type": "object"}, "AutomationRunStepSchema": {"description": "Response schema for a durable automation workflow step.", "properties": {"id": {"title": "Id", "type": "integer"}, "step_key": {"title": "Step Key", "type": "string"}, "chat_key": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Chat Key"}, "kind": {"title": "Kind", "type": "string"}, "status": {"title": "Status", "type": "string"}, "parent_step_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Parent Step Id"}, "input_data": {"additionalProperties": true, "default": {}, "title": "Input Data", "type": "object"}, "output_data": {"anyOf": [{}, {"type": "null"}], "title": "Output Data"}, "output_ref": {"anyOf": [{}, {"type": "null"}], "title": "Output Ref"}, "error_message": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error Message"}, "failure_class": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Failure Class"}, "runtime_metadata": {"additionalProperties": true, "default": {}, "title": "Runtime Metadata", "type": "object"}, "agent_session_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Agent Session Id"}, "child_automation_run_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Child Automation Run Id"}, "child_automation_run_uuid": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Child Automation Run Uuid"}, "attempt": {"default": 0, "title": "Attempt", "type": "integer"}, "max_attempts": {"default": 1, "title": "Max Attempts", "type": "integer"}, "started_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Started At"}, "completed_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Completed At"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}}, "required": ["id", "step_key", "kind", "status", "created_at"], "title": "AutomationRunStepSchema", "type": "object"}, "CancelRunResponseSchema": {"description": "Response schema for run cancellation.", "properties": {"run_id": {"title": "Run Id", "type": "integer"}, "uuid": {"title": "Uuid", "type": "string"}, "status": {"title": "Status", "type": "string"}}, "required": ["run_id", "uuid", "status"], "title": "CancelRunResponseSchema", "type": "object"}, "RerunRunResponseSchema": {"description": "Response schema for automation run rerun.", "properties": {"run_id": {"title": "Run Id", "type": "integer"}, "uuid": {"title": "Uuid", "type": "string"}, "status": {"title": "Status", "type": "string"}}, "required": ["run_id", "uuid", "status"], "title": "RerunRunResponseSchema", "type": "object"}, "RetryRunRequestSchema": {"description": "Request schema for durable workflow retry.", "properties": {"mode": {"enum": ["from_failure_point", "whole_run"], "title": "Mode", "type": "string"}}, "required": ["mode"], "title": "RetryRunRequestSchema", "type": "object"}, "TriggerAgentRunResponseSchema": {"description": "Response schema for manually triggered synthetic fix/optimizer runs.", "properties": {"run_id": {"title": "Run Id", "type": "integer"}, "uuid": {"title": "Uuid", "type": "string"}, "status": {"title": "Status", "type": "string"}}, "required": ["run_id", "uuid", "status"], "title": "TriggerAgentRunResponseSchema", "type": "object"}, "ForceFailureResponseSchema": {"description": "Response schema for a forced failure run.", "properties": {"run_id": {"title": "Run Id", "type": "integer"}, "uuid": {"title": "Uuid", "type": "string"}, "status": {"title": "Status", "type": "string"}, "fix_run_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Fix Run Id"}, "fix_run_uuid": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Fix Run Uuid"}, "consecutive_failures": {"title": "Consecutive Failures", "type": "integer"}, "locked": {"title": "Locked", "type": "boolean"}}, "required": ["run_id", "uuid", "status", "consecutive_failures", "locked"], "title": "ForceFailureResponseSchema", "type": "object"}, "ForceFailureRequestSchema": {"description": "Request schema for synthesising a failed run to exercise the fix-agent path.\n\nFields are optional \u2014 the endpoint substitutes sensible defaults so an admin\ncan `POST` an empty body and still drive the full `_handle_failure` flow.", "properties": {"error_message": {"default": "Forced failure for fix-agent flow verification", "title": "Error Message", "type": "string"}, "grouping_key": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Grouping Key"}, "payload": {"additionalProperties": true, "default": {}, "title": "Payload", "type": "object"}}, "title": "ForceFailureRequestSchema", "type": "object"}, "CustomAutomationSchema": {"description": "Response schema for a custom automation.", "properties": {"id": {"title": "Id", "type": "string"}, "is_managed": {"default": false, "title": "Is Managed", "type": "boolean"}, "managed_slug": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Managed Slug"}, "managed_editable_fields": {"default": [], "items": {"type": "string"}, "title": "Managed Editable Fields", "type": "array"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "trigger_events": {"items": {"type": "string"}, "title": "Trigger Events", "type": "array"}, "is_enabled": {"title": "Is Enabled", "type": "boolean"}, "handler_code": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Handler Code"}, "dockerfile": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Dockerfile"}, "handler_repo": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Handler Repo"}, "handler_path": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Handler Path"}, "handler_commit_sha": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Handler Commit Sha"}, "build_status": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Build Status"}, "last_build_error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last Build Error"}, "draft_handler_commit_sha": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Draft Handler Commit Sha"}, "draft_build_status": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Draft Build Status"}, "draft_last_build_error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Draft Last Build Error"}, "has_unpublished_draft": {"default": false, "title": "Has Unpublished Draft", "type": "boolean"}, "draft_ready": {"default": false, "title": "Draft Ready", "type": "boolean"}, "webhook_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Webhook Url"}, "webhook_signature_type": {"default": "none", "title": "Webhook Signature Type", "type": "string"}, "secret_keys": {"default": [], "items": {"type": "string"}, "title": "Secret Keys", "type": "array"}, "vault_secret_refs": {"default": [], "items": {"$ref": "#/components/schemas/VaultSecretRefSchema"}, "title": "Vault Secret Refs", "type": "array"}, "vault_synced_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Vault Synced At"}, "vault_stale": {"default": false, "title": "Vault Stale", "type": "boolean"}, "slack_channel_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Slack Channel Id"}, "slack_message_prefix": {"default": "<!channel>", "title": "Slack Message Prefix", "type": "string"}, "slack_dm_notify_on_user_question": {"default": false, "title": "Slack Dm Notify On User Question", "type": "boolean"}, "slack_dm_notify_on_turn_complete": {"default": false, "title": "Slack Dm Notify On Turn Complete", "type": "boolean"}, "cooldown_seconds": {"default": 0, "title": "Cooldown Seconds", "type": "integer"}, "max_concurrent_runs": {"default": 50, "title": "Max Concurrent Runs", "type": "integer"}, "max_concurrent_per_scope": {"default": 0, "title": "Max Concurrent Per Scope", "type": "integer"}, "concurrency_policy": {"default": "drop", "title": "Concurrency Policy", "type": "string"}, "rate_limit_per_minute": {"default": 0, "title": "Rate Limit Per Minute", "type": "integer"}, "retry_on_failure": {"default": false, "title": "Retry On Failure", "type": "boolean"}, "max_retries": {"default": 3, "title": "Max Retries", "type": "integer"}, "optimizer_enabled": {"default": false, "title": "Optimizer Enabled", "type": "boolean"}, "fix_agent_enabled": {"default": false, "title": "Fix Agent Enabled", "type": "boolean"}, "aws_broker_enabled": {"default": false, "title": "Aws Broker Enabled", "type": "boolean"}, "max_consecutive_failures": {"default": 5, "title": "Max Consecutive Failures", "type": "integer"}, "locked_scopes": {"additionalProperties": true, "default": {}, "title": "Locked Scopes", "type": "object"}, "scope_lock_enforcement": {"default": "server", "title": "Scope Lock Enforcement", "type": "string"}, "schedule_expression": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Schedule Expression"}, "next_run_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Next Run At"}, "last_triggered_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Last Triggered At"}, "credential_source": {"default": "both", "title": "Credential Source", "type": "string"}, "credential_user_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Credential User Id"}, "agent_teammate_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Agent Teammate Id"}, "lambda_timeout_seconds": {"default": 900, "title": "Lambda Timeout Seconds", "type": "integer"}, "agent_type": {"default": "claude", "title": "Agent Type", "type": "string"}, "agent_model": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Agent Model"}, "agent_reasoning_effort": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Agent Reasoning Effort"}, "resume_enabled": {"default": false, "title": "Resume Enabled", "type": "boolean"}, "blueprint": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Blueprint"}, "draft_blueprint": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Draft Blueprint"}, "linked_app_slug": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Linked App Slug"}, "output_surface": {"default": "none", "enum": ["none", "static_app", "data_backed_app"], "title": "Output Surface", "type": "string"}, "is_pr_reviewer": {"default": false, "title": "Is Pr Reviewer", "type": "boolean"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}}, "required": ["id", "is_enabled", "created_at", "updated_at"], "title": "CustomAutomationSchema", "type": "object"}, "VaultSecretRefSchema": {"description": "A reference to a specific field in a vault secret.", "properties": {"secret_id": {"title": "Secret Id", "type": "string"}, "field_name": {"title": "Field Name", "type": "string"}}, "required": ["secret_id", "field_name"], "title": "VaultSecretRefSchema", "type": "object"}, "CustomAutomationCreateSchema": {"description": "Request schema for creating a custom automation.", "properties": {"name": {"title": "Name", "type": "string"}, "description": {"default": "", "title": "Description", "type": "string"}, "trigger_events": {"items": {"type": "string"}, "title": "Trigger Events", "type": "array"}, "handler_code": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Handler Code"}, "dockerfile": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Dockerfile"}, "secrets": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"type": "null"}], "title": "Secrets"}, "webhook_signature_type": {"default": "none", "title": "Webhook Signature Type", "type": "string"}, "webhook_signing_secret": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Webhook Signing Secret"}, "slack_channel_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Slack Channel Id"}, "slack_message_prefix": {"default": "<!channel>", "title": "Slack Message Prefix", "type": "string"}, "slack_dm_notify_on_user_question": {"default": false, "title": "Slack Dm Notify On User Question", "type": "boolean"}, "slack_dm_notify_on_turn_complete": {"default": false, "title": "Slack Dm Notify On Turn Complete", "type": "boolean"}, "cooldown_seconds": {"default": 0, "maximum": 86400, "minimum": 0, "title": "Cooldown Seconds", "type": "integer"}, "max_concurrent_runs": {"default": 50, "minimum": 1, "title": "Max Concurrent Runs", "type": "integer"}, "max_concurrent_per_scope": {"default": 0, "minimum": 0, "title": "Max Concurrent Per Scope", "type": "integer"}, "concurrency_policy": {"default": "drop", "title": "Concurrency Policy", "type": "string"}, "rate_limit_per_minute": {"default": 0, "minimum": 0, "title": "Rate Limit Per Minute", "type": "integer"}, "retry_on_failure": {"default": false, "title": "Retry On Failure", "type": "boolean"}, "max_retries": {"default": 3, "maximum": 10, "minimum": 1, "title": "Max Retries", "type": "integer"}, "optimizer_enabled": {"default": false, "title": "Optimizer Enabled", "type": "boolean"}, "fix_agent_enabled": {"default": false, "title": "Fix Agent Enabled", "type": "boolean"}, "aws_broker_enabled": {"default": true, "title": "Aws Broker Enabled", "type": "boolean"}, "max_consecutive_failures": {"default": 5, "maximum": 1000000, "minimum": 1, "title": "Max Consecutive Failures", "type": "integer"}, "schedule_expression": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Schedule Expression"}, "credential_source": {"default": "both", "title": "Credential Source", "type": "string"}, "credential_user_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Credential User Id"}, "agent_teammate_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Agent Teammate Id"}, "lambda_timeout_seconds": {"default": 900, "maximum": 900, "minimum": 1, "title": "Lambda Timeout Seconds", "type": "integer"}, "agent_type": {"default": "claude", "enum": ["claude", "codex"], "title": "Agent Type", "type": "string"}, "agent_model": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Agent Model"}, "agent_reasoning_effort": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Agent Reasoning Effort"}, "resume_enabled": {"default": false, "title": "Resume Enabled", "type": "boolean"}, "linked_app_slug": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Linked App Slug"}, "output_surface": {"default": "none", "enum": ["none", "static_app", "data_backed_app"], "title": "Output Surface", "type": "string"}, "is_pr_reviewer": {"default": false, "title": "Is Pr Reviewer", "type": "boolean"}}, "required": ["name"], "title": "CustomAutomationCreateSchema", "type": "object"}, "CustomAutomationListSchema": {"description": "Response schema for listing custom automations.", "properties": {"automations": {"items": {"$ref": "#/components/schemas/CustomAutomationSchema"}, "title": "Automations", "type": "array"}, "total": {"title": "Total", "type": "integer"}}, "required": ["automations", "total"], "title": "CustomAutomationListSchema", "type": "object"}, "AutomationSummarySchema": {"description": "Per-automation summary with active counts and recent runs.", "properties": {"config_id": {"title": "Config Id", "type": "string"}, "active_count": {"title": "Active Count", "type": "integer"}, "recent_runs": {"items": {"$ref": "#/components/schemas/RunBriefSchema"}, "title": "Recent Runs", "type": "array"}, "total_runs_30d": {"title": "Total Runs 30D", "type": "integer"}, "completed_runs_30d": {"title": "Completed Runs 30D", "type": "integer"}, "failed_runs_30d": {"title": "Failed Runs 30D", "type": "integer"}, "usage_this_week": {"allOf": [{"$ref": "#/components/schemas/AutomationRunUsageSchema"}]}}, "required": ["config_id", "active_count", "recent_runs", "total_runs_30d", "completed_runs_30d", "failed_runs_30d"], "title": "AutomationSummarySchema", "type": "object"}, "RunBriefSchema": {"description": "Brief summary of an automation run for the dashboard.", "properties": {"id": {"title": "Id", "type": "integer"}, "uuid": {"title": "Uuid", "type": "string"}, "status": {"title": "Status", "type": "string"}, "trigger_event_type": {"title": "Trigger Event Type", "type": "string"}, "execution_target": {"default": "live", "title": "Execution Target", "type": "string"}, "grouping_key": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Grouping Key"}, "metadata": {"additionalProperties": true, "default": {}, "title": "Metadata", "type": "object"}, "started_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Started At"}, "scheduled_for": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Scheduled For"}, "completed_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Completed At"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "result_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Result Url"}, "error_message": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error Message"}, "retry_count": {"default": 0, "title": "Retry Count", "type": "integer"}, "agent_session_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Agent Session Id"}}, "required": ["id", "uuid", "status", "trigger_event_type", "created_at"], "title": "RunBriefSchema", "type": "object"}, "CustomAutomationUpdateSchema": {"description": "Request schema for partial updates to a custom automation.", "properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "trigger_events": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Trigger Events"}, "handler_code": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Handler Code"}, "dockerfile": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Dockerfile"}, "handler_repo": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Handler Repo"}, "handler_path": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Handler Path"}, "handler_commit_sha": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Handler Commit Sha"}, "is_enabled": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Enabled"}, "secrets": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"type": "null"}], "title": "Secrets"}, "vault_secret_refs": {"anyOf": [{"items": {"$ref": "#/components/schemas/VaultSecretRefSchema"}, "type": "array"}, {"type": "null"}], "title": "Vault Secret Refs"}, "vault_secrets": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"type": "null"}], "title": "Vault Secrets"}, "webhook_signature_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Webhook Signature Type"}, "webhook_signing_secret": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Webhook Signing Secret"}, "slack_channel_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Slack Channel Id"}, "slack_message_prefix": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Slack Message Prefix"}, "slack_dm_notify_on_user_question": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Slack Dm Notify On User Question"}, "slack_dm_notify_on_turn_complete": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Slack Dm Notify On Turn Complete"}, "cooldown_seconds": {"anyOf": [{"maximum": 86400, "minimum": 0, "type": "integer"}, {"type": "null"}], "title": "Cooldown Seconds"}, "max_concurrent_runs": {"anyOf": [{"minimum": 1, "type": "integer"}, {"type": "null"}], "title": "Max Concurrent Runs"}, "max_concurrent_per_scope": {"anyOf": [{"minimum": 0, "type": "integer"}, {"type": "null"}], "title": "Max Concurrent Per Scope"}, "concurrency_policy": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Concurrency Policy"}, "rate_limit_per_minute": {"anyOf": [{"minimum": 0, "type": "integer"}, {"type": "null"}], "title": "Rate Limit Per Minute"}, "retry_on_failure": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Retry On Failure"}, "max_retries": {"anyOf": [{"maximum": 10, "minimum": 1, "type": "integer"}, {"type": "null"}], "title": "Max Retries"}, "optimizer_enabled": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Optimizer Enabled"}, "fix_agent_enabled": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Fix Agent Enabled"}, "aws_broker_enabled": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Aws Broker Enabled"}, "max_consecutive_failures": {"anyOf": [{"maximum": 1000000, "minimum": 1, "type": "integer"}, {"type": "null"}], "title": "Max Consecutive Failures"}, "schedule_expression": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Schedule Expression"}, "credential_source": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Credential Source"}, "credential_user_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Credential User Id"}, "agent_teammate_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Agent Teammate Id"}, "lambda_timeout_seconds": {"anyOf": [{"maximum": 900, "minimum": 1, "type": "integer"}, {"type": "null"}], "title": "Lambda Timeout Seconds"}, "agent_type": {"anyOf": [{"enum": ["claude", "codex"], "type": "string"}, {"type": "null"}], "title": "Agent Type"}, "agent_model": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Agent Model"}, "agent_reasoning_effort": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Agent Reasoning Effort"}, "resume_enabled": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Resume Enabled"}, "linked_app_slug": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Linked App Slug"}, "output_surface": {"anyOf": [{"enum": ["none", "static_app", "data_backed_app"], "type": "string"}, {"type": "null"}], "title": "Output Surface"}, "is_pr_reviewer": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Pr Reviewer"}}, "title": "CustomAutomationUpdateSchema", "type": "object"}, "TestWebhookSchema": {"description": "Request schema for testing a custom automation with mock payload.", "properties": {"payload": {"additionalProperties": true, "default": {}, "title": "Payload", "type": "object"}}, "title": "TestWebhookSchema", "type": "object"}, "HandlerHistorySchema": {"description": "Response schema for handler version history.", "properties": {"versions": {"items": {"$ref": "#/components/schemas/HandlerVersionSchema"}, "title": "Versions", "type": "array"}}, "required": ["versions"], "title": "HandlerHistorySchema", "type": "object"}, "HandlerVersionSchema": {"description": "Response schema for a handler version in commit history.", "properties": {"sha": {"title": "Sha", "type": "string"}, "message": {"title": "Message", "type": "string"}, "author": {"title": "Author", "type": "string"}, "date": {"format": "date-time", "title": "Date", "type": "string"}}, "required": ["sha", "message", "author", "date"], "title": "HandlerVersionSchema", "type": "object"}, "RollbackSchema": {"description": "Request schema for rolling back to a specific version.", "properties": {"commit_sha": {"title": "Commit Sha", "type": "string"}}, "required": ["commit_sha"], "title": "RollbackSchema", "type": "object"}, "LockScopeResponseSchema": {"description": "Response schema for lock/unlock scope operations.", "properties": {"config_id": {"title": "Config Id", "type": "string"}, "grouping_key": {"title": "Grouping Key", "type": "string"}, "enforcement": {"title": "Enforcement", "type": "string"}, "locked_scopes": {"additionalProperties": true, "default": {}, "title": "Locked Scopes", "type": "object"}, "warning": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Warning"}}, "required": ["config_id", "grouping_key", "enforcement"], "title": "LockScopeResponseSchema", "type": "object"}, "LockScopeRequestSchema": {"description": "Request schema for locking a scope on an automation.", "properties": {"grouping_key": {"title": "Grouping Key", "type": "string"}, "reason": {"default": "", "title": "Reason", "type": "string"}}, "required": ["grouping_key"], "title": "LockScopeRequestSchema", "type": "object"}, "UnlockScopeRequestSchema": {"description": "Request schema for unlocking a scope on an automation.", "properties": {"grouping_key": {"title": "Grouping Key", "type": "string"}}, "required": ["grouping_key"], "title": "UnlockScopeRequestSchema", "type": "object"}, "AutomationCommitCodeResponseSchema": {"description": "Response schema for a handler-code commit.", "properties": {"commit_sha": {"title": "Commit Sha", "type": "string"}, "changed": {"title": "Changed", "type": "boolean"}, "build_triggered": {"title": "Build Triggered", "type": "boolean"}, "blueprint_warning": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Blueprint Warning"}}, "required": ["commit_sha", "changed", "build_triggered"], "title": "AutomationCommitCodeResponseSchema", "type": "object"}, "AutomationCommitCodeSchema": {"description": "Request schema for committing handler files to the draft slot.", "properties": {"files": {"additionalProperties": {"type": "string"}, "title": "Files", "type": "object"}, "commit_message": {"default": "update handler code", "title": "Commit Message", "type": "string"}}, "required": ["files"], "title": "AutomationCommitCodeSchema", "type": "object"}, "AcceptedRunResponse": {"description": "Accepted response that returns a run identifier.", "properties": {"status": {"title": "Status", "type": "string"}, "run_id": {"title": "Run Id", "type": "string"}}, "required": ["status", "run_id"], "title": "AcceptedRunResponse", "type": "object"}, "CallbackSchema": {"description": "Request schema for the legacy spawn-only Lambda handler callback.\n\nKept for backwards compatibility: handler code that explicitly POSTs to\n``/callback`` to request an agent spawn still works. The async result\nenvelope (success/failure/skipped, workflow result, raw/redacted payload)\nflows through ``ResultCallbackSchema`` / ``/result-callback`` instead.", "properties": {"run_id": {"title": "Run Id", "type": "integer"}, "callback_token": {"title": "Callback Token", "type": "string"}, "instruction": {"title": "Instruction", "type": "string"}, "repository_full_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Repository Full Name"}, "handoff_attempt_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Handoff Attempt Id"}, "handoff_token": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Handoff Token"}}, "required": ["run_id", "callback_token", "instruction"], "title": "CallbackSchema", "type": "object"}, "ResultCallbackSchema": {"description": "Request schema for the async Lambda result callback (issue #3042).\n\nPosted by the backend-owned automation runtime (``codepress_automations.py``)\nat the end of an async (``InvocationType=\"Event\"``) invocation so the backend\ncan finalize the run. The Celery worker is freed at dispatch time; this\ncallback carries the full result envelope the synchronous return value used\nto provide.\n\nIdempotency: a callback only finalizes the run when ``invocation_attempt_id``\nmatches the run's current attempt. Stale, duplicate, cancelled, or superseded\nattempts are accepted with 200 and ignored so the handler never retries.", "properties": {"run_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Run Id"}, "run_uuid": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Run Uuid"}, "callback_token": {"title": "Callback Token", "type": "string"}, "invocation_attempt_id": {"title": "Invocation Attempt Id", "type": "string"}, "handoff_attempt_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Handoff Attempt Id"}, "handoff_token": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Handoff Token"}, "status": {"enum": ["success", "failure", "skipped"], "title": "Status", "type": "string"}, "grouping_key": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Grouping Key"}, "result": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Result"}, "error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error"}, "error_class": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error Class"}, "logs": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Logs"}}, "required": ["callback_token", "invocation_attempt_id", "status"], "title": "ResultCallbackSchema", "type": "object"}, "RecipientConfigSchema": {"description": "One automation config exposed to recipient viewers of a slug page.", "properties": {"uuid": {"title": "Uuid", "type": "string"}, "name": {"title": "Name", "type": "string"}, "description": {"default": "", "title": "Description", "type": "string"}}, "required": ["uuid", "name"], "title": "RecipientConfigSchema", "type": "object"}, "RecipientRunStartedSchema": {"description": "Response schema returned immediately after a recipient run is queued.", "properties": {"run_id": {"title": "Run Id", "type": "integer"}, "run_uuid": {"title": "Run Uuid", "type": "string"}, "status": {"title": "Status", "type": "string"}}, "required": ["run_id", "run_uuid", "status"], "title": "RecipientRunStartedSchema", "type": "object"}, "RecipientRunRequestSchema": {"description": "Request schema for a recipient-triggered automation run.\n\nRecipients viewing a `/for/<slug>` page POST this to start a demo run of\na custom automation in the slug's allowlisted demo org.", "properties": {"payload": {"additionalProperties": true, "default": {}, "title": "Payload", "type": "object"}}, "title": "RecipientRunRequestSchema", "type": "object"}, "RecipientRunStatusSchema": {"description": "Response schema for polling a recipient-triggered automation run.", "properties": {"run_id": {"title": "Run Id", "type": "integer"}, "run_uuid": {"title": "Run Uuid", "type": "string"}, "status": {"title": "Status", "type": "string"}, "started_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Started At"}, "completed_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Completed At"}, "result_data": {"title": "Result Data"}, "error_message": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error Message"}, "duration_ms": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Duration Ms"}}, "required": ["run_id", "run_uuid", "status"], "title": "RecipientRunStatusSchema", "type": "object"}, "_ListToolsRequest": {"properties": {"server": {"title": "Server", "type": "string"}}, "required": ["server"], "title": "_ListToolsRequest", "type": "object"}, "_CallToolRequest": {"properties": {"server": {"title": "Server", "type": "string"}, "tool": {"title": "Tool", "type": "string"}, "arguments": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Arguments"}, "timeout_s": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Timeout S"}}, "required": ["server", "tool"], "title": "_CallToolRequest", "type": "object"}, "QuicklinkResponse": {"properties": {"id": {"title": "Id", "type": "string"}, "slug": {"title": "Slug", "type": "string"}, "destination_url": {"title": "Destination Url", "type": "string"}, "description": {"title": "Description", "type": "string"}, "usage_count": {"title": "Usage Count", "type": "integer"}, "created_by_email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By Email"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}}, "required": ["id", "slug", "destination_url", "description", "usage_count", "created_at", "updated_at"], "title": "QuicklinkResponse", "type": "object"}, "CreateQuicklinkRequest": {"properties": {"slug": {"title": "Slug", "type": "string"}, "destination_url": {"title": "Destination Url", "type": "string"}, "description": {"default": "", "title": "Description", "type": "string"}}, "required": ["slug", "destination_url"], "title": "CreateQuicklinkRequest", "type": "object"}, "UpdateQuicklinkRequest": {"properties": {"slug": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Slug"}, "destination_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Destination Url"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}}, "title": "UpdateQuicklinkRequest", "type": "object"}, "SuccessResponse": {"description": "Simple success response.", "properties": {"success": {"default": true, "title": "Success", "type": "boolean"}}, "title": "SuccessResponse", "type": "object"}, "ResolveQuicklinkResponse": {"properties": {"destination_url": {"title": "Destination Url", "type": "string"}, "slug": {"title": "Slug", "type": "string"}}, "required": ["destination_url", "slug"], "title": "ResolveQuicklinkResponse", "type": "object"}, "EncryptedField": {"description": "AES-256-GCM encrypted field (hex-encoded).", "properties": {"ciphertext": {"title": "Ciphertext", "type": "string"}, "iv": {"title": "Iv", "type": "string"}, "tag": {"title": "Tag", "type": "string"}}, "required": ["ciphertext", "iv", "tag"], "title": "EncryptedField", "type": "object"}, "MemberKeyInfo": {"description": "Current user's member key data embedded in vault response.", "properties": {"id": {"title": "Id", "type": "string"}, "salt_hex": {"title": "Salt Hex", "type": "string"}, "pbkdf2_iterations": {"title": "Pbkdf2 Iterations", "type": "integer"}, "verification_encrypted": {"$ref": "#/components/schemas/EncryptedField"}, "encrypted_private_key": {"$ref": "#/components/schemas/EncryptedField"}, "encrypted_vault_key": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Encrypted Vault Key"}, "status": {"title": "Status", "type": "string"}}, "required": ["id", "salt_hex", "pbkdf2_iterations", "verification_encrypted", "encrypted_private_key", "status"], "title": "MemberKeyInfo", "type": "object"}, "PaginatedVaultListResponse": {"description": "Paginated vault list.", "properties": {"vaults": {"items": {"$ref": "#/components/schemas/VaultListItemResponse"}, "title": "Vaults", "type": "array"}, "total": {"title": "Total", "type": "integer"}, "page": {"title": "Page", "type": "integer"}, "page_size": {"title": "Page Size", "type": "integer"}}, "required": ["vaults", "total", "page", "page_size"], "title": "PaginatedVaultListResponse", "type": "object"}, "VaultListItemResponse": {"description": "Vault summary for list views.", "properties": {"id": {"title": "Id", "type": "string"}, "name": {"title": "Name", "type": "string"}, "secret_count": {"title": "Secret Count", "type": "integer"}, "my_role": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "My Role"}, "member_count": {"default": 0, "title": "Member Count", "type": "integer"}, "auto_grant_enabled": {"default": false, "title": "Auto Grant Enabled", "type": "boolean"}, "is_agent_vault": {"default": false, "title": "Is Agent Vault", "type": "boolean"}, "is_org_agent_vault": {"default": false, "title": "Is Org Agent Vault", "type": "boolean"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}, "member_key": {"anyOf": [{"$ref": "#/components/schemas/MemberKeyInfo"}, {"type": "null"}]}}, "required": ["id", "name", "secret_count", "created_at", "updated_at"], "title": "VaultListItemResponse", "type": "object"}, "VaultDetailResponse": {"description": "Full vault metadata for detail view.\n\nCrypto fields (salt_hex, pbkdf2_iterations, verification_encrypted)\nare only included for ACL members. Non-members see nulls.", "properties": {"id": {"title": "Id", "type": "string"}, "name": {"title": "Name", "type": "string"}, "salt_hex": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Salt Hex"}, "pbkdf2_iterations": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Pbkdf2 Iterations"}, "verification_encrypted": {"anyOf": [{"$ref": "#/components/schemas/EncryptedField"}, {"type": "null"}]}, "secret_count": {"title": "Secret Count", "type": "integer"}, "my_role": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "My Role"}, "member_count": {"default": 0, "title": "Member Count", "type": "integer"}, "auto_grant_enabled": {"default": false, "title": "Auto Grant Enabled", "type": "boolean"}, "is_agent_vault": {"default": false, "title": "Is Agent Vault", "type": "boolean"}, "is_org_agent_vault": {"default": false, "title": "Is Org Agent Vault", "type": "boolean"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}, "member_key": {"anyOf": [{"$ref": "#/components/schemas/MemberKeyInfo"}, {"type": "null"}]}}, "required": ["id", "name", "secret_count", "created_at", "updated_at"], "title": "VaultDetailResponse", "type": "object"}, "CreateVaultRequest": {"description": "Create a new named vault.", "properties": {"name": {"title": "Name", "type": "string"}, "salt_hex": {"title": "Salt Hex", "type": "string"}, "verification_encrypted": {"$ref": "#/components/schemas/EncryptedField"}, "pbkdf2_iterations": {"default": 600000, "minimum": 600000, "title": "Pbkdf2 Iterations", "type": "integer"}, "member_key": {"$ref": "#/components/schemas/SetMemberKeyRequest"}, "auto_grant_enabled": {"default": false, "title": "Auto Grant Enabled", "type": "boolean"}}, "required": ["name", "salt_hex", "verification_encrypted", "member_key"], "title": "CreateVaultRequest", "type": "object"}, "SetMemberKeyRequest": {"description": "Per-user RSA key material for vault access.", "properties": {"salt_hex": {"title": "Salt Hex", "type": "string"}, "verification_encrypted": {"$ref": "#/components/schemas/EncryptedField"}, "pbkdf2_iterations": {"default": 600000, "minimum": 600000, "title": "Pbkdf2 Iterations", "type": "integer"}, "public_key_jwk": {"additionalProperties": true, "title": "Public Key Jwk", "type": "object"}, "encrypted_private_key": {"$ref": "#/components/schemas/EncryptedField"}, "encrypted_vault_key": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Encrypted Vault Key"}}, "required": ["salt_hex", "verification_encrypted", "public_key_jwk", "encrypted_private_key"], "title": "SetMemberKeyRequest", "type": "object"}, "UpdateVaultRequest": {"description": "Update vault metadata.", "properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name"}, "auto_grant_enabled": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Auto Grant Enabled"}}, "title": "UpdateVaultRequest", "type": "object"}, "VaultSecretResponse": {"properties": {"id": {"title": "Id", "type": "string"}, "vault_id": {"title": "Vault Id", "type": "string"}, "name": {"title": "Name", "type": "string"}, "description": {"title": "Description", "type": "string"}, "field_names": {"items": {"type": "string"}, "title": "Field Names", "type": "array"}, "scope": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Scope"}, "vault_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Vault Name"}, "created_by_email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By Email"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}}, "required": ["id", "vault_id", "name", "description", "field_names", "created_at", "updated_at"], "title": "VaultSecretResponse", "type": "object"}, "CreateSecretRequest": {"properties": {"name": {"title": "Name", "type": "string"}, "description": {"default": "", "title": "Description", "type": "string"}, "encrypted_fields": {"additionalProperties": {"$ref": "#/components/schemas/EncryptedField"}, "title": "Encrypted Fields", "type": "object"}}, "required": ["name", "encrypted_fields"], "title": "CreateSecretRequest", "type": "object"}, "VaultSecretDetailResponse": {"description": "Includes full ciphertext for editing.", "properties": {"id": {"title": "Id", "type": "string"}, "vault_id": {"title": "Vault Id", "type": "string"}, "name": {"title": "Name", "type": "string"}, "description": {"title": "Description", "type": "string"}, "field_names": {"items": {"type": "string"}, "title": "Field Names", "type": "array"}, "scope": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Scope"}, "vault_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Vault Name"}, "created_by_email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By Email"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}, "encrypted_fields": {"additionalProperties": {"$ref": "#/components/schemas/EncryptedField"}, "title": "Encrypted Fields", "type": "object"}}, "required": ["id", "vault_id", "name", "description", "field_names", "created_at", "updated_at", "encrypted_fields"], "title": "VaultSecretDetailResponse", "type": "object"}, "UpdateSecretRequest": {"properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "encrypted_fields": {"anyOf": [{"additionalProperties": {"$ref": "#/components/schemas/EncryptedField"}, "type": "object"}, {"type": "null"}], "title": "Encrypted Fields"}}, "title": "UpdateSecretRequest", "type": "object"}, "VaultMemberResponse": {"description": "Vault member info for listing.", "properties": {"id": {"title": "Id", "type": "string"}, "user_id": {"title": "User Id", "type": "string"}, "user_email": {"title": "User Email", "type": "string"}, "role": {"title": "Role", "type": "string"}, "has_vault_key": {"title": "Has Vault Key", "type": "boolean"}, "added_by_email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Added By Email"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}}, "required": ["id", "user_id", "user_email", "role", "has_vault_key", "created_at"], "title": "VaultMemberResponse", "type": "object"}, "AddVaultMemberRequest": {"description": "Add a user to a vault's ACL.", "properties": {"user_id": {"title": "User Id", "type": "string"}, "role": {"default": "read", "title": "Role", "type": "string"}}, "required": ["user_id"], "title": "AddVaultMemberRequest", "type": "object"}, "MemberKeyResponse": {"description": "Member key info for admin listing.", "properties": {"id": {"title": "Id", "type": "string"}, "user_id": {"title": "User Id", "type": "string"}, "user_email": {"title": "User Email", "type": "string"}, "has_vault_key": {"title": "Has Vault Key", "type": "boolean"}, "role": {"title": "Role", "type": "string"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}}, "required": ["id", "user_id", "user_email", "has_vault_key", "role", "created_at"], "title": "MemberKeyResponse", "type": "object"}, "PendingMemberKeyResponse": {"description": "Pending member key with public key for grant operations.", "properties": {"id": {"title": "Id", "type": "string"}, "user_id": {"title": "User Id", "type": "string"}, "user_email": {"title": "User Email", "type": "string"}, "public_key_jwk": {"additionalProperties": true, "title": "Public Key Jwk", "type": "object"}}, "required": ["id", "user_id", "user_email", "public_key_jwk"], "title": "PendingMemberKeyResponse", "type": "object"}, "GrantVaultKeyRequest": {"description": "Vault owner sends the RSA-OAEP wrapped DEK for a pending member.", "properties": {"encrypted_vault_key": {"title": "Encrypted Vault Key", "type": "string"}}, "required": ["encrypted_vault_key"], "title": "GrantVaultKeyRequest", "type": "object"}, "PasskeyCredentialResponse": {"description": "Public info about a registered passkey.", "properties": {"id": {"title": "Id", "type": "string"}, "credential_id": {"title": "Credential Id", "type": "string"}, "friendly_name": {"title": "Friendly Name", "type": "string"}, "transports": {"items": {"type": "string"}, "title": "Transports", "type": "array"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}}, "required": ["id", "credential_id", "friendly_name", "transports", "created_at"], "title": "PasskeyCredentialResponse", "type": "object"}, "PasskeyRegistrationCompleteRequest": {"description": "Sent after the browser WebAuthn registration ceremony.", "properties": {"challenge_id": {"title": "Challenge Id", "type": "string"}, "registration_response": {"additionalProperties": true, "title": "Registration Response", "type": "object"}, "prf_salt_hex": {"title": "Prf Salt Hex", "type": "string"}, "wrapped_key_hex": {"title": "Wrapped Key Hex", "type": "string"}, "friendly_name": {"default": "", "title": "Friendly Name", "type": "string"}}, "required": ["challenge_id", "registration_response", "prf_salt_hex", "wrapped_key_hex"], "title": "PasskeyRegistrationCompleteRequest", "type": "object"}, "PasskeyAuthenticationOptionsResponse": {"description": "Authentication options plus per-credential PRF data.", "properties": {"options": {"additionalProperties": true, "title": "Options", "type": "object"}, "challenge_id": {"title": "Challenge Id", "type": "string"}, "prf_infos": {"items": {"$ref": "#/components/schemas/PasskeyPrfInfo"}, "title": "Prf Infos", "type": "array"}}, "required": ["options", "challenge_id", "prf_infos"], "title": "PasskeyAuthenticationOptionsResponse", "type": "object"}, "PasskeyPrfInfo": {"description": "Per-credential PRF info returned with authentication options.", "properties": {"credential_id": {"title": "Credential Id", "type": "string"}, "prf_salt_hex": {"title": "Prf Salt Hex", "type": "string"}, "wrapped_key_hex": {"title": "Wrapped Key Hex", "type": "string"}}, "required": ["credential_id", "prf_salt_hex", "wrapped_key_hex"], "title": "PasskeyPrfInfo", "type": "object"}, "PasskeyAuthenticationCompleteResponse": {"description": "Returned after successful authentication verification.", "properties": {"credential_id": {"title": "Credential Id", "type": "string"}, "wrapped_key_hex": {"title": "Wrapped Key Hex", "type": "string"}}, "required": ["credential_id", "wrapped_key_hex"], "title": "PasskeyAuthenticationCompleteResponse", "type": "object"}, "PasskeyAuthenticationCompleteRequest": {"description": "Sent after the browser WebAuthn authentication ceremony.", "properties": {"challenge_id": {"title": "Challenge Id", "type": "string"}, "authentication_response": {"additionalProperties": true, "title": "Authentication Response", "type": "object"}}, "required": ["challenge_id", "authentication_response"], "title": "PasskeyAuthenticationCompleteRequest", "type": "object"}, "BrokerVaultAwsStatusResponse": {"description": "Write-only AWS broker credential status.", "properties": {"has_access_key_id": {"title": "Has Access Key Id", "type": "boolean"}, "has_secret_access_key": {"title": "Has Secret Access Key", "type": "boolean"}, "has_role_arn": {"title": "Has Role Arn", "type": "boolean"}, "has_external_id": {"title": "Has External Id", "type": "boolean"}, "configured": {"title": "Configured", "type": "boolean"}, "mode": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Mode"}, "has_deploy_access_key_id": {"default": false, "title": "Has Deploy Access Key Id", "type": "boolean"}, "has_deploy_secret_access_key": {"default": false, "title": "Has Deploy Secret Access Key", "type": "boolean"}, "has_deploy_role_arn": {"default": false, "title": "Has Deploy Role Arn", "type": "boolean"}, "has_deploy_external_id": {"default": false, "title": "Has Deploy External Id", "type": "boolean"}, "deploy_configured": {"default": false, "title": "Deploy Configured", "type": "boolean"}, "updated_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Updated At"}}, "required": ["has_access_key_id", "has_secret_access_key", "has_role_arn", "has_external_id", "configured"], "title": "BrokerVaultAwsStatusResponse", "type": "object"}, "SetBrokerVaultAwsCredentialsRequest": {"description": "Create, update, or clear AWS broker credential fields.\n\n``None`` means leave the stored value unchanged. Empty string means clear\nthat field. Non-empty string is Fernet-encrypted and stored.", "properties": {"aws_access_key_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Aws Access Key Id"}, "aws_secret_access_key": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Aws Secret Access Key"}, "aws_role_arn": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Aws Role Arn"}, "aws_external_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Aws External Id"}, "aws_deploy_access_key_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Aws Deploy Access Key Id"}, "aws_deploy_secret_access_key": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Aws Deploy Secret Access Key"}, "aws_deploy_role_arn": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Aws Deploy Role Arn"}, "aws_deploy_external_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Aws Deploy External Id"}}, "title": "SetBrokerVaultAwsCredentialsRequest", "type": "object"}, "BrokerVaultAwsValidationResponse": {"description": "Result of a live test-mint against the stored broker key.\n\n``ok`` is True when the broker could mint a short-lived token. On failure\n``error`` is the broker's structured code (NO_KEY / INVALID_KEY / NO_PERMS /\nMINT_ERROR) and ``message`` is the human-readable reason. ``purpose`` echoes\nwhich mint path was validated (\"cli\" or \"deploy\"). The minted credentials\nthemselves are never returned.", "properties": {"ok": {"title": "Ok", "type": "boolean"}, "mode": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Mode"}, "purpose": {"default": "cli", "title": "Purpose", "type": "string"}, "error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error"}, "message": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Message"}}, "required": ["ok"], "title": "BrokerVaultAwsValidationResponse", "type": "object"}, "AgentVaultInfoResponse": {"description": "Metadata about the org's agent vault.", "properties": {"id": {"title": "Id", "type": "string"}, "name": {"title": "Name", "type": "string"}, "secret_count": {"title": "Secret Count", "type": "integer"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}}, "required": ["id", "name", "secret_count", "created_at", "updated_at"], "title": "AgentVaultInfoResponse", "type": "object"}, "AgentVaultSecretInfo": {"description": "Agent vault secret metadata (no plaintext).", "properties": {"id": {"title": "Id", "type": "string"}, "name": {"title": "Name", "type": "string"}, "description": {"title": "Description", "type": "string"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}}, "required": ["id", "name", "description", "created_at", "updated_at"], "title": "AgentVaultSecretInfo", "type": "object"}, "SetAgentVaultSecretRequest": {"description": "Create or update an agent-vault secret with a plaintext value.", "properties": {"name": {"title": "Name", "type": "string"}, "value": {"title": "Value", "type": "string"}, "description": {"default": "", "title": "Description", "type": "string"}}, "required": ["name", "value"], "title": "SetAgentVaultSecretRequest", "type": "object"}, "AgentVaultSecretValueResponse": {"description": "Agent vault secret with decrypted plaintext value.", "properties": {"id": {"title": "Id", "type": "string"}, "name": {"title": "Name", "type": "string"}, "description": {"title": "Description", "type": "string"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}, "value": {"title": "Value", "type": "string"}}, "required": ["id", "name", "description", "created_at", "updated_at", "value"], "title": "AgentVaultSecretValueResponse", "type": "object"}, "IntegrationStatus": {"description": "Status of a single integration for the overview page.", "properties": {"org_connected": {"default": false, "title": "Org Connected", "type": "boolean"}, "org_detail": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Org Detail"}, "user_connected": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "User Connected"}, "user_setup_needed": {"default": false, "title": "User Setup Needed", "type": "boolean"}, "user_sharing_with_org": {"default": false, "title": "User Sharing With Org", "type": "boolean"}}, "title": "IntegrationStatus", "type": "object"}, "OverviewStatusResponse": {"description": "Response for GET /integrations/overview-status/{org_id}.", "properties": {"slack": {"allOf": [{"$ref": "#/components/schemas/IntegrationStatus"}], "default": {"org_connected": false, "org_detail": null, "user_connected": null, "user_setup_needed": false, "user_sharing_with_org": false}}, "mcp": {"allOf": [{"$ref": "#/components/schemas/IntegrationStatus"}], "default": {"org_connected": false, "org_detail": null, "user_connected": null, "user_setup_needed": false, "user_sharing_with_org": false}}, "github": {"allOf": [{"$ref": "#/components/schemas/IntegrationStatus"}], "default": {"org_connected": false, "org_detail": null, "user_connected": null, "user_setup_needed": false, "user_sharing_with_org": false}}, "figma": {"allOf": [{"$ref": "#/components/schemas/IntegrationStatus"}], "default": {"org_connected": false, "org_detail": null, "user_connected": null, "user_setup_needed": false, "user_sharing_with_org": false}}, "google_workspace": {"allOf": [{"$ref": "#/components/schemas/IntegrationStatus"}], "default": {"org_connected": false, "org_detail": null, "user_connected": null, "user_setup_needed": false, "user_sharing_with_org": false}}, "vercel": {"allOf": [{"$ref": "#/components/schemas/IntegrationStatus"}], "default": {"org_connected": false, "org_detail": null, "user_connected": null, "user_setup_needed": false, "user_sharing_with_org": false}}, "database": {"allOf": [{"$ref": "#/components/schemas/IntegrationStatus"}], "default": {"org_connected": false, "org_detail": null, "user_connected": null, "user_setup_needed": false, "user_sharing_with_org": false}}, "ci_autofix": {"allOf": [{"$ref": "#/components/schemas/IntegrationStatus"}], "default": {"org_connected": false, "org_detail": null, "user_connected": null, "user_setup_needed": false, "user_sharing_with_org": false}}, "custom_automations": {"allOf": [{"$ref": "#/components/schemas/IntegrationStatus"}], "default": {"org_connected": false, "org_detail": null, "user_connected": null, "user_setup_needed": false, "user_sharing_with_org": false}}, "whatsapp": {"allOf": [{"$ref": "#/components/schemas/IntegrationStatus"}], "default": {"org_connected": false, "org_detail": null, "user_connected": null, "user_setup_needed": false, "user_sharing_with_org": false}}, "inbox": {"allOf": [{"$ref": "#/components/schemas/IntegrationStatus"}], "default": {"org_connected": false, "org_detail": null, "user_connected": null, "user_setup_needed": false, "user_sharing_with_org": false}}, "knowledge_sources": {"allOf": [{"$ref": "#/components/schemas/IntegrationStatus"}], "default": {"org_connected": false, "org_detail": null, "user_connected": null, "user_setup_needed": false, "user_sharing_with_org": false}}}, "title": "OverviewStatusResponse", "type": "object"}, "DriveConnectionStatus": {"properties": {"connected": {"title": "Connected", "type": "boolean"}, "email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Email"}}, "required": ["connected"], "title": "DriveConnectionStatus", "type": "object"}, "DriveOAuthStartResponse": {"properties": {"authorization_url": {"title": "Authorization Url", "type": "string"}}, "required": ["authorization_url"], "title": "DriveOAuthStartResponse", "type": "object"}, "DrivePickerHandoffResponse": {"properties": {"picker_session_id": {"format": "uuid", "title": "Picker Session Id", "type": "string"}, "access_token": {"title": "Access Token", "type": "string"}, "app_id": {"title": "App Id", "type": "string"}, "developer_key": {"title": "Developer Key", "type": "string"}, "max_files": {"default": 50, "title": "Max Files", "type": "integer"}}, "required": ["picker_session_id", "access_token", "app_id", "developer_key"], "title": "DrivePickerHandoffResponse", "type": "object"}, "DrivePickerLinkResponse": {"properties": {"picker_url": {"title": "Picker Url", "type": "string"}, "requires_user_action": {"default": true, "title": "Requires User Action", "type": "boolean"}}, "required": ["picker_url"], "title": "DrivePickerLinkResponse", "type": "object"}, "DrivePickerSelectionResponse": {"properties": {"picker_session_id": {"format": "uuid", "title": "Picker Session Id", "type": "string"}, "files": {"items": {"$ref": "#/components/schemas/KnowledgeSourceItem"}, "title": "Files", "type": "array"}}, "required": ["picker_session_id", "files"], "title": "DrivePickerSelectionResponse", "type": "object"}, "KnowledgeSourceItem": {"properties": {"id": {"title": "Id", "type": "string"}, "name": {"title": "Name", "type": "string"}, "mime_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Mime Type"}, "web_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Web Url"}, "modified_time": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Modified Time"}}, "required": ["id", "name"], "title": "KnowledgeSourceItem", "type": "object"}, "DrivePickerSelection": {"properties": {"picker_session_id": {"format": "uuid", "title": "Picker Session Id", "type": "string"}, "file_ids": {"items": {"type": "string"}, "maxItems": 50, "minItems": 1, "title": "File Ids", "type": "array"}}, "required": ["picker_session_id", "file_ids"], "title": "DrivePickerSelection", "type": "object"}, "KnowledgeSourceListResponse": {"properties": {"sources": {"items": {"$ref": "#/components/schemas/KnowledgeSourceRead"}, "title": "Sources", "type": "array"}, "reader_email": {"title": "Reader Email", "type": "string"}}, "required": ["sources", "reader_email"], "title": "KnowledgeSourceListResponse", "type": "object"}, "KnowledgeSourceRead": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "organization_id": {"format": "uuid", "title": "Organization Id", "type": "string"}, "owner_id": {"format": "uuid", "title": "Owner Id", "type": "string"}, "owner_type": {"enum": ["organization", "agent_teammate"], "title": "Owner Type", "type": "string"}, "agent_teammate_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Agent Teammate Id"}, "name": {"title": "Name", "type": "string"}, "description": {"default": "", "title": "Description", "type": "string"}, "usage_instructions": {"default": "", "title": "Usage Instructions", "type": "string"}, "provider": {"const": "google_drive", "title": "Provider", "type": "string"}, "access_mode": {"enum": ["selected_files", "legacy_service_account"], "title": "Access Mode", "type": "string"}, "selected_file_count": {"default": 0, "title": "Selected File Count", "type": "integer"}, "source_url": {"default": "", "title": "Source Url", "type": "string"}, "google_drive_folder_id": {"title": "Google Drive Folder Id", "type": "string"}, "google_drive_id": {"default": "", "title": "Google Drive Id", "type": "string"}, "reader_email": {"title": "Reader Email", "type": "string"}, "is_enabled": {"title": "Is Enabled", "type": "boolean"}, "is_recursive": {"title": "Is Recursive", "type": "boolean"}, "status": {"enum": ["pending", "verified", "error"], "title": "Status", "type": "string"}, "last_verified_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Last Verified At"}, "last_error": {"default": "", "title": "Last Error", "type": "string"}, "can_manage": {"default": false, "title": "Can Manage", "type": "boolean"}, "can_delete": {"default": false, "title": "Can Delete", "type": "boolean"}, "can_manage_editors": {"default": false, "title": "Can Manage Editors", "type": "boolean"}, "created_by": {"anyOf": [{"$ref": "#/components/schemas/KnowledgeSourceUser"}, {"type": "null"}]}, "editors": {"default": [], "items": {"$ref": "#/components/schemas/KnowledgeSourceUser"}, "title": "Editors", "type": "array"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}}, "required": ["id", "organization_id", "owner_id", "owner_type", "name", "provider", "access_mode", "google_drive_folder_id", "reader_email", "is_enabled", "is_recursive", "status", "created_at", "updated_at"], "title": "KnowledgeSourceRead", "type": "object"}, "KnowledgeSourceUser": {"properties": {"id": {"title": "Id", "type": "string"}, "email": {"title": "Email", "type": "string"}, "first_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "First Name"}, "last_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last Name"}, "github_username": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Github Username"}, "avatar_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Avatar Url"}}, "required": ["id", "email"], "title": "KnowledgeSourceUser", "type": "object"}, "KnowledgeSourceCreate": {"properties": {"name": {"maxLength": 120, "minLength": 1, "title": "Name", "type": "string"}, "description": {"default": "", "title": "Description", "type": "string"}, "usage_instructions": {"default": "", "title": "Usage Instructions", "type": "string"}, "provider": {"const": "google_drive", "default": "google_drive", "title": "Provider", "type": "string"}, "source_url": {"default": "", "title": "Source Url", "type": "string"}, "google_drive_folder_id": {"default": "", "title": "Google Drive Folder Id", "type": "string"}, "google_drive_id": {"default": "", "title": "Google Drive Id", "type": "string"}, "is_enabled": {"default": true, "title": "Is Enabled", "type": "boolean"}, "is_recursive": {"default": true, "title": "Is Recursive", "type": "boolean"}, "picker_session_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Picker Session Id"}}, "required": ["name"], "title": "KnowledgeSourceCreate", "type": "object"}, "KnowledgeSourceUpdate": {"properties": {"name": {"anyOf": [{"maxLength": 120, "minLength": 1, "type": "string"}, {"type": "null"}], "title": "Name"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "usage_instructions": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Usage Instructions"}, "source_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Source Url"}, "google_drive_folder_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Google Drive Folder Id"}, "google_drive_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Google Drive Id"}, "is_enabled": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Enabled"}, "is_recursive": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Recursive"}, "picker_session_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Picker Session Id"}}, "title": "KnowledgeSourceUpdate", "type": "object"}, "KnowledgeSourceVerifyResponse": {"properties": {"ok": {"title": "Ok", "type": "boolean"}, "source": {"$ref": "#/components/schemas/KnowledgeSourceRead"}, "message": {"title": "Message", "type": "string"}}, "required": ["ok", "source", "message"], "title": "KnowledgeSourceVerifyResponse", "type": "object"}, "KnowledgeSourceSearchResponse": {"properties": {"source_id": {"format": "uuid", "title": "Source Id", "type": "string"}, "query": {"title": "Query", "type": "string"}, "items": {"items": {"$ref": "#/components/schemas/KnowledgeSourceItem"}, "title": "Items", "type": "array"}, "next_cursor": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Next Cursor"}}, "required": ["source_id", "query", "items"], "title": "KnowledgeSourceSearchResponse", "type": "object"}, "KnowledgeSourceReadResponse": {"properties": {"source_id": {"format": "uuid", "title": "Source Id", "type": "string"}, "item_id": {"title": "Item Id", "type": "string"}, "name": {"title": "Name", "type": "string"}, "mime_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Mime Type"}, "web_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Web Url"}, "text": {"title": "Text", "type": "string"}, "next_cursor": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Next Cursor"}}, "required": ["source_id", "item_id", "name", "text"], "title": "KnowledgeSourceReadResponse", "type": "object"}, "TrackEventResponse": {"properties": {"ok": {"default": true, "title": "Ok", "type": "boolean"}}, "title": "TrackEventResponse", "type": "object"}, "TrackEngineRequest": {"properties": {"repo_owner": {"title": "Repo Owner", "type": "string"}, "repo_name": {"title": "Repo Name", "type": "string"}}, "required": ["repo_owner", "repo_name"], "title": "TrackEngineRequest", "type": "object"}, "InboxStatus": {"properties": {"connected": {"title": "Connected", "type": "boolean"}, "disposable": {"default": false, "title": "Disposable", "type": "boolean"}, "provider": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Provider"}, "email_address": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Email Address"}, "is_active": {"default": false, "title": "Is Active", "type": "boolean"}, "connected_by_email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Connected By Email"}}, "required": ["connected"], "title": "InboxStatus", "type": "object"}, "StartInboxOAuthResponse": {"properties": {"authorization_url": {"title": "Authorization Url", "type": "string"}}, "required": ["authorization_url"], "title": "StartInboxOAuthResponse", "type": "object"}, "StartInboxOAuthBody": {"properties": {"provider": {"title": "Provider", "type": "string"}}, "required": ["provider"], "title": "StartInboxOAuthBody", "type": "object"}, "InboxDisconnectResponse": {"properties": {"ok": {"title": "Ok", "type": "boolean"}}, "required": ["ok"], "title": "InboxDisconnectResponse", "type": "object"}, "MicrosoftGraphSubscriptionList": {"properties": {"subscriptions": {"items": {"$ref": "#/components/schemas/MicrosoftGraphSubscriptionRead"}, "title": "Subscriptions", "type": "array"}}, "required": ["subscriptions"], "title": "MicrosoftGraphSubscriptionList", "type": "object"}, "MicrosoftGraphSubscriptionRead": {"properties": {"id": {"title": "Id", "type": "string"}, "organization_id": {"title": "Organization Id", "type": "string"}, "automation_config_id": {"title": "Automation Config Id", "type": "string"}, "resource_type": {"title": "Resource Type", "type": "string"}, "resource": {"title": "Resource", "type": "string"}, "change_type": {"title": "Change Type", "type": "string"}, "trigger_event_prefix": {"title": "Trigger Event Prefix", "type": "string"}, "graph_subscription_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Graph Subscription Id"}, "expiration_date_time": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Expiration Date Time"}, "status": {"title": "Status", "type": "string"}, "last_error": {"title": "Last Error", "type": "string"}, "last_notification_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last Notification At"}, "last_renewed_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last Renewed At"}, "last_delta_sync_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last Delta Sync At"}}, "required": ["id", "organization_id", "automation_config_id", "resource_type", "resource", "change_type", "trigger_event_prefix", "graph_subscription_id", "expiration_date_time", "status", "last_error", "last_notification_at", "last_renewed_at", "last_delta_sync_at"], "title": "MicrosoftGraphSubscriptionRead", "type": "object"}, "MicrosoftGraphSubscriptionCreate": {"properties": {"automation_config_id": {"title": "Automation Config Id", "type": "string"}, "resource_type": {"title": "Resource Type", "type": "string"}, "resource": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Resource"}, "change_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Change Type"}, "trigger_event_prefix": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Trigger Event Prefix"}, "include_resource_data": {"default": false, "title": "Include Resource Data", "type": "boolean"}, "prime_delta": {"default": true, "title": "Prime Delta", "type": "boolean"}}, "required": ["automation_config_id", "resource_type"], "title": "MicrosoftGraphSubscriptionCreate", "type": "object"}, "MicrosoftGraphSubscriptionDelete": {"properties": {"ok": {"title": "Ok", "type": "boolean"}}, "required": ["ok"], "title": "MicrosoftGraphSubscriptionDelete", "type": "object"}, "CoordinationCreatedBy": {"description": "The user who created a coordination request.", "properties": {"id": {"title": "Id", "type": "string"}, "display_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Display Name"}, "email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Email"}}, "required": ["id"], "title": "CoordinationCreatedBy", "type": "object"}, "CoordinationRequestListResponse": {"description": "Paginated list of coordination requests.", "properties": {"requests": {"items": {"$ref": "#/components/schemas/CoordinationRequestSummary"}, "title": "Requests", "type": "array"}, "total": {"title": "Total", "type": "integer"}, "page": {"title": "Page", "type": "integer"}, "page_size": {"title": "Page Size", "type": "integer"}}, "required": ["requests", "total", "page", "page_size"], "title": "CoordinationRequestListResponse", "type": "object"}, "CoordinationRequestSummary": {"description": "Summary of a coordination request for list views.", "properties": {"id": {"title": "Id", "type": "string"}, "title": {"title": "Title", "type": "string"}, "description": {"title": "Description", "type": "string"}, "request_type": {"title": "Request Type", "type": "string"}, "aggregation_policy": {"title": "Aggregation Policy", "type": "string"}, "aggregation_threshold": {"title": "Aggregation Threshold", "type": "integer"}, "status": {"title": "Status", "type": "string"}, "participant_count": {"default": 0, "title": "Participant Count", "type": "integer"}, "responded_count": {"default": 0, "title": "Responded Count", "type": "integer"}, "expires_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Expires At"}, "resolved_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Resolved At"}, "originating_session_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Originating Session Id"}, "created_by": {"anyOf": [{"$ref": "#/components/schemas/CoordinationCreatedBy"}, {"type": "null"}]}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}}, "required": ["id", "title", "description", "request_type", "aggregation_policy", "aggregation_threshold", "status", "created_at", "updated_at"], "title": "CoordinationRequestSummary", "type": "object"}, "CoordinationOutcomeSchema": {"description": "Outcome/result information for a resolved coordination request.", "properties": {"resolution_summary": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Resolution Summary"}, "agent_action_summary": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Agent Action Summary"}, "executor_session_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Executor Session Id"}, "executor_result": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Executor Result"}, "executor_detail": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Executor Detail"}}, "title": "CoordinationOutcomeSchema", "type": "object"}, "CoordinationParticipantSummary": {"description": "Summary of a coordination participant.", "properties": {"id": {"title": "Id", "type": "string"}, "display_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Display Name"}, "email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Email"}, "delivery_channel": {"title": "Delivery Channel", "type": "string"}, "delivery_status": {"title": "Delivery Status", "type": "string"}, "response_status": {"title": "Response Status", "type": "string"}, "responded_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Responded At"}}, "required": ["id", "delivery_channel", "delivery_status", "response_status"], "title": "CoordinationParticipantSummary", "type": "object"}, "CoordinationRequestDetail": {"description": "Detailed coordination request with participants and responses.", "properties": {"id": {"title": "Id", "type": "string"}, "title": {"title": "Title", "type": "string"}, "description": {"title": "Description", "type": "string"}, "request_type": {"title": "Request Type", "type": "string"}, "aggregation_policy": {"title": "Aggregation Policy", "type": "string"}, "aggregation_threshold": {"title": "Aggregation Threshold", "type": "integer"}, "status": {"title": "Status", "type": "string"}, "participant_count": {"default": 0, "title": "Participant Count", "type": "integer"}, "responded_count": {"default": 0, "title": "Responded Count", "type": "integer"}, "expires_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Expires At"}, "resolved_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Resolved At"}, "originating_session_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Originating Session Id"}, "created_by": {"anyOf": [{"$ref": "#/components/schemas/CoordinationCreatedBy"}, {"type": "null"}]}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}, "response_schema": {"anyOf": [{"items": {"additionalProperties": true, "type": "object"}, "type": "array"}, {"type": "null"}], "title": "Response Schema"}, "participants": {"default": [], "items": {"$ref": "#/components/schemas/CoordinationParticipantSummary"}, "title": "Participants", "type": "array"}, "responses": {"default": [], "items": {"$ref": "#/components/schemas/CoordinationResponseSchema"}, "title": "Responses", "type": "array"}, "context_for_agent": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Context For Agent"}, "thread_conversations": {"default": [], "items": {"$ref": "#/components/schemas/CoordinationThreadConversationSchema"}, "title": "Thread Conversations", "type": "array"}, "outcome": {"anyOf": [{"$ref": "#/components/schemas/CoordinationOutcomeSchema"}, {"type": "null"}]}}, "required": ["id", "title", "description", "request_type", "aggregation_policy", "aggregation_threshold", "status", "created_at", "updated_at"], "title": "CoordinationRequestDetail", "type": "object"}, "CoordinationResponseSchema": {"description": "Schema for a coordination response.", "properties": {"id": {"title": "Id", "type": "string"}, "participant_id": {"title": "Participant Id", "type": "string"}, "participant_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Participant Name"}, "channel": {"title": "Channel", "type": "string"}, "response_text": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Response Text"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}}, "required": ["id", "participant_id", "channel", "created_at"], "title": "CoordinationResponseSchema", "type": "object"}, "CoordinationThreadConversationSchema": {"description": "Thread conversation between the agent and a participant.", "properties": {"participant_id": {"title": "Participant Id", "type": "string"}, "participant_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Participant Name"}, "session_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Session Id"}, "messages": {"default": [], "items": {"$ref": "#/components/schemas/CoordinationThreadMessageSchema"}, "title": "Messages", "type": "array"}}, "required": ["participant_id"], "title": "CoordinationThreadConversationSchema", "type": "object"}, "CoordinationThreadMessageSchema": {"description": "A single message in a coordination thread conversation.", "properties": {"role": {"title": "Role", "type": "string"}, "content": {"title": "Content", "type": "string"}}, "required": ["role", "content"], "title": "CoordinationThreadMessageSchema", "type": "object"}, "OrgPageAccessUserSchema": {"description": "A user authorized to view a SPECIFIC_USERS app.", "properties": {"id": {"title": "Id", "type": "string"}, "email": {"title": "Email", "type": "string"}, "first_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "First Name"}, "last_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last Name"}}, "required": ["id", "email"], "title": "OrgPageAccessUserSchema", "type": "object"}, "OrgPageListSchema": {"description": "Response schema for listing org pages.", "properties": {"pages": {"items": {"$ref": "#/components/schemas/OrgPageSchema"}, "title": "Pages", "type": "array"}, "total": {"title": "Total", "type": "integer"}, "page": {"default": 1, "title": "Page", "type": "integer"}, "page_size": {"default": 12, "title": "Page Size", "type": "integer"}}, "required": ["pages", "total"], "title": "OrgPageListSchema", "type": "object"}, "OrgPageSchema": {"description": "Response schema for an org page.", "properties": {"id": {"title": "Id", "type": "string"}, "name": {"title": "Name", "type": "string"}, "slug": {"title": "Slug", "type": "string"}, "description": {"default": "", "title": "Description", "type": "string"}, "handler_repo": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Handler Repo"}, "handler_path": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Handler Path"}, "handler_commit_sha": {"default": "", "title": "Handler Commit Sha", "type": "string"}, "html_content": {"default": "", "title": "Html Content", "type": "string"}, "page_status": {"default": "building", "title": "Page Status", "type": "string"}, "is_published": {"title": "Is Published", "type": "boolean"}, "build_failure_class": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Build Failure Class"}, "build_error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Build Error"}, "build_failed_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Build Failed At"}, "status_reason_code": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Status Reason Code"}, "status_message": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Status Message"}, "status_blockers": {"items": {"type": "string"}, "title": "Status Blockers", "type": "array"}, "share_enabled": {"default": false, "title": "Share Enabled", "type": "boolean"}, "share_read_only": {"default": true, "title": "Share Read Only", "type": "boolean"}, "share_token": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Share Token"}, "access_mode": {"default": "org", "title": "Access Mode", "type": "string"}, "access_users": {"items": {"$ref": "#/components/schemas/OrgPageAccessUserSchema"}, "title": "Access Users", "type": "array"}, "created_by_email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By Email"}, "agent_session_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Agent Session Id"}, "is_automation": {"default": false, "title": "Is Automation", "type": "boolean"}, "automation_data_state": {"default": "not_automation", "enum": ["not_automation", "waiting_for_first_run", "first_run_in_progress", "waiting_for_successful_run", "ready"], "title": "Automation Data State", "type": "string"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}}, "required": ["id", "name", "slug", "is_published", "created_at", "updated_at"], "title": "OrgPageSchema", "type": "object"}, "OrgPageCreateSchema": {"description": "Request schema for creating an org page.", "properties": {"name": {"title": "Name", "type": "string"}, "description": {"default": "", "title": "Description", "type": "string"}, "slug": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Slug"}, "access_mode": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Access Mode"}, "access_user_ids": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Access User Ids"}}, "required": ["name"], "title": "OrgPageCreateSchema", "type": "object"}, "OrgPageMemberOptionSchema": {"description": "Org member option for the access-users picker.", "properties": {"id": {"title": "Id", "type": "string"}, "email": {"title": "Email", "type": "string"}, "first_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "First Name"}, "last_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last Name"}}, "required": ["id", "email"], "title": "OrgPageMemberOptionSchema", "type": "object"}, "OrgPageMemberOptionsSchema": {"description": "Response schema for the access-users picker option list.", "properties": {"members": {"items": {"$ref": "#/components/schemas/OrgPageMemberOptionSchema"}, "title": "Members", "type": "array"}}, "required": ["members"], "title": "OrgPageMemberOptionsSchema", "type": "object"}, "GeneratedArtifactReviewCandidateSchema": {"description": "Response schema for a non-live generated artifact review candidate.", "properties": {"id": {"title": "Id", "type": "string"}, "page_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Page Id"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name"}, "slug": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Slug"}, "repo_full_name": {"title": "Repo Full Name", "type": "string"}, "pr_number": {"title": "Pr Number", "type": "integer"}, "branch": {"title": "Branch", "type": "string"}, "head_sha": {"title": "Head Sha", "type": "string"}, "kind": {"title": "Kind", "type": "string"}, "status": {"title": "Status", "type": "string"}, "html_content": {"default": "", "title": "Html Content", "type": "string"}, "source_commit_sha": {"default": "", "title": "Source Commit Sha", "type": "string"}, "artifact_commit_sha": {"default": "", "title": "Artifact Commit Sha", "type": "string"}, "backend_server_name": {"default": "", "title": "Backend Server Name", "type": "string"}, "evidence": {"additionalProperties": true, "title": "Evidence", "type": "object"}, "expires_at": {"format": "date-time", "title": "Expires At", "type": "string"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}}, "required": ["id", "repo_full_name", "pr_number", "branch", "head_sha", "kind", "status", "expires_at", "created_at", "updated_at"], "title": "GeneratedArtifactReviewCandidateSchema", "type": "object"}, "OrgPageUpdateSchema": {"description": "Request schema for partial updates to an org page.", "properties": {"name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "slug": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Slug"}, "is_published": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Published"}, "page_status": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Page Status"}, "access_mode": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Access Mode"}, "access_user_ids": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Access User Ids"}}, "title": "OrgPageUpdateSchema", "type": "object"}, "OrgPageShareUpdateSchema": {"description": "Request schema for updating a page's share settings.", "properties": {"share_enabled": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Share Enabled"}, "share_read_only": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Share Read Only"}, "regenerate_token": {"default": false, "title": "Regenerate Token", "type": "boolean"}}, "title": "OrgPageShareUpdateSchema", "type": "object"}, "OrgPageSessionListSchema": {"description": "Response schema for listing sessions linked to a page.", "properties": {"sessions": {"items": {"$ref": "#/components/schemas/OrgPageSessionSchema"}, "title": "Sessions", "type": "array"}}, "required": ["sessions"], "title": "OrgPageSessionListSchema", "type": "object"}, "OrgPageSessionSchema": {"description": "Summary of an agent session linked to a page.", "properties": {"session_id": {"title": "Session Id", "type": "string"}, "title": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Title"}, "status": {"title": "Status", "type": "string"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "last_message_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Last Message At"}}, "required": ["session_id", "status", "created_at"], "title": "OrgPageSessionSchema", "type": "object"}, "OrgPageQuerySchema": {"description": "Legacy: request schema for executing SQL against an org database.", "properties": {"sql": {"title": "Sql", "type": "string"}, "params": {"default": [], "items": {}, "title": "Params", "type": "array"}, "page": {"default": 0, "minimum": 0, "title": "Page", "type": "integer"}, "page_size": {"default": 100, "maximum": 500, "minimum": 1, "title": "Page Size", "type": "integer"}, "database": {"default": "default", "maxLength": 64, "minLength": 1, "title": "Database", "type": "string"}}, "required": ["sql"], "title": "OrgPageQuerySchema", "type": "object"}, "OrgPageApiProxyResponseSchema": {"description": "Response schema for a proxied build-server call.", "properties": {"ok": {"title": "Ok", "type": "boolean"}, "status": {"title": "Status", "type": "integer"}, "body": {"anyOf": [{}, {"type": "null"}], "title": "Body"}, "error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error"}}, "required": ["ok", "status"], "title": "OrgPageApiProxyResponseSchema", "type": "object"}, "OrgPageApiProxySchema": {"description": "Request schema for proxying an authenticated call to a page's build server.", "properties": {"server_name": {"title": "Server Name", "type": "string"}, "path": {"default": "/", "title": "Path", "type": "string"}, "method": {"default": "GET", "title": "Method", "type": "string"}, "body": {"anyOf": [{}, {"type": "null"}], "title": "Body"}, "headers": {"additionalProperties": {"type": "string"}, "title": "Headers", "type": "object"}}, "required": ["server_name"], "title": "OrgPageApiProxySchema", "type": "object"}, "OrgPagePublicSchema": {"description": "Public-facing response for a shared org page.\n\nIntentionally narrow: only the fields a public viewer needs to render\nthe iframe. No created_by, no agent_session_id, no internal status.", "properties": {"id": {"title": "Id", "type": "string"}, "name": {"title": "Name", "type": "string"}, "slug": {"title": "Slug", "type": "string"}, "html_content": {"default": "", "title": "Html Content", "type": "string"}, "share_read_only": {"default": true, "title": "Share Read Only", "type": "boolean"}}, "required": ["id", "name", "slug"], "title": "OrgPagePublicSchema", "type": "object"}, "AccountResponse": {"properties": {"id": {"title": "Id", "type": "string"}, "phone_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Phone Number"}, "display_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Display Name"}, "status": {"title": "Status", "type": "string"}, "is_active": {"title": "Is Active", "type": "boolean"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "connected_by_email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Connected By Email"}, "is_own": {"default": false, "title": "Is Own", "type": "boolean"}, "owner_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Owner Type"}, "owner_label": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Owner Label"}, "agent_teammate_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Agent Teammate Id"}, "provider": {"default": "zernio", "title": "Provider", "type": "string"}, "surface": {"default": "business", "title": "Surface", "type": "string"}, "zernio_profile_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Zernio Profile Id"}, "zernio_account_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Zernio Account Id"}, "zernio_sender_whitelist_enabled": {"default": false, "title": "Zernio Sender Whitelist Enabled", "type": "boolean"}, "zernio_allowed_sender_phone_numbers": {"items": {"type": "string"}, "title": "Zernio Allowed Sender Phone Numbers", "type": "array"}, "zernio_sender_access_mode": {"default": "restricted_to_linked", "title": "Zernio Sender Access Mode", "type": "string"}, "zernio_templates": {"items": {"$ref": "#/components/schemas/WhatsAppZernioTemplateResponse"}, "title": "Zernio Templates", "type": "array"}, "zernio_health_status": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Zernio Health Status"}, "zernio_health": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Zernio Health"}, "readiness_issues": {"items": {"$ref": "#/components/schemas/WhatsAppReadinessIssue"}, "title": "Readiness Issues", "type": "array"}, "send_readiness": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Send Readiness"}, "group_setup": {"anyOf": [{"$ref": "#/components/schemas/WhatsAppGroupSetupStatus"}, {"type": "null"}]}}, "required": ["id", "phone_number", "display_name", "status", "is_active", "created_at"], "title": "AccountResponse", "type": "object"}, "WhatsAppGroupSetupNextAction": {"properties": {"type": {"title": "Type", "type": "string"}, "owner": {"title": "Owner", "type": "string"}, "label": {"title": "Label", "type": "string"}, "provider_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Provider Url"}}, "required": ["type", "owner", "label"], "title": "WhatsAppGroupSetupNextAction", "type": "object"}, "WhatsAppGroupSetupStatus": {"properties": {"status": {"title": "Status", "type": "string"}, "readiness": {"title": "Readiness", "type": "string"}, "next_action": {"anyOf": [{"$ref": "#/components/schemas/WhatsAppGroupSetupNextAction"}, {"type": "null"}]}, "checked_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Checked At"}, "reason_code": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Reason Code"}, "denial_reason": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Denial Reason"}, "retry_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Retry At"}}, "required": ["status", "readiness"], "title": "WhatsAppGroupSetupStatus", "type": "object"}, "WhatsAppReadinessIssue": {"properties": {"severity": {"title": "Severity", "type": "string"}, "blocks": {"title": "Blocks", "type": "string"}, "source": {"title": "Source", "type": "string"}, "category": {"title": "Category", "type": "string"}, "title": {"title": "Title", "type": "string"}, "message": {"title": "Message", "type": "string"}, "action_label": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Action Label"}, "action_kind": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Action Kind"}, "action_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Action Url"}, "account_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Account Id"}, "created_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Created At"}, "updated_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Updated At"}, "provider_status": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Provider Status"}, "provider_code": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Provider Code"}}, "required": ["severity", "blocks", "source", "category", "title", "message"], "title": "WhatsAppReadinessIssue", "type": "object"}, "WhatsAppZernioTemplateResponse": {"description": "Template status for a Zernio-backed WhatsApp Business account.", "properties": {"name": {"title": "Name", "type": "string"}, "status": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Status"}, "category": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Category"}, "language": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Language"}, "source": {"default": "zernio", "title": "Source", "type": "string"}, "error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error"}}, "required": ["name"], "title": "WhatsAppZernioTemplateResponse", "type": "object"}, "WhatsAppZernioPendingSetupResponse": {"description": "Durable state for an in-progress Zernio hosted-number setup.", "properties": {"account_id": {"title": "Account Id", "type": "string"}, "surface": {"title": "Surface", "type": "string"}, "profile_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Profile Id"}, "phone_number_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Phone Number Id"}, "phone_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Phone Number"}, "verification_status": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Verification Status"}, "provider_status": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Provider Status"}, "continuation_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Continuation Url"}, "started_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Started At"}, "last_checked_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Last Checked At"}, "deadline_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Deadline At"}, "error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error"}, "issue_code": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Issue Code"}, "issue_owner": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Issue Owner"}, "issue_message": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Issue Message"}, "action_label": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Action Label"}, "retryable": {"default": true, "title": "Retryable", "type": "boolean"}, "next_check_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Next Check At"}, "long_wait": {"default": false, "title": "Long Wait", "type": "boolean"}, "readiness_issues": {"items": {"$ref": "#/components/schemas/WhatsAppReadinessIssue"}, "title": "Readiness Issues", "type": "array"}}, "required": ["account_id", "surface"], "title": "WhatsAppZernioPendingSetupResponse", "type": "object"}, "WhatsAppZernioStatusResponse": {"description": "Feature/config status for the Zernio onboarding entry point.", "properties": {"enabled": {"title": "Enabled", "type": "boolean"}, "configured": {"title": "Configured", "type": "boolean"}, "redirect_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Redirect Url"}, "pending_setup": {"anyOf": [{"$ref": "#/components/schemas/WhatsAppZernioPendingSetupResponse"}, {"type": "null"}]}, "pending_setups": {"items": {"$ref": "#/components/schemas/WhatsAppZernioPendingSetupResponse"}, "title": "Pending Setups", "type": "array"}, "accounts": {"items": {"$ref": "#/components/schemas/AccountResponse"}, "title": "Accounts", "type": "array"}, "readiness_issues": {"items": {"$ref": "#/components/schemas/WhatsAppReadinessIssue"}, "title": "Readiness Issues", "type": "array"}, "number_billing_exempt": {"default": false, "title": "Number Billing Exempt", "type": "boolean"}, "number_billing_configured": {"default": true, "title": "Number Billing Configured", "type": "boolean"}, "number_billing_message": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Number Billing Message"}, "number_monthly_price_cents": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Number Monthly Price Cents"}, "number_billing_currency": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Number Billing Currency"}, "number_billing_quote_token": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Number Billing Quote Token"}}, "required": ["enabled", "configured"], "title": "WhatsAppZernioStatusResponse", "type": "object"}, "WhatsAppZernioStartResponse": {"description": "Return the result of a documented Zernio WhatsApp setup action.", "properties": {"account_id": {"title": "Account Id", "type": "string"}, "profile_id": {"title": "Profile Id", "type": "string"}, "action": {"title": "Action", "type": "string"}, "provider_response": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Provider Response"}}, "required": ["account_id", "profile_id", "action"], "title": "WhatsAppZernioStartResponse", "type": "object"}, "WhatsAppZernioStartRequest": {"description": "Choose a documented Zernio WhatsApp connect path.", "properties": {"account_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Account Id"}, "setup_mode": {"default": "import_existing", "title": "Setup Mode", "type": "string"}, "access_token": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Access Token"}, "waba_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Waba Id"}, "phone_number_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Phone Number Id"}, "temp_token": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Temp Token"}, "connect_token": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Connect Token"}, "user_profile": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "User Profile"}, "surface": {"default": "assistant", "title": "Surface", "type": "string"}, "number_billing_quote_token": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Number Billing Quote Token"}, "group_setup": {"default": false, "title": "Group Setup", "type": "boolean"}}, "title": "WhatsAppZernioStartRequest", "type": "object"}, "WhatsAppZernioSenderAccessRequest": {"properties": {"access_mode": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Access Mode"}, "enabled": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Enabled"}}, "title": "WhatsAppZernioSenderAccessRequest", "type": "object"}, "WhatsAppZernioOwnerRequest": {"properties": {"agent_teammate_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Agent Teammate Id"}}, "title": "WhatsAppZernioOwnerRequest", "type": "object"}, "WhatsAppZernioProviderResponse": {"description": "Raw response from a scoped Zernio management operation.", "properties": {"result": {"additionalProperties": true, "title": "Result", "type": "object"}}, "title": "WhatsAppZernioProviderResponse", "type": "object"}, "WhatsAppZernioBusinessProfileRequest": {"description": "Editable WhatsApp Business profile fields supported by Zernio.", "properties": {"about": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "About"}, "address": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Address"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Email"}, "vertical": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Vertical"}, "websites": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Websites"}}, "title": "WhatsAppZernioBusinessProfileRequest", "type": "object"}, "WhatsAppZernioDisplayNameRequest": {"properties": {"display_name": {"title": "Display Name", "type": "string"}}, "required": ["display_name"], "title": "WhatsAppZernioDisplayNameRequest", "type": "object"}, "WhatsAppZernioTemplateRequest": {"properties": {"name": {"title": "Name", "type": "string"}, "category": {"title": "Category", "type": "string"}, "language": {"default": "en", "title": "Language", "type": "string"}, "components": {"items": {"additionalProperties": true, "type": "object"}, "title": "Components", "type": "array"}}, "required": ["name", "category", "components"], "title": "WhatsAppZernioTemplateRequest", "type": "object"}, "WhatsAppZernioDefaultTemplateRestoreResponse": {"properties": {"mode": {"title": "Mode", "type": "string"}, "plan_fingerprint": {"title": "Plan Fingerprint", "type": "string"}, "all_resolved": {"title": "All Resolved", "type": "boolean"}, "template_version": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Template Version"}, "templates": {"items": {"additionalProperties": true, "type": "object"}, "title": "Templates", "type": "array"}}, "required": ["mode", "plan_fingerprint", "all_resolved"], "title": "WhatsAppZernioDefaultTemplateRestoreResponse", "type": "object"}, "WhatsAppZernioDefaultTemplateRestoreRequest": {"properties": {"confirm_restore": {"default": false, "title": "Confirm Restore", "type": "boolean"}, "plan_fingerprint": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Plan Fingerprint"}}, "title": "WhatsAppZernioDefaultTemplateRestoreRequest", "type": "object"}, "WhatsAppZernioTemplateUpdateRequest": {"properties": {"category": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Category"}, "language": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Language"}, "components": {"anyOf": [{"items": {"additionalProperties": true, "type": "object"}, "type": "array"}, {"type": "null"}], "title": "Components"}}, "title": "WhatsAppZernioTemplateUpdateRequest", "type": "object"}, "WhatsAppZernioConfirmRequest": {"properties": {"confirm": {"default": false, "title": "Confirm", "type": "boolean"}}, "title": "WhatsAppZernioConfirmRequest", "type": "object"}, "UpdateSurfaceRequest": {"properties": {"surface": {"title": "Surface", "type": "string"}}, "required": ["surface"], "title": "UpdateSurfaceRequest", "type": "object"}, "LinkCodeResponse": {"description": "Response for issuing a WhatsApp link code.", "properties": {"code": {"title": "Code", "type": "string"}, "ttl_seconds": {"title": "Ttl Seconds", "type": "integer"}, "bot_phone_numbers": {"items": {"type": "string"}, "title": "Bot Phone Numbers", "type": "array"}}, "required": ["code", "ttl_seconds", "bot_phone_numbers"], "title": "LinkCodeResponse", "type": "object"}, "WhatsAppUserLinkResponse": {"description": "A WhatsApp user link for the current user in an org.", "properties": {"id": {"title": "Id", "type": "string"}, "whatsapp_jid": {"title": "Whatsapp Jid", "type": "string"}, "phone_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Phone Number"}, "source": {"title": "Source", "type": "string"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}}, "required": ["id", "whatsapp_jid", "phone_number", "source", "created_at"], "title": "WhatsAppUserLinkResponse", "type": "object"}, "WhatsAppDirectLinkCompleteRequest": {"description": "Opaque one-time state delivered privately by the WhatsApp Assistant.", "properties": {"state": {"maxLength": 256, "minLength": 1, "title": "State", "type": "string"}}, "required": ["state"], "title": "WhatsAppDirectLinkCompleteRequest", "type": "object"}, "WhatsAppGroupSetupContinueRequest": {"properties": {"action": {"title": "Action", "type": "string"}, "reason": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Reason"}, "retry_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Retry At"}}, "required": ["action"], "title": "WhatsAppGroupSetupContinueRequest", "type": "object"}, "BuildServerListSchema": {"description": "Response schema for listing build servers.", "properties": {"servers": {"items": {"$ref": "#/components/schemas/BuildServerSchema"}, "title": "Servers", "type": "array"}, "total": {"title": "Total", "type": "integer"}, "page": {"default": 1, "title": "Page", "type": "integer"}, "page_size": {"default": 100, "title": "Page Size", "type": "integer"}}, "required": ["servers", "total"], "title": "BuildServerListSchema", "type": "object"}, "BuildServerSchema": {"description": "Response schema for a build server.", "properties": {"id": {"title": "Id", "type": "string"}, "name": {"title": "Name", "type": "string"}, "description": {"default": "", "title": "Description", "type": "string"}, "deploy_status": {"title": "Deploy Status", "type": "string"}, "function_url": {"default": "", "title": "Function Url", "type": "string"}, "deployed_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Deployed At"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}}, "required": ["id", "name", "deploy_status", "created_at", "updated_at"], "title": "BuildServerSchema", "type": "object"}, "BuildServerDeleteSchema": {"description": "Response schema for build server deletion.\n\n``warnings`` is populated when some cleanup steps failed.  The\nserver row is kept in ``deleted`` state so metadata is preserved\nfor retry.", "properties": {"status": {"title": "Status", "type": "string"}, "warnings": {"default": [], "items": {"type": "string"}, "title": "Warnings", "type": "array"}}, "required": ["status"], "title": "BuildServerDeleteSchema", "type": "object"}, "_ToolsCallRequest": {"properties": {"tool_name": {"title": "Tool Name", "type": "string"}, "arguments": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Arguments"}}, "required": ["tool_name"], "title": "_ToolsCallRequest", "type": "object"}, "_CliRunRequest": {"properties": {"command_name": {"title": "Command Name", "type": "string"}, "argv": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Argv"}, "timeout_seconds": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Timeout Seconds"}}, "required": ["command_name"], "title": "_CliRunRequest", "type": "object"}, "_ProviderHttpRequest": {"properties": {"method": {"title": "Method", "type": "string"}, "path": {"title": "Path", "type": "string"}, "params": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Params"}, "json_body": {"title": "Json Body"}, "body": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Body"}, "headers": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"type": "null"}], "title": "Headers"}}, "required": ["method", "path"], "title": "_ProviderHttpRequest", "type": "object"}, "_CodepressSlackAppRequest": {"properties": {"method": {"title": "Method", "type": "string"}, "path": {"title": "Path", "type": "string"}, "params": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Params"}, "json_body": {"title": "Json Body"}, "body": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Body"}, "headers": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"type": "null"}], "title": "Headers"}}, "required": ["method", "path"], "title": "_CodepressSlackAppRequest", "type": "object"}, "AgentTemplateListResponse": {"properties": {"templates": {"items": {"$ref": "#/components/schemas/AgentTemplateRead"}, "title": "Templates", "type": "array"}}, "required": ["templates"], "title": "AgentTemplateListResponse", "type": "object"}, "AgentTemplateRead": {"properties": {"id": {"title": "Id", "type": "string"}, "slug": {"title": "Slug", "type": "string"}, "name": {"title": "Name", "type": "string"}, "description": {"title": "Description", "type": "string"}, "avatar_color": {"title": "Avatar Color", "type": "string"}, "avatar_icon": {"title": "Avatar Icon", "type": "string"}, "handle_suggestion": {"title": "Handle Suggestion", "type": "string"}, "instructions": {"title": "Instructions", "type": "string"}, "suggested_integration_keys": {"items": {"type": "string"}, "title": "Suggested Integration Keys", "type": "array"}, "display_order": {"title": "Display Order", "type": "integer"}}, "required": ["id", "slug", "name", "description", "avatar_color", "avatar_icon", "handle_suggestion", "instructions", "suggested_integration_keys", "display_order"], "title": "AgentTemplateRead", "type": "object"}, "AgentTeammateDraftRead": {"properties": {"id": {"title": "Id", "type": "string"}, "organization_id": {"title": "Organization Id", "type": "string"}, "created_by_id": {"title": "Created By Id", "type": "string"}, "chat_session_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Chat Session Id"}, "template_slug": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Template Slug"}, "step": {"enum": ["create", "instructions", "integrations", "access", "finalized"], "title": "Step", "type": "string"}, "name": {"title": "Name", "type": "string"}, "handle": {"title": "Handle", "type": "string"}, "description": {"title": "Description", "type": "string"}, "instructions": {"title": "Instructions", "type": "string"}, "avatar_color": {"title": "Avatar Color", "type": "string"}, "avatar_icon": {"title": "Avatar Icon", "type": "string"}, "access_mode": {"enum": ["org", "specific_users"], "title": "Access Mode", "type": "string"}, "access_user_ids": {"items": {"type": "string"}, "title": "Access User Ids", "type": "array"}, "integration_org_mcp_ids": {"items": {"type": "integer"}, "title": "Integration Org Mcp Ids", "type": "array"}, "is_finalized": {"title": "Is Finalized", "type": "boolean"}, "finalized_teammate_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Finalized Teammate Id"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}}, "required": ["id", "organization_id", "created_by_id", "step", "name", "handle", "description", "instructions", "avatar_color", "avatar_icon", "access_mode", "access_user_ids", "integration_org_mcp_ids", "is_finalized", "created_at", "updated_at"], "title": "AgentTeammateDraftRead", "type": "object"}, "AgentTeammateDraftCreate": {"properties": {"organization_id": {"format": "uuid", "title": "Organization Id", "type": "string"}, "chat_session_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Chat Session Id"}, "template_slug": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Template Slug"}}, "required": ["organization_id"], "title": "AgentTeammateDraftCreate", "type": "object"}, "AgentTeammateDraftPatch": {"properties": {"step": {"anyOf": [{"enum": ["create", "instructions", "integrations", "access", "finalized"], "type": "string"}, {"type": "null"}], "title": "Step"}, "name": {"anyOf": [{"maxLength": 120, "type": "string"}, {"type": "null"}], "title": "Name"}, "handle": {"anyOf": [{"maxLength": 80, "type": "string"}, {"type": "null"}], "title": "Handle"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "instructions": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Instructions"}, "avatar_color": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Avatar Color"}, "avatar_icon": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Avatar Icon"}, "access_mode": {"anyOf": [{"enum": ["org", "specific_users"], "type": "string"}, {"type": "null"}], "title": "Access Mode"}, "access_user_ids": {"anyOf": [{"items": {"format": "uuid", "type": "string"}, "type": "array"}, {"type": "null"}], "title": "Access User Ids"}, "integration_org_mcp_ids": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Integration Org Mcp Ids"}}, "title": "AgentTeammateDraftPatch", "type": "object"}, "AgentTeammateActivityRead": {"properties": {"id": {"title": "Id", "type": "string"}, "action": {"title": "Action", "type": "string"}, "summary": {"title": "Summary", "type": "string"}, "actor": {"anyOf": [{"$ref": "#/components/schemas/AgentTeammateUser"}, {"type": "null"}]}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}}, "required": ["id", "action", "summary", "created_at"], "title": "AgentTeammateActivityRead", "type": "object"}, "AgentTeammateFinalizeRead": {"description": "Finalize response: the created teammate plus the state of the optional\ncreate-time repository export. `export_attempted` doubles as a capability\nmarker \u2014 clients that requested an export and don't see it set fall back\nto the standalone export endpoint (deploy-order safety while old backends\nare still serving). `export_status`:\n\n- \"queued\": the choice is durably persisted (aimed at the requested\n  repository) and a background worker owns the GitHub round-trip; the\n  agent's settings page shows the final state.\n- \"confirmed\": a replayed finalize found the teammate already managed in\n  the requested repository with a confirmed (non-pending) definition.\n- \"failed\": validation failed, the teammate is managed elsewhere, or an\n  export to a DIFFERENT repository is already in flight (an in-flight\n  target is immutable \u2014 a replay never retargets it). The teammate was\n  still created/kept, and `export_error` has the detail.", "properties": {"id": {"title": "Id", "type": "string"}, "organization_id": {"title": "Organization Id", "type": "string"}, "name": {"title": "Name", "type": "string"}, "handle": {"title": "Handle", "type": "string"}, "description": {"title": "Description", "type": "string"}, "charter": {"default": "", "title": "Charter", "type": "string"}, "out_of_scope": {"default": [], "items": {"type": "string"}, "title": "Out Of Scope", "type": "array"}, "domains": {"default": [], "items": {"type": "string"}, "title": "Domains", "type": "array"}, "instructions": {"title": "Instructions", "type": "string"}, "avatar_color": {"title": "Avatar Color", "type": "string"}, "avatar_icon": {"title": "Avatar Icon", "type": "string"}, "avatar_image_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Avatar Image Url"}, "is_active": {"title": "Is Active", "type": "boolean"}, "access_mode": {"enum": ["org", "specific_users"], "title": "Access Mode", "type": "string"}, "access_summary": {"title": "Access Summary", "type": "string"}, "integration_count": {"title": "Integration Count", "type": "integer"}, "access_user_count": {"title": "Access User Count", "type": "integer"}, "can_invoke": {"title": "Can Invoke", "type": "boolean"}, "can_manage": {"default": false, "title": "Can Manage", "type": "boolean"}, "is_repo_managed": {"default": false, "title": "Is Repo Managed", "type": "boolean"}, "organization_repository_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Organization Repository Id"}, "source_path": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Source Path"}, "source_sha": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Source Sha"}, "sync_status": {"anyOf": [{"enum": ["synced", "error"], "type": "string"}, {"type": "null"}], "title": "Sync Status"}, "sync_error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Sync Error"}, "synced_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Synced At"}, "export_intent_status": {"anyOf": [{"enum": ["pending", "failed"], "type": "string"}, {"type": "null"}], "title": "Export Intent Status"}, "export_intent_repo_full_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Export Intent Repo Full Name"}, "export_intent_error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Export Intent Error"}, "created_by": {"anyOf": [{"$ref": "#/components/schemas/AgentTeammateUser"}, {"type": "null"}]}, "updated_by": {"anyOf": [{"$ref": "#/components/schemas/AgentTeammateUser"}, {"type": "null"}]}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}, "last_active_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Last Active At"}, "access_users": {"default": [], "items": {"$ref": "#/components/schemas/AgentTeammateUser"}, "title": "Access Users", "type": "array"}, "managers": {"default": [], "items": {"$ref": "#/components/schemas/AgentTeammateUser"}, "title": "Managers", "type": "array"}, "integrations": {"default": [], "items": {"$ref": "#/components/schemas/AgentTeammateIntegration"}, "title": "Integrations", "type": "array"}, "activity": {"default": [], "items": {"$ref": "#/components/schemas/AgentTeammateActivityRead"}, "title": "Activity", "type": "array"}, "export_attempted": {"default": false, "title": "Export Attempted", "type": "boolean"}, "export_status": {"anyOf": [{"enum": ["queued", "confirmed", "failed"], "type": "string"}, {"type": "null"}], "title": "Export Status"}, "export_error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Export Error"}}, "required": ["id", "organization_id", "name", "handle", "description", "instructions", "avatar_color", "avatar_icon", "is_active", "access_mode", "access_summary", "integration_count", "access_user_count", "can_invoke", "created_at", "updated_at"], "title": "AgentTeammateFinalizeRead", "type": "object"}, "AgentTeammateIntegration": {"properties": {"id": {"title": "Id", "type": "string"}, "org_mcp_id": {"title": "Org Mcp Id", "type": "integer"}, "mcp_server_id": {"title": "Mcp Server Id", "type": "integer"}, "credential_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Credential Id"}, "name": {"title": "Name", "type": "string"}, "status": {"title": "Status", "type": "string"}, "notes": {"default": "", "title": "Notes", "type": "string"}, "is_enabled": {"title": "Is Enabled", "type": "boolean"}, "auth_type": {"title": "Auth Type", "type": "string"}, "oauth_provider": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Oauth Provider"}, "tools_count": {"default": 0, "title": "Tools Count", "type": "integer"}, "connected": {"default": false, "title": "Connected", "type": "boolean"}, "token_expired": {"default": false, "title": "Token Expired", "type": "boolean"}, "connected_account": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Connected Account"}, "credential_owner_email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Credential Owner Email"}}, "required": ["id", "org_mcp_id", "mcp_server_id", "name", "status", "is_enabled", "auth_type"], "title": "AgentTeammateIntegration", "type": "object"}, "AgentTeammateUser": {"properties": {"id": {"title": "Id", "type": "string"}, "email": {"title": "Email", "type": "string"}, "first_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "First Name"}, "last_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last Name"}, "github_username": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Github Username"}, "avatar_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Avatar Url"}}, "required": ["id", "email"], "title": "AgentTeammateUser", "type": "object"}, "AgentTeammateDraftFinalizeRequest": {"description": "Optional finalize payload. When `export_organization_repository_id`\nis set, the backend persists the choice as a durable export intent in the\nsame transaction that finalizes the draft \u2014 a worker performs the actual\nrepository export, so the handoff survives the client disappearing\nmid-flow.", "properties": {"export_organization_repository_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Export Organization Repository Id"}}, "title": "AgentTeammateDraftFinalizeRequest", "type": "object"}, "AgentTeammateListResponse": {"properties": {"teammates": {"items": {"$ref": "#/components/schemas/AgentTeammateRead"}, "title": "Teammates", "type": "array"}}, "required": ["teammates"], "title": "AgentTeammateListResponse", "type": "object"}, "AgentTeammateRead": {"properties": {"id": {"title": "Id", "type": "string"}, "organization_id": {"title": "Organization Id", "type": "string"}, "name": {"title": "Name", "type": "string"}, "handle": {"title": "Handle", "type": "string"}, "description": {"title": "Description", "type": "string"}, "charter": {"default": "", "title": "Charter", "type": "string"}, "out_of_scope": {"default": [], "items": {"type": "string"}, "title": "Out Of Scope", "type": "array"}, "domains": {"default": [], "items": {"type": "string"}, "title": "Domains", "type": "array"}, "instructions": {"title": "Instructions", "type": "string"}, "avatar_color": {"title": "Avatar Color", "type": "string"}, "avatar_icon": {"title": "Avatar Icon", "type": "string"}, "avatar_image_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Avatar Image Url"}, "is_active": {"title": "Is Active", "type": "boolean"}, "access_mode": {"enum": ["org", "specific_users"], "title": "Access Mode", "type": "string"}, "access_summary": {"title": "Access Summary", "type": "string"}, "integration_count": {"title": "Integration Count", "type": "integer"}, "access_user_count": {"title": "Access User Count", "type": "integer"}, "can_invoke": {"title": "Can Invoke", "type": "boolean"}, "can_manage": {"default": false, "title": "Can Manage", "type": "boolean"}, "is_repo_managed": {"default": false, "title": "Is Repo Managed", "type": "boolean"}, "organization_repository_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Organization Repository Id"}, "source_path": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Source Path"}, "source_sha": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Source Sha"}, "sync_status": {"anyOf": [{"enum": ["synced", "error"], "type": "string"}, {"type": "null"}], "title": "Sync Status"}, "sync_error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Sync Error"}, "synced_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Synced At"}, "export_intent_status": {"anyOf": [{"enum": ["pending", "failed"], "type": "string"}, {"type": "null"}], "title": "Export Intent Status"}, "export_intent_repo_full_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Export Intent Repo Full Name"}, "export_intent_error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Export Intent Error"}, "created_by": {"anyOf": [{"$ref": "#/components/schemas/AgentTeammateUser"}, {"type": "null"}]}, "updated_by": {"anyOf": [{"$ref": "#/components/schemas/AgentTeammateUser"}, {"type": "null"}]}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}, "last_active_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Last Active At"}, "access_users": {"default": [], "items": {"$ref": "#/components/schemas/AgentTeammateUser"}, "title": "Access Users", "type": "array"}, "managers": {"default": [], "items": {"$ref": "#/components/schemas/AgentTeammateUser"}, "title": "Managers", "type": "array"}, "integrations": {"default": [], "items": {"$ref": "#/components/schemas/AgentTeammateIntegration"}, "title": "Integrations", "type": "array"}, "activity": {"default": [], "items": {"$ref": "#/components/schemas/AgentTeammateActivityRead"}, "title": "Activity", "type": "array"}}, "required": ["id", "organization_id", "name", "handle", "description", "instructions", "avatar_color", "avatar_icon", "is_active", "access_mode", "access_summary", "integration_count", "access_user_count", "can_invoke", "created_at", "updated_at"], "title": "AgentTeammateRead", "type": "object"}, "AgentTeammateCreate": {"properties": {"name": {"maxLength": 120, "minLength": 1, "title": "Name", "type": "string"}, "handle": {"maxLength": 80, "minLength": 1, "title": "Handle", "type": "string"}, "description": {"default": "", "title": "Description", "type": "string"}, "charter": {"default": "", "title": "Charter", "type": "string"}, "out_of_scope": {"default": [], "items": {"type": "string"}, "title": "Out Of Scope", "type": "array"}, "domains": {"default": [], "items": {"type": "string"}, "title": "Domains", "type": "array"}, "instructions": {"default": "", "title": "Instructions", "type": "string"}, "avatar_color": {"default": "#2563eb", "title": "Avatar Color", "type": "string"}, "avatar_icon": {"default": "bot", "title": "Avatar Icon", "type": "string"}, "is_active": {"default": true, "title": "Is Active", "type": "boolean"}, "access_mode": {"default": "org", "enum": ["org", "specific_users"], "title": "Access Mode", "type": "string"}, "access_user_ids": {"default": [], "items": {"format": "uuid", "type": "string"}, "title": "Access User Ids", "type": "array"}, "integration_org_mcp_ids": {"default": [], "items": {"type": "integer"}, "title": "Integration Org Mcp Ids", "type": "array"}, "integration_assignments": {"anyOf": [{"items": {"$ref": "#/components/schemas/AgentTeammateIntegrationAssignmentInput"}, "type": "array"}, {"type": "null"}], "title": "Integration Assignments"}}, "required": ["name", "handle"], "title": "AgentTeammateCreate", "type": "object"}, "AgentTeammateIntegrationAssignmentInput": {"properties": {"org_mcp_id": {"title": "Org Mcp Id", "type": "integer"}, "credential_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Credential Id"}}, "required": ["org_mcp_id"], "title": "AgentTeammateIntegrationAssignmentInput", "type": "object"}, "AgentTeammateIntegrationCredentialOption": {"properties": {"id": {"title": "Id", "type": "integer"}, "connected_account": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Connected Account"}, "owner_email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Owner Email"}, "owner_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Owner Name"}, "is_org_fallback": {"default": false, "title": "Is Org Fallback", "type": "boolean"}}, "required": ["id"], "title": "AgentTeammateIntegrationCredentialOption", "type": "object"}, "AgentTeammateIntegrationOption": {"properties": {"org_mcp_id": {"title": "Org Mcp Id", "type": "integer"}, "mcp_server_id": {"title": "Mcp Server Id", "type": "integer"}, "name": {"title": "Name", "type": "string"}, "status": {"title": "Status", "type": "string"}, "is_enabled": {"title": "Is Enabled", "type": "boolean"}, "auth_type": {"title": "Auth Type", "type": "string"}, "oauth_provider": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Oauth Provider"}, "tools_count": {"default": 0, "title": "Tools Count", "type": "integer"}, "connected_account": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Connected Account"}, "default_credential_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Default Credential Id"}, "credentials": {"default": [], "items": {"$ref": "#/components/schemas/AgentTeammateIntegrationCredentialOption"}, "title": "Credentials", "type": "array"}}, "required": ["org_mcp_id", "mcp_server_id", "name", "status", "is_enabled", "auth_type"], "title": "AgentTeammateIntegrationOption", "type": "object"}, "AgentTeammateMemberOption": {"properties": {"id": {"title": "Id", "type": "string"}, "email": {"title": "Email", "type": "string"}, "first_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "First Name"}, "last_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last Name"}, "github_username": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Github Username"}, "avatar_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Avatar Url"}, "role": {"title": "Role", "type": "string"}}, "required": ["id", "email", "role"], "title": "AgentTeammateMemberOption", "type": "object"}, "AgentTeammateOptionsResponse": {"properties": {"members": {"items": {"$ref": "#/components/schemas/AgentTeammateMemberOption"}, "title": "Members", "type": "array"}, "integrations": {"items": {"$ref": "#/components/schemas/AgentTeammateIntegrationOption"}, "title": "Integrations", "type": "array"}}, "required": ["members", "integrations"], "title": "AgentTeammateOptionsResponse", "type": "object"}, "AgentTeammateIntegrationOverviewResponse": {"properties": {"github": {"allOf": [{"$ref": "#/components/schemas/AgentTeammateIntegrationStatus"}], "default": {"connected": false, "detail": null, "inherited": true, "setup_needed": false, "readiness_issues": []}}, "slack": {"allOf": [{"$ref": "#/components/schemas/AgentTeammateIntegrationStatus"}], "default": {"connected": false, "detail": null, "inherited": true, "setup_needed": false, "readiness_issues": []}}, "mcp": {"allOf": [{"$ref": "#/components/schemas/AgentTeammateIntegrationStatus"}], "default": {"connected": false, "detail": null, "inherited": false, "setup_needed": false, "readiness_issues": []}}, "database": {"allOf": [{"$ref": "#/components/schemas/AgentTeammateIntegrationStatus"}], "default": {"connected": false, "detail": null, "inherited": false, "setup_needed": false, "readiness_issues": []}}, "secrets_vault": {"allOf": [{"$ref": "#/components/schemas/AgentTeammateIntegrationStatus"}], "default": {"connected": false, "detail": null, "inherited": false, "setup_needed": false, "readiness_issues": []}}, "whatsapp": {"allOf": [{"$ref": "#/components/schemas/AgentTeammateIntegrationStatus"}], "default": {"connected": false, "detail": null, "inherited": false, "setup_needed": false, "readiness_issues": []}}, "inbox": {"allOf": [{"$ref": "#/components/schemas/AgentTeammateIntegrationStatus"}], "default": {"connected": false, "detail": null, "inherited": false, "setup_needed": false, "readiness_issues": []}}, "google_workspace": {"allOf": [{"$ref": "#/components/schemas/AgentTeammateIntegrationStatus"}], "default": {"connected": false, "detail": null, "inherited": true, "setup_needed": false, "readiness_issues": []}}, "custom_automations": {"allOf": [{"$ref": "#/components/schemas/AgentTeammateIntegrationStatus"}], "default": {"connected": false, "detail": null, "inherited": false, "setup_needed": false, "readiness_issues": []}}, "llm_provider_keys": {"allOf": [{"$ref": "#/components/schemas/AgentTeammateIntegrationStatus"}], "default": {"connected": false, "detail": null, "inherited": false, "setup_needed": false, "readiness_issues": []}}, "knowledge_sources": {"allOf": [{"$ref": "#/components/schemas/AgentTeammateIntegrationStatus"}], "default": {"connected": false, "detail": null, "inherited": false, "setup_needed": false, "readiness_issues": []}}}, "title": "AgentTeammateIntegrationOverviewResponse", "type": "object"}, "AgentTeammateIntegrationStatus": {"properties": {"connected": {"default": false, "title": "Connected", "type": "boolean"}, "detail": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Detail"}, "inherited": {"default": false, "title": "Inherited", "type": "boolean"}, "setup_needed": {"default": false, "title": "Setup Needed", "type": "boolean"}, "readiness_issues": {"items": {"additionalProperties": true, "type": "object"}, "title": "Readiness Issues", "type": "array"}}, "title": "AgentTeammateIntegrationStatus", "type": "object"}, "RepositoryKindResponse": {"properties": {"organization_repository_id": {"format": "uuid", "title": "Organization Repository Id", "type": "string"}, "repo_kind": {"enum": ["app", "agents"], "title": "Repo Kind", "type": "string"}, "message": {"title": "Message", "type": "string"}}, "required": ["organization_repository_id", "repo_kind", "message"], "title": "RepositoryKindResponse", "type": "object"}, "RepositoryKindUpdate": {"properties": {"repo_kind": {"enum": ["app", "agents"], "title": "Repo Kind", "type": "string"}}, "required": ["repo_kind"], "title": "RepositoryKindUpdate", "type": "object"}, "AgentTeammateExportToRepoRequest": {"properties": {"organization_repository_id": {"format": "uuid", "title": "Organization Repository Id", "type": "string"}}, "required": ["organization_repository_id"], "title": "AgentTeammateExportToRepoRequest", "type": "object"}, "AgentTeammateUpdate": {"properties": {"name": {"anyOf": [{"maxLength": 120, "minLength": 1, "type": "string"}, {"type": "null"}], "title": "Name"}, "handle": {"anyOf": [{"maxLength": 80, "minLength": 1, "type": "string"}, {"type": "null"}], "title": "Handle"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "charter": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Charter"}, "out_of_scope": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Out Of Scope"}, "domains": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Domains"}, "instructions": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Instructions"}, "avatar_color": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Avatar Color"}, "avatar_icon": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Avatar Icon"}, "is_active": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Active"}, "access_mode": {"anyOf": [{"enum": ["org", "specific_users"], "type": "string"}, {"type": "null"}], "title": "Access Mode"}, "access_user_ids": {"anyOf": [{"items": {"format": "uuid", "type": "string"}, "type": "array"}, {"type": "null"}], "title": "Access User Ids"}, "integration_org_mcp_ids": {"anyOf": [{"items": {"type": "integer"}, "type": "array"}, {"type": "null"}], "title": "Integration Org Mcp Ids"}, "integration_assignments": {"anyOf": [{"items": {"$ref": "#/components/schemas/AgentTeammateIntegrationAssignmentInput"}, "type": "array"}, {"type": "null"}], "title": "Integration Assignments"}}, "title": "AgentTeammateUpdate", "type": "object"}, "RepoAgentBundleFileRead": {"description": "One bundle file. `relpath` is relative to its container: the skill\ndirectory for skill files, the bundle's `files/` root for workspace\nfiles.", "properties": {"relpath": {"title": "Relpath", "type": "string"}, "content": {"title": "Content", "type": "string"}}, "required": ["relpath", "content"], "title": "RepoAgentBundleFileRead", "type": "object"}, "RepoAgentBundleHookRead": {"properties": {"event": {"title": "Event", "type": "string"}, "command": {"title": "Command", "type": "string"}, "timeout_seconds": {"default": 30, "title": "Timeout Seconds", "type": "integer"}, "matcher": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Matcher"}}, "required": ["event", "command"], "title": "RepoAgentBundleHookRead", "type": "object"}, "RepoAgentBundleRead": {"description": "Synced contents of a repo-managed teammate's bundle, served from the\nrepo sync's database mirror (never a live GitHub read). On a sync error\nthe mirror intentionally holds the last successfully synced bundle, so\nconsumers must pair the content with `sync_status`/`synced_at` when\npresenting it.", "properties": {"repo_full_name": {"title": "Repo Full Name", "type": "string"}, "source_path": {"title": "Source Path", "type": "string"}, "source_sha": {"title": "Source Sha", "type": "string"}, "sync_status": {"enum": ["synced", "error"], "title": "Sync Status", "type": "string"}, "sync_error": {"default": "", "title": "Sync Error", "type": "string"}, "synced_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Synced At"}, "export_pending": {"default": false, "title": "Export Pending", "type": "boolean"}, "manifest": {"additionalProperties": true, "default": {}, "title": "Manifest", "type": "object"}, "manifest_revision": {"title": "Manifest Revision", "type": "string"}, "system_prompt": {"default": "", "title": "System Prompt", "type": "string"}, "hooks": {"default": [], "items": {"$ref": "#/components/schemas/RepoAgentBundleHookRead"}, "title": "Hooks", "type": "array"}, "subagents": {"default": [], "items": {"$ref": "#/components/schemas/RepoAgentBundleSubagentRead"}, "title": "Subagents", "type": "array"}, "skills": {"default": [], "items": {"$ref": "#/components/schemas/RepoAgentBundleSkillRead"}, "title": "Skills", "type": "array"}, "workspace_files": {"default": [], "items": {"$ref": "#/components/schemas/RepoAgentBundleWorkspaceFileRead"}, "title": "Workspace Files", "type": "array"}}, "required": ["repo_full_name", "source_path", "source_sha", "sync_status", "manifest_revision"], "title": "RepoAgentBundleRead", "type": "object"}, "RepoAgentBundleSkillRead": {"properties": {"name": {"title": "Name", "type": "string"}, "files": {"default": [], "items": {"$ref": "#/components/schemas/RepoAgentBundleFileRead"}, "title": "Files", "type": "array"}}, "required": ["name"], "title": "RepoAgentBundleSkillRead", "type": "object"}, "RepoAgentBundleSubagentRead": {"description": "A subagent's raw AGENT.json plus runtime-validity problems. The parser\naccepts any JSON object at sync time while the runner silently drops\nentries that fail its stricter session-start checks \u2014 `problems` surfaces\nthat gap so a synced-but-broken subagent doesn't look healthy.\n\n`revision` is the opaque server-issued token the subagent write endpoint\nrequires as its compare-and-swap base. The write path never accepts a\nclient-echoed definition object as proof of what was loaded: JavaScript\nnumbers cannot faithfully round-trip arbitrary JSON (integers above 2^53\nround), so the digest is computed server-side over the exact mirrored\nvalue on both ends of the comparison.", "properties": {"name": {"title": "Name", "type": "string"}, "definition": {"additionalProperties": true, "default": {}, "title": "Definition", "type": "object"}, "revision": {"title": "Revision", "type": "string"}, "problems": {"default": [], "items": {"type": "string"}, "title": "Problems", "type": "array"}}, "required": ["name", "revision"], "title": "RepoAgentBundleSubagentRead", "type": "object"}, "RepoAgentBundleWorkspaceFileRead": {"description": "A workspace overlay file, with the runtime-validity problems a plain\nbundle file has no notion of.\n\n`problems` lists paths the sync parser accepts but the runner refuses to\nmaterialize \u2014 they mirror clean and would otherwise render as healthy\nwhile silently never reaching a session.", "properties": {"relpath": {"title": "Relpath", "type": "string"}, "content": {"title": "Content", "type": "string"}, "problems": {"default": [], "items": {"type": "string"}, "title": "Problems", "type": "array"}}, "required": ["relpath", "content"], "title": "RepoAgentBundleWorkspaceFileRead", "type": "object"}, "RepoAgentBundleWriteResult": {"description": "Outcome of a bundle write-back. `commit_sha` is the created commit \u2014\nor the branch head when `changed` is False (the branch already held the\nrequested content, so no commit was made). `bundle` is the refreshed\nmirror after the inline post-commit sync \u2014 or None when that refresh\ncould not run (the sync lease was lost during publication, or the\ninline sync failed): the commit is on the branch but the mirror is\nstill settling via an enqueued sync, which publishes the SSE nudge on\ncompletion. Callers must not present a stale view as the committed\nbundle when `bundle` is None.", "properties": {"commit_sha": {"title": "Commit Sha", "type": "string"}, "changed": {"title": "Changed", "type": "boolean"}, "bundle": {"anyOf": [{"$ref": "#/components/schemas/RepoAgentBundleRead"}, {"type": "null"}]}}, "required": ["commit_sha", "changed"], "title": "RepoAgentBundleWriteResult", "type": "object"}, "RepoAgentBundlePromptUpdate": {"description": "Save a new system prompt into a repo-managed teammate's bundle.\n\n`base_system_prompt` must be the exact prompt the editor loaded (the\nbundle GET's `system_prompt`); the save is a compare-and-swap against\nthe branch and returns 409 when the repository no longer holds that\ncontent. An empty (post-strip) `system_prompt` deletes\n`system-prompt.md`.", "properties": {"system_prompt": {"title": "System Prompt", "type": "string"}, "base_system_prompt": {"title": "Base System Prompt", "type": "string"}}, "required": ["system_prompt", "base_system_prompt"], "title": "RepoAgentBundlePromptUpdate", "type": "object"}, "RepoAgentBundleSkillUpdate": {"description": "Add, edit, or delete one skill in a repo-managed teammate's bundle.\n\n`files` maps skill-relative paths (e.g. \"SKILL.md\") to new content, or\nNone to delete that file. `base_files` drives the compare-and-swap:\nNone asserts the skill does not exist yet (create), and a map must be\nthe exact file map the editor loaded for this skill (the bundle GET's\n`files`) \u2014 the save returns 409 when the repository no longer holds it.\nDeleting every file removes the skill; any other result must keep\nSKILL.md (a sync rejects skill directories without one).", "properties": {"files": {"additionalProperties": {"anyOf": [{"type": "string"}, {"type": "null"}]}, "title": "Files", "type": "object"}, "base_files": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"type": "null"}], "title": "Base Files"}}, "required": ["files"], "title": "RepoAgentBundleSkillUpdate", "type": "object"}, "RepoAgentBundleHooksUpdate": {"description": "Replace the whole hook list (`hooks.json`) of a repo-managed\nteammate's bundle.\n\nHooks are one small file edited as a unit, so the compare-and-swap runs\nover the entire list: `base_hooks` must be exactly the hooks the editor\nloaded (the bundle GET's `hooks`), and the save returns 409 when the\nrepository no longer holds them. An empty `hooks` deletes `hooks.json`.\nEvery entry is validated with the sync parser's own rules (event enum,\nmatcher only on tool-use events, timeout 1-120 seconds, at most 16\nhooks) so a save can never commit a file the next sync rejects.", "properties": {"hooks": {"items": {"$ref": "#/components/schemas/RepoAgentHookWrite"}, "title": "Hooks", "type": "array"}, "base_hooks": {"items": {"$ref": "#/components/schemas/RepoAgentHookWrite"}, "title": "Base Hooks", "type": "array"}}, "required": ["hooks", "base_hooks"], "title": "RepoAgentBundleHooksUpdate", "type": "object"}, "RepoAgentHookWrite": {"description": "One hook entry as the editor submits it \u2014 the same shape the bundle\nGET serves (`RepoAgentBundleHookRead`), so a loaded list round-trips\ninto `base_hooks` unchanged.", "properties": {"event": {"title": "Event", "type": "string"}, "command": {"title": "Command", "type": "string"}, "timeout_seconds": {"default": 30, "title": "Timeout Seconds", "type": "integer"}, "matcher": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Matcher"}}, "required": ["event", "command"], "title": "RepoAgentHookWrite", "type": "object"}, "RepoAgentBundleSubagentUpdate": {"description": "Add, edit, or delete one subagent\n(`subagents/<name>/AGENT.json`) in a repo-managed teammate's bundle.\n\n`base_revision` drives the compare-and-swap: None asserts the subagent\ndoes not exist yet (create), otherwise it must be the `revision` the\nbundle GET served for this subagent \u2014 an opaque server-issued digest of\nthe exact mirrored definition \u2014 and the save returns 409 when the\nrepository no longer holds that content. `fields` carries only the\neditor-owned keys, applied server-side onto the repository's current\ndefinition so keys this editor does not know about survive losslessly;\na None `fields` deletes the subagent (removing its whole directory).\nFields are held to the runner's session-start rules (non-empty\ndescription and prompt, model one of opus/sonnet/haiku/inherit, tools\na list of tool-name strings), because the sync parser accepts any JSON\nobject and the runner silently drops entries that fail \u2014 a structured\neditor must not save a subagent that will never load.", "properties": {"fields": {"anyOf": [{"$ref": "#/components/schemas/RepoAgentSubagentFieldsWrite"}, {"type": "null"}]}, "base_revision": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Base Revision"}}, "title": "RepoAgentBundleSubagentUpdate", "type": "object"}, "RepoAgentSubagentFieldsWrite": {"description": "The editor-owned subset of a subagent's AGENT.json. The dashboard\nnever submits the whole definition object \u2014 JavaScript numbers cannot\nfaithfully round-trip arbitrary JSON \u2014 so keys outside this set are\npreserved server-side from the repository's current definition. A None\n`model`/`tools` removes that key (no model pin / no tool restriction).", "properties": {"description": {"title": "Description", "type": "string"}, "prompt": {"title": "Prompt", "type": "string"}, "model": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Model"}, "tools": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Tools"}}, "required": ["description", "prompt"], "title": "RepoAgentSubagentFieldsWrite", "type": "object"}, "RepoAgentBundleManifestUpdate": {"description": "Edit the manifest (`agent.json`) of a repo-managed teammate's bundle.\n\n`base_revision` must be the `manifest_revision` the bundle GET served \u2014\nan opaque server-issued digest of the exact mirrored manifest \u2014 and the\nsave returns 409 when the repository no longer holds that content.\nUnlike the other bundle writes there is no create or delete: a synced\ndefinition always has an `agent.json`, and removing it would unmanage\nthe agent rather than edit it.\n\nOnly the display fields the sync actually applies to the teammate are\neditable. The bundle directory name \u2014 the agent's handle \u2014 is not part\nof the manifest and cannot be changed here: renaming that directory\nreads to the sync as one agent removed and another added, which\ndeactivates the original teammate and provisions a new identity.", "properties": {"fields": {"$ref": "#/components/schemas/RepoAgentManifestFieldsWrite"}, "base_revision": {"title": "Base Revision", "type": "string"}}, "required": ["fields", "base_revision"], "title": "RepoAgentBundleManifestUpdate", "type": "object"}, "RepoAgentManifestFieldsWrite": {"description": "The editor-owned subset of `agent.json`. The dashboard never submits\nthe whole manifest \u2014 JavaScript numbers cannot faithfully round-trip\narbitrary JSON \u2014 so keys outside this set are preserved server-side from\nthe repository's current manifest. That includes `access_mode` (only\n\"org\" is supported today), `avatar_icon`, and `model`/`effort`, which\nthe parser validates but the sync does not yet apply to the teammate.\nA None `avatar_color` removes the key, restoring the default color.", "properties": {"name": {"title": "Name", "type": "string"}, "description": {"title": "Description", "type": "string"}, "avatar_color": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Avatar Color"}}, "required": ["name", "description"], "title": "RepoAgentManifestFieldsWrite", "type": "object"}, "RepoAgentBundleWorkspaceFileUpdate": {"description": "Add, edit, or delete one workspace file in a repo-managed teammate's\nbundle.\n\n`relpath` is relative to the bundle's `files/` root \u2014 the same form the\nbundle GET serves in `workspace_files`. `content` is the new content, or\nNone to delete the file. `base_content` drives the compare-and-swap:\nNone asserts the file does not exist yet (create), otherwise it must be\nthe exact content the editor loaded, and the save returns 409 when the\nrepository no longer holds it.\n\nOnly None deletes. An empty `content` writes a real, empty file, which\nis a different outcome: these files overlay the session workspace, so an\nempty `files/CLAUDE.md` blanks the repository's own for the agent, while\ndeleting the overlay lets the repository's file show through again.\n\nText only. The sync parser decodes every blob in the bundle as UTF-8 and\nfails the WHOLE agent when one does not decode, so a binary file here\nwould not just fail itself \u2014 it would break the agent's next sync and\nlock every subsequent bundle edit behind a sync error.", "properties": {"relpath": {"title": "Relpath", "type": "string"}, "content": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Content"}, "base_content": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Base Content"}}, "required": ["relpath"], "title": "RepoAgentBundleWorkspaceFileUpdate", "type": "object"}, "AgentTeammateInboxStatus": {"properties": {"connected": {"title": "Connected", "type": "boolean"}, "disposable": {"default": false, "title": "Disposable", "type": "boolean"}, "provider": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Provider"}, "email_address": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Email Address"}, "connected_by_email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Connected By Email"}}, "required": ["connected"], "title": "AgentTeammateInboxStatus", "type": "object"}, "AgentTeammateInboxOAuthStartResponse": {"properties": {"authorization_url": {"title": "Authorization Url", "type": "string"}}, "required": ["authorization_url"], "title": "AgentTeammateInboxOAuthStartResponse", "type": "object"}, "AgentTeammateInboxOAuthStart": {"properties": {"provider": {"const": "outlook", "title": "Provider", "type": "string"}}, "required": ["provider"], "title": "AgentTeammateInboxOAuthStart", "type": "object"}, "AgentTeammateMcpOAuthStartResponse": {"properties": {"authorization_url": {"title": "Authorization Url", "type": "string"}, "org_mcp_id": {"title": "Org Mcp Id", "type": "integer"}, "server_name": {"title": "Server Name", "type": "string"}}, "required": ["authorization_url", "org_mcp_id", "server_name"], "title": "AgentTeammateMcpOAuthStartResponse", "type": "object"}, "AgentTeammateMcpOAuthStart": {"properties": {"org_mcp_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Org Mcp Id"}, "integration_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Integration Name"}}, "title": "AgentTeammateMcpOAuthStart", "type": "object"}, "AgentTeammateProviderKeyList": {"properties": {"keys": {"items": {"$ref": "#/components/schemas/AgentTeammateProviderKeyRead"}, "title": "Keys", "type": "array"}}, "required": ["keys"], "title": "AgentTeammateProviderKeyList", "type": "object"}, "AgentTeammateProviderKeyRead": {"properties": {"provider": {"title": "Provider", "type": "string"}, "credential_type": {"title": "Credential Type", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}, "id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Id"}, "account_label": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Account Label"}, "needs_reconnect": {"default": false, "title": "Needs Reconnect", "type": "boolean"}, "last_auth_error_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Last Auth Error At"}}, "required": ["provider", "credential_type", "updated_at"], "title": "AgentTeammateProviderKeyRead", "type": "object"}, "AgentTeammateProviderKeySet": {"properties": {"provider": {"enum": ["openai", "anthropic", "gemini"], "title": "Provider", "type": "string"}, "api_key": {"minLength": 1, "title": "Api Key", "type": "string"}, "credential_type": {"default": "api_key", "enum": ["api_key", "oauth"], "title": "Credential Type", "type": "string"}, "refresh_token": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Refresh Token"}, "expires_at": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Expires At"}, "account_label": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Account Label"}}, "required": ["provider", "api_key"], "title": "AgentTeammateProviderKeySet", "type": "object"}, "AgentTeammateSlackSettings": {"properties": {"inherited_connected": {"title": "Inherited Connected", "type": "boolean"}, "workspace_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Workspace Name"}, "enabled": {"title": "Enabled", "type": "boolean"}, "default_channel_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Default Channel Id"}, "allowed_channel_ids": {"default": [], "items": {"type": "string"}, "title": "Allowed Channel Ids", "type": "array"}, "trigger_phrases": {"default": [], "items": {"type": "string"}, "title": "Trigger Phrases", "type": "array"}}, "required": ["inherited_connected", "enabled"], "title": "AgentTeammateSlackSettings", "type": "object"}, "AgentTeammateSlackSettingsUpdate": {"properties": {"enabled": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Enabled"}, "default_channel_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Default Channel Id"}, "allowed_channel_ids": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Allowed Channel Ids"}, "trigger_phrases": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Trigger Phrases"}}, "title": "AgentTeammateSlackSettingsUpdate", "type": "object"}, "AgentTeammateGoogleWorkspaceSettings": {"properties": {"inherited_connected": {"title": "Inherited Connected", "type": "boolean"}, "workspace_domain": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Workspace Domain"}, "org_enabled_services": {"default": [], "items": {"type": "string"}, "title": "Org Enabled Services", "type": "array"}, "org_custom_scopes": {"default": [], "items": {"type": "string"}, "title": "Org Custom Scopes", "type": "array"}, "enabled_services": {"default": [], "items": {"type": "string"}, "title": "Enabled Services", "type": "array"}, "custom_scopes": {"default": [], "items": {"type": "string"}, "title": "Custom Scopes", "type": "array"}}, "required": ["inherited_connected"], "title": "AgentTeammateGoogleWorkspaceSettings", "type": "object"}, "AgentTeammateGoogleWorkspaceSettingsUpdate": {"properties": {"enabled_services": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Enabled Services"}, "custom_scopes": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Custom Scopes"}}, "title": "AgentTeammateGoogleWorkspaceSettingsUpdate", "type": "object"}, "AgentTeammateWhatsAppAccount": {"properties": {"id": {"title": "Id", "type": "string"}, "phone_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Phone Number"}, "display_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Display Name"}, "status": {"title": "Status", "type": "string"}, "is_active": {"title": "Is Active", "type": "boolean"}, "provider": {"title": "Provider", "type": "string"}, "connected_by_email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Connected By Email"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "readiness_issues": {"items": {"additionalProperties": true, "type": "object"}, "title": "Readiness Issues", "type": "array"}, "send_readiness": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Send Readiness"}}, "required": ["id", "status", "is_active", "provider", "created_at"], "title": "AgentTeammateWhatsAppAccount", "type": "object"}, "AgentTeammateWhatsAppAccounts": {"properties": {"accounts": {"items": {"$ref": "#/components/schemas/AgentTeammateWhatsAppAccount"}, "title": "Accounts", "type": "array"}}, "required": ["accounts"], "title": "AgentTeammateWhatsAppAccounts", "type": "object"}, "PlaybookRead": {"properties": {"id": {"title": "Id", "type": "string"}, "teammate_id": {"title": "Teammate Id", "type": "string"}, "current_version": {"title": "Current Version", "type": "integer"}, "rendered_markdown": {"title": "Rendered Markdown", "type": "string"}, "has_unpublished_changes": {"title": "Has Unpublished Changes", "type": "boolean"}, "can_manage": {"default": false, "title": "Can Manage", "type": "boolean"}, "sections": {"default": [], "items": {"$ref": "#/components/schemas/PlaybookSectionRead"}, "title": "Sections", "type": "array"}, "updated_by": {"anyOf": [{"$ref": "#/components/schemas/AgentTeammateUser"}, {"type": "null"}]}, "updated_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Updated At"}}, "required": ["id", "teammate_id", "current_version", "rendered_markdown", "has_unpublished_changes"], "title": "PlaybookRead", "type": "object"}, "PlaybookSectionRead": {"properties": {"id": {"title": "Id", "type": "string"}, "section_type": {"enum": ["policy", "example", "checklist", "preference", "edge_case", "client_rule", "escalation"], "title": "Section Type", "type": "string"}, "title": {"title": "Title", "type": "string"}, "body": {"title": "Body", "type": "string"}, "items": {"default": [], "items": {}, "title": "Items", "type": "array"}, "position": {"title": "Position", "type": "integer"}, "is_active": {"title": "Is Active", "type": "boolean"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "updated_at": {"format": "date-time", "title": "Updated At", "type": "string"}}, "required": ["id", "section_type", "title", "body", "position", "is_active", "created_at", "updated_at"], "title": "PlaybookSectionRead", "type": "object"}, "PlaybookSectionCreate": {"properties": {"section_type": {"enum": ["policy", "example", "checklist", "preference", "edge_case", "client_rule", "escalation"], "title": "Section Type", "type": "string"}, "title": {"default": "", "maxLength": 200, "title": "Title", "type": "string"}, "body": {"default": "", "title": "Body", "type": "string"}, "items": {"default": [], "items": {}, "title": "Items", "type": "array"}, "position": {"default": 0, "title": "Position", "type": "integer"}, "is_active": {"default": true, "title": "Is Active", "type": "boolean"}}, "required": ["section_type"], "title": "PlaybookSectionCreate", "type": "object"}, "PlaybookReorder": {"properties": {"section_ids": {"items": {"format": "uuid", "type": "string"}, "title": "Section Ids", "type": "array"}}, "required": ["section_ids"], "title": "PlaybookReorder", "type": "object"}, "PlaybookSectionUpdate": {"properties": {"section_type": {"anyOf": [{"enum": ["policy", "example", "checklist", "preference", "edge_case", "client_rule", "escalation"], "type": "string"}, {"type": "null"}], "title": "Section Type"}, "title": {"anyOf": [{"maxLength": 200, "type": "string"}, {"type": "null"}], "title": "Title"}, "body": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Body"}, "items": {"anyOf": [{"items": {}, "type": "array"}, {"type": "null"}], "title": "Items"}, "position": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Position"}, "is_active": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Active"}}, "title": "PlaybookSectionUpdate", "type": "object"}, "PlaybookVersionRead": {"properties": {"id": {"title": "Id", "type": "string"}, "version_number": {"title": "Version Number", "type": "integer"}, "change_summary": {"title": "Change Summary", "type": "string"}, "created_by": {"anyOf": [{"$ref": "#/components/schemas/AgentTeammateUser"}, {"type": "null"}]}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "rendered_markdown": {"title": "Rendered Markdown", "type": "string"}, "snapshot": {"default": [], "items": {}, "title": "Snapshot", "type": "array"}}, "required": ["id", "version_number", "change_summary", "created_at", "rendered_markdown"], "title": "PlaybookVersionRead", "type": "object"}, "PlaybookPublish": {"properties": {"change_summary": {"default": "", "maxLength": 255, "title": "Change Summary", "type": "string"}}, "title": "PlaybookPublish", "type": "object"}, "PlaybookVersionListResponse": {"properties": {"versions": {"items": {"$ref": "#/components/schemas/PlaybookVersionSummary"}, "title": "Versions", "type": "array"}}, "required": ["versions"], "title": "PlaybookVersionListResponse", "type": "object"}, "PlaybookVersionSummary": {"properties": {"id": {"title": "Id", "type": "string"}, "version_number": {"title": "Version Number", "type": "integer"}, "change_summary": {"title": "Change Summary", "type": "string"}, "created_by": {"anyOf": [{"$ref": "#/components/schemas/AgentTeammateUser"}, {"type": "null"}]}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}}, "required": ["id", "version_number", "change_summary", "created_at"], "title": "PlaybookVersionSummary", "type": "object"}, "AgentProfileAutomation": {"properties": {"id": {"title": "Id", "type": "string"}, "name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Name"}, "is_enabled": {"title": "Is Enabled", "type": "boolean"}}, "required": ["id", "is_enabled"], "title": "AgentProfileAutomation", "type": "object"}, "AgentProfileMetrics": {"properties": {"session_count": {"title": "Session Count", "type": "integer"}, "automation_count": {"title": "Automation Count", "type": "integer"}, "automation_run_count": {"title": "Automation Run Count", "type": "integer"}, "knowledge_source_count": {"title": "Knowledge Source Count", "type": "integer"}, "last_active_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Last Active At"}, "playbook_version": {"title": "Playbook Version", "type": "integer"}, "playbook_section_count": {"title": "Playbook Section Count", "type": "integer"}}, "required": ["session_count", "automation_count", "automation_run_count", "knowledge_source_count", "playbook_version", "playbook_section_count"], "title": "AgentProfileMetrics", "type": "object"}, "AgentProfileSummary": {"properties": {"teammate_id": {"title": "Teammate Id", "type": "string"}, "metrics": {"$ref": "#/components/schemas/AgentProfileMetrics"}, "automations": {"default": [], "items": {"$ref": "#/components/schemas/AgentProfileAutomation"}, "title": "Automations", "type": "array"}}, "required": ["teammate_id", "metrics"], "title": "AgentProfileSummary", "type": "object"}, "BrowserProfileListResponse": {"properties": {"profiles": {"items": {"$ref": "#/components/schemas/BrowserProfileOut"}, "title": "Profiles", "type": "array"}}, "required": ["profiles"], "title": "BrowserProfileListResponse", "type": "object"}, "BrowserProfileOut": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "organization_id": {"format": "uuid", "title": "Organization Id", "type": "string"}, "owner_user_id": {"format": "uuid", "title": "Owner User Id", "type": "string"}, "owner_display_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Owner Display Name"}, "name": {"title": "Name", "type": "string"}, "display_name": {"title": "Display Name", "type": "string"}, "origin_allowlist": {"items": {"type": "string"}, "title": "Origin Allowlist", "type": "array"}, "delegation_mode": {"title": "Delegation Mode", "type": "string"}, "size_bytes": {"title": "Size Bytes", "type": "integer"}, "last_used_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Last Used At"}, "last_saved_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Last Saved At"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "is_owner": {"title": "Is Owner", "type": "boolean"}, "grant_expires_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Grant Expires At"}}, "required": ["id", "organization_id", "owner_user_id", "name", "display_name", "origin_allowlist", "delegation_mode", "size_bytes", "last_used_at", "last_saved_at", "created_at", "is_owner"], "title": "BrowserProfileOut", "type": "object"}, "BrowserProfileCreateRequest": {"properties": {"name": {"title": "Name", "type": "string"}, "display_name": {"title": "Display Name", "type": "string"}, "origin_allowlist": {"default": [], "items": {"type": "string"}, "title": "Origin Allowlist", "type": "array"}, "delegation_mode": {"default": "private", "title": "Delegation Mode", "type": "string"}}, "required": ["name", "display_name"], "title": "BrowserProfileCreateRequest", "type": "object"}, "BrowserProfilePatchRequest": {"properties": {"display_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Display Name"}, "origin_allowlist": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Origin Allowlist"}, "delegation_mode": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Delegation Mode"}}, "title": "BrowserProfilePatchRequest", "type": "object"}, "BrowserProfileGrantListResponse": {"properties": {"grants": {"items": {"$ref": "#/components/schemas/BrowserProfileGrantOut"}, "title": "Grants", "type": "array"}}, "required": ["grants"], "title": "BrowserProfileGrantListResponse", "type": "object"}, "BrowserProfileGrantOut": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "profile_id": {"format": "uuid", "title": "Profile Id", "type": "string"}, "user_id": {"format": "uuid", "title": "User Id", "type": "string"}, "user_display_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "User Display Name"}, "added_by_user_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Added By User Id"}, "expires_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Expires At"}, "revoked_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Revoked At"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}}, "required": ["id", "profile_id", "user_id", "added_by_user_id", "expires_at", "revoked_at", "created_at"], "title": "BrowserProfileGrantOut", "type": "object"}, "BrowserProfileGrantRequest": {"properties": {"user_id": {"format": "uuid", "title": "User Id", "type": "string"}, "expires_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Expires At"}}, "required": ["user_id"], "title": "BrowserProfileGrantRequest", "type": "object"}, "BrowserProfileAuditListResponse": {"properties": {"entries": {"items": {"$ref": "#/components/schemas/BrowserProfileAuditOut"}, "title": "Entries", "type": "array"}}, "required": ["entries"], "title": "BrowserProfileAuditListResponse", "type": "object"}, "BrowserProfileAuditOut": {"properties": {"id": {"format": "uuid", "title": "Id", "type": "string"}, "profile_id": {"format": "uuid", "title": "Profile Id", "type": "string"}, "actor_user_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Actor User Id"}, "actor_display_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Actor Display Name"}, "session_id": {"anyOf": [{"format": "uuid", "type": "string"}, {"type": "null"}], "title": "Session Id"}, "action": {"title": "Action", "type": "string"}, "detail": {"additionalProperties": true, "title": "Detail", "type": "object"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}}, "required": ["id", "profile_id", "actor_user_id", "session_id", "action", "detail", "created_at"], "title": "BrowserProfileAuditOut", "type": "object"}, "PlatformApiKeyCreatedSchema": {"description": "Creation response \u2014 the only time the raw key is returned.", "properties": {"id": {"title": "Id", "type": "string"}, "name": {"title": "Name", "type": "string"}, "key_prefix": {"title": "Key Prefix", "type": "string"}, "scopes": {"items": {"type": "string"}, "title": "Scopes", "type": "array"}, "is_active": {"title": "Is Active", "type": "boolean"}, "last_used_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Last Used At"}, "created_by_email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By Email"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}, "key": {"title": "Key", "type": "string"}, "mcp_url": {"title": "Mcp Url", "type": "string"}}, "required": ["id", "name", "key_prefix", "scopes", "is_active", "created_at", "key", "mcp_url"], "title": "PlatformApiKeyCreatedSchema", "type": "object"}, "PlatformApiKeyCreateSchema": {"description": "Request schema for creating a platform API key.", "properties": {"name": {"title": "Name", "type": "string"}, "scopes": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Scopes"}}, "required": ["name"], "title": "PlatformApiKeyCreateSchema", "type": "object"}, "PlatformApiKeyListSchema": {"description": "Response schema for listing platform API keys.", "properties": {"keys": {"items": {"$ref": "#/components/schemas/PlatformApiKeyReadSchema"}, "title": "Keys", "type": "array"}}, "required": ["keys"], "title": "PlatformApiKeyListSchema", "type": "object"}, "PlatformApiKeyReadSchema": {"description": "Response schema for a platform API key (never includes the raw key).", "properties": {"id": {"title": "Id", "type": "string"}, "name": {"title": "Name", "type": "string"}, "key_prefix": {"title": "Key Prefix", "type": "string"}, "scopes": {"items": {"type": "string"}, "title": "Scopes", "type": "array"}, "is_active": {"title": "Is Active", "type": "boolean"}, "last_used_at": {"anyOf": [{"format": "date-time", "type": "string"}, {"type": "null"}], "title": "Last Used At"}, "created_by_email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By Email"}, "created_at": {"format": "date-time", "title": "Created At", "type": "string"}}, "required": ["id", "name", "key_prefix", "scopes", "is_active", "created_at"], "title": "PlatformApiKeyReadSchema", "type": "object"}, "PlatformOAuthConsentOrganizationSchema": {"properties": {"id": {"title": "Id", "type": "string"}, "name": {"title": "Name", "type": "string"}, "slug": {"title": "Slug", "type": "string"}, "role": {"title": "Role", "type": "string"}}, "required": ["id", "name", "slug", "role"], "title": "PlatformOAuthConsentOrganizationSchema", "type": "object"}, "PlatformOAuthConsentRequestSchema": {"properties": {"client_name": {"title": "Client Name", "type": "string"}, "client_uri": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Client Uri"}, "redirect_uri": {"title": "Redirect Uri", "type": "string"}, "scopes": {"items": {"type": "string"}, "title": "Scopes", "type": "array"}, "offline_access": {"title": "Offline Access", "type": "boolean"}, "expires_at": {"format": "date-time", "title": "Expires At", "type": "string"}, "organizations": {"items": {"$ref": "#/components/schemas/PlatformOAuthConsentOrganizationSchema"}, "title": "Organizations", "type": "array"}}, "required": ["client_name", "redirect_uri", "scopes", "offline_access", "expires_at", "organizations"], "title": "PlatformOAuthConsentRequestSchema", "type": "object"}, "PlatformOAuthConsentResultSchema": {"properties": {"redirect_url": {"title": "Redirect Url", "type": "string"}}, "required": ["redirect_url"], "title": "PlatformOAuthConsentResultSchema", "type": "object"}, "PlatformOAuthConsentDecisionSchema": {"properties": {"approved": {"title": "Approved", "type": "boolean"}, "organization_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Organization Id"}}, "required": ["approved"], "title": "PlatformOAuthConsentDecisionSchema", "type": "object"}}, "securitySchemes": {"JWTAuth": {"type": "http", "scheme": "bearer"}, "OptionalJWTAuth": {"type": "http", "scheme": "bearer"}, "GlobalByosAuth": {"type": "http", "scheme": "bearer"}}}, "servers": []}