{ "openapi": "3.0.0", "paths": { "/": { "get": { "operationId": "AppController_isCloud", "parameters": [], "responses": { "200": { "description": "Cloud deployment status", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IsCloudResponseDto" } } } } }, "summary": "Check if the deployment is running in a cloud environment", "tags": ["app"] } }, "/health": { "get": { "operationId": "AppController_health", "parameters": [], "responses": { "200": { "description": "Health status" } }, "summary": "Check if the deployment is healthy", "tags": ["app"] } }, "/feature-toggles": { "get": { "operationId": "AppController_featureToggles", "parameters": [], "responses": { "200": { "description": "Feature toggle states", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FeatureTogglesResponseDto" } } } } }, "summary": "Get the current feature toggle states", "tags": ["app"] } }, "/users": { "get": { "description": "Retrieve paginated users that belong to the current authenticated user's organization. Returns user information without sensitive data like password hashes.", "operationId": "UserController_getUsersInOrganization", "parameters": [ { "name": "search", "required": false, "in": "query", "description": "Search users by name or email", "schema": { "example": "john", "type": "string" } }, { "name": "limit", "required": false, "in": "query", "description": "Maximum number of users to return (default: 25)", "schema": { "default": 25, "example": 25, "type": "number" } }, { "name": "offset", "required": false, "in": "query", "description": "Number of users to skip (default: 0)", "schema": { "default": 0, "example": 0, "type": "number" } } ], "responses": { "200": { "description": "Successfully retrieved users in the organization", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedUsersListResponseDto" } } } }, "401": { "description": "User not authenticated" }, "500": { "description": "Internal server error occurred while retrieving users" } }, "summary": "Get users in current organization", "tags": ["Users"] } }, "/users/{id}/role": { "patch": { "description": "Update the role of a user. You cannot update your own role.", "operationId": "UserController_updateUserRole", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "User ID to update role for", "schema": { "format": "uuid", "example": "123e4567-e89b-12d3-a456-426614174000", "type": "string" } } ], "requestBody": { "required": true, "description": "New role information", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateUserRoleDto" } } } }, "responses": { "200": { "description": "User role successfully updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserResponseDto" } } } }, "400": { "description": "Invalid role value" }, "401": { "description": "User not authenticated or trying to update own role" }, "404": { "description": "User not found" }, "500": { "description": "Internal server error occurred while updating user role" } }, "summary": "Update user role", "tags": ["Users"] } }, "/users/name": { "patch": { "description": "Update the name of a user. Users can only update their own name.", "operationId": "UserController_updateUserName", "parameters": [], "requestBody": { "required": true, "description": "New name information", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateUserNameDto" } } } }, "responses": { "200": { "description": "User name successfully updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserResponseDto" } } } }, "400": { "description": "Invalid name value" }, "401": { "description": "User not authenticated or not authorized to update this user" }, "404": { "description": "User not found" }, "500": { "description": "Internal server error occurred while updating user name" } }, "summary": "Update user name", "tags": ["Users"] } }, "/users/password": { "patch": { "description": "Update the password of the current authenticated user. Requires current password for verification.", "operationId": "UserController_updatePassword", "parameters": [], "requestBody": { "required": true, "description": "Password update information", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdatePasswordDto" } } } }, "responses": { "204": { "description": "Password successfully updated" }, "400": { "description": "Invalid password values or passwords do not match" }, "401": { "description": "User not authenticated or current password is incorrect" }, "500": { "description": "Internal server error occurred while updating password" } }, "summary": "Update user password", "tags": ["Users"] } }, "/users/confirm-email": { "post": { "description": "Confirm a user's email address using a JWT token received via email", "operationId": "UserController_confirmEmail", "parameters": [], "requestBody": { "required": true, "description": "Email confirmation token", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConfirmEmailDto" } } } }, "responses": { "204": { "description": "Email successfully confirmed" }, "400": { "description": "Invalid token or token has expired" }, "404": { "description": "User not found" }, "500": { "description": "Internal server error occurred while confirming email" } }, "summary": "Confirm user email", "tags": ["Users"] } }, "/users/resend-confirmation": { "post": { "description": "Resend a confirmation email to the specified email address. Silently succeeds even if email is already verified or user does not exist for security reasons.", "operationId": "UserController_resendEmailConfirmation", "parameters": [], "requestBody": { "required": true, "description": "Email address to resend confirmation to", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResendEmailConfirmationDto" } } } }, "responses": { "204": { "description": "Confirmation email resent (or silently handled)" }, "400": { "description": "Invalid email format" }, "500": { "description": "Internal server error occurred while sending email" } }, "summary": "Resend email confirmation", "tags": ["Users"] } }, "/users/{id}": { "delete": { "description": "Delete a user by their ID. Only users within the same organization can be deleted.", "operationId": "UserController_deleteUser", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "User ID to delete", "schema": { "format": "uuid", "example": "123e4567-e89b-12d3-a456-426614174000", "type": "string" } } ], "responses": { "204": { "description": "User successfully deleted" }, "401": { "description": "User not authenticated" }, "404": { "description": "User not found" }, "500": { "description": "Internal server error occurred while deleting user" } }, "summary": "Delete a user", "tags": ["Users"] }, "patch": { "description": "Update another user's name and/or email within your organization. You cannot edit your own profile through this endpoint.", "operationId": "AdminUserController_adminUpdateUser", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "User ID to update", "schema": { "format": "uuid", "example": "123e4567-e89b-12d3-a456-426614174000", "type": "string" } } ], "requestBody": { "required": true, "description": "Fields to update (at least one of name or email)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AdminUpdateUserDto" } } } }, "responses": { "200": { "description": "User successfully updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserResponseDto" } } } }, "400": { "description": "Invalid input or no fields to update" }, "401": { "description": "User not authenticated, trying to edit own profile, or target user is in a different organization" }, "404": { "description": "User not found" }, "500": { "description": "Internal server error occurred while updating user" } }, "summary": "Update a user (admin)", "tags": ["Users"] } }, "/users/{id}/trigger-password-reset": { "post": { "description": "Send a password reset email to a user in your organization. Only organization admins can use this endpoint.", "operationId": "UserPasswordResetController_triggerPasswordResetForUser", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "User ID to send password reset email to", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "204": { "description": "Password reset email sent successfully" }, "401": { "description": "Not authorized to reset this user's password" }, "404": { "description": "User not found" } }, "summary": "Trigger password reset for a user", "tags": ["Users"] } }, "/users/forgot-password": { "post": { "description": "Send a password reset email to the provided email address. If the email exists in the system, a reset link will be sent.", "operationId": "UserPasswordResetController_forgotPassword", "parameters": [], "requestBody": { "required": true, "description": "Email address to send reset link to", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ForgotPasswordDto" } } } }, "responses": { "204": { "description": "Password reset email sent successfully. This response is returned regardless of whether the email exists to prevent email enumeration." }, "400": { "description": "Invalid request format or validation errors" }, "500": { "description": "Internal server error while processing the request" } }, "summary": "Trigger password reset", "tags": ["Users"] } }, "/users/reset-password": { "post": { "description": "Reset user password using the token received via email. The token must be valid and not expired.", "operationId": "UserPasswordResetController_resetPassword", "parameters": [], "requestBody": { "required": true, "description": "Password reset information including token and new password", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResetPasswordDto" } } } }, "responses": { "204": { "description": "Password reset successful." }, "400": { "description": "Invalid request format, validation errors, or password requirements not met" }, "401": { "description": "Invalid or expired reset token" }, "500": { "description": "Internal server error while processing the request" } }, "summary": "Reset password with token", "tags": ["Users"] } }, "/users/validate-reset-token": { "get": { "description": "Validate a password reset token without performing the actual password reset. Used to check if a token is valid before showing the reset form.", "operationId": "UserPasswordResetController_validateResetToken", "parameters": [ { "name": "token", "required": true, "in": "query", "description": "Password reset token from email", "schema": { "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "type": "string" } } ], "responses": { "200": { "description": "Token is valid", "content": { "application/json": { "schema": { "type": "object", "properties": { "valid": { "type": "boolean", "example": true } } } } } }, "401": { "description": "Invalid or expired reset token" }, "500": { "description": "Internal server error while processing the request" } }, "summary": "Validate password reset token", "tags": ["Users"] } }, "/super-admin/users/{orgId}": { "get": { "description": "Retrieve paginated users that belong to the specified organization. This endpoint is only accessible to super admins.", "operationId": "SuperAdminUsersController_getUsersByOrgId", "parameters": [ { "name": "orgId", "required": true, "in": "path", "description": "Organization ID to get users for", "schema": { "format": "uuid", "example": "123e4567-e89b-12d3-a456-426614174000", "type": "string" } }, { "name": "search", "required": false, "in": "query", "description": "Search users by name or email", "schema": { "example": "john", "type": "string" } }, { "name": "limit", "required": false, "in": "query", "description": "Maximum number of users to return (default: 25)", "schema": { "default": 25, "example": 25, "type": "number" } }, { "name": "offset", "required": false, "in": "query", "description": "Number of users to skip (default: 0)", "schema": { "default": 0, "example": 0, "type": "number" } } ], "responses": { "200": { "description": "Successfully retrieved users in the organization", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedUsersListResponseDto" } } } }, "401": { "description": "User not authenticated or not authorized as super admin" }, "404": { "description": "Organization not found" }, "500": { "description": "Internal server error occurred while retrieving users" } }, "summary": "Get users by organization ID", "tags": ["Super Admin Users"] } }, "/super-admin/users/{userId}": { "delete": { "description": "Delete a user by their ID. This endpoint is only accessible to super admins and allows deletion of users from any organization.", "operationId": "SuperAdminUsersController_deleteUser", "parameters": [ { "name": "userId", "required": true, "in": "path", "description": "User ID to delete", "schema": { "format": "uuid", "example": "123e4567-e89b-12d3-a456-426614174000", "type": "string" } } ], "responses": { "204": { "description": "User successfully deleted" }, "401": { "description": "User not authenticated or not authorized as super admin" }, "404": { "description": "User not found" }, "500": { "description": "Internal server error occurred while deleting user" } }, "summary": "Delete a user", "tags": ["Super Admin Users"] } }, "/super-admin/users/{userId}/trigger-password-reset": { "post": { "description": "Send a password reset email to the specified user and return the reset URL. This endpoint is only accessible to super admins.", "operationId": "SuperAdminUsersController_triggerPasswordReset", "parameters": [ { "name": "userId", "required": true, "in": "path", "description": "User ID to send password reset email to", "schema": { "format": "uuid", "example": "123e4567-e89b-12d3-a456-426614174000", "type": "string" } } ], "responses": { "200": { "description": "Password reset email sent successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TriggerPasswordResetResponseDto" } } } }, "401": { "description": "User not authenticated or not authorized as super admin" }, "404": { "description": "User not found" }, "500": { "description": "Internal server error occurred while sending password reset email" } }, "summary": "Trigger password reset for a user", "tags": ["Super Admin Users"] } }, "/super-admin/users/{orgId}/create": { "post": { "description": "Create a new user in the specified organization with a randomly generated password. A password reset email will be sent to the user. This endpoint is only accessible to super admins.", "operationId": "SuperAdminUsersController_createUser", "parameters": [ { "name": "orgId", "required": true, "in": "path", "description": "Organization ID to create the user in", "schema": { "format": "uuid", "example": "123e4567-e89b-12d3-a456-426614174000", "type": "string" } } ], "requestBody": { "required": true, "description": "User information", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateUserDto" } } } }, "responses": { "201": { "description": "User created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserResponseDto" } } } }, "400": { "description": "Invalid request format or validation errors" }, "401": { "description": "User not authenticated or not authorized as super admin" }, "404": { "description": "Organization not found" }, "500": { "description": "Internal server error occurred while creating user" } }, "summary": "Create a new user in an organization", "tags": ["Super Admin Users"] } }, "/super-admin/users": { "get": { "description": "Retrieve paginated users across all organizations for platform administration.", "operationId": "SuperAdminUserListController_getAllUsers", "parameters": [ { "name": "search", "required": false, "in": "query", "description": "Search users by name or email", "schema": { "example": "john", "type": "string" } }, { "name": "limit", "required": false, "in": "query", "description": "Maximum number of users to return (default: 25)", "schema": { "default": 25, "example": 25, "type": "number" } }, { "name": "offset", "required": false, "in": "query", "description": "Number of users to skip (default: 0)", "schema": { "default": 0, "example": 0, "type": "number" } } ], "responses": { "200": { "description": "Successfully retrieved users across organizations", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedSuperAdminUsersListResponseDto" } } } }, "401": { "description": "User not authenticated or not authorized as super admin" }, "500": { "description": "Internal server error occurred while retrieving users" } }, "summary": "Get users across all organizations", "tags": ["Super Admin Users"] } }, "/super-admin/users/export/users.csv": { "get": { "description": "Export all users, regardless of role, from organizations with a non-cancelled subscription, including subscriptions that start in the future. Each row includes the user role. This endpoint is only accessible to super admins.", "operationId": "SuperAdminUserExportsController_exportUsers", "parameters": [], "responses": { "200": { "description": "CSV export generated successfully", "content": { "text/csv": { "schema": { "type": "string", "format": "binary" } } } }, "401": { "description": "User not authenticated or not authorized as super admin" }, "500": { "description": "Internal server error occurred while exporting users" } }, "summary": "Export users as CSV", "tags": ["Super Admin Users"] } }, "/super-admin/super-admins": { "get": { "description": "Retrieve all users with super admin status. Only accessible to super admins.", "operationId": "SuperAdminManagementController_listSuperAdmins", "parameters": [], "responses": { "200": { "description": "List of super admins", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/SuperAdminUserResponseDto" } } } } }, "401": { "description": "User not authenticated or not authorized as super admin" } }, "summary": "List all super admins", "tags": ["Super Admin Management"] }, "post": { "description": "Promote an existing user to super admin by email address. Idempotent if user is already a super admin.", "operationId": "SuperAdminManagementController_promoteToSuperAdmin", "parameters": [], "requestBody": { "required": true, "description": "Email of the user to promote", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PromoteToSuperAdminDto" } } } }, "responses": { "200": { "description": "User promoted to super admin (or already a super admin)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuperAdminUserResponseDto" } } } }, "401": { "description": "User not authenticated or not authorized as super admin" }, "404": { "description": "User with the given email not found" } }, "summary": "Promote a user to super admin", "tags": ["Super Admin Management"] } }, "/super-admin/super-admins/{userId}": { "delete": { "description": "Demote a user from super admin to customer. Cannot demote yourself.", "operationId": "SuperAdminManagementController_demoteFromSuperAdmin", "parameters": [ { "name": "userId", "required": true, "in": "path", "description": "User ID to demote", "schema": { "format": "uuid", "example": "123e4567-e89b-12d3-a456-426614174000", "type": "string" } } ], "responses": { "204": { "description": "Super admin status removed" }, "401": { "description": "User not authenticated or not authorized as super admin" }, "403": { "description": "Cannot remove your own super admin status" }, "404": { "description": "User not found" }, "409": { "description": "Cannot demote the last super admin" }, "422": { "description": "User is not a super admin" } }, "summary": "Remove super admin status from a user", "tags": ["Super Admin Management"] } }, "/invites": { "post": { "description": "Send an invitation to a user to join an organization with a specific role", "operationId": "InvitesController_create", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateInviteDto" } } } }, "responses": { "201": { "description": "The invite has been successfully created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateInviteResponseDto" } } } }, "400": { "description": "Invalid invite data" }, "500": { "description": "Internal server error" } }, "summary": "Create a new invite", "tags": ["invites"] }, "get": { "description": "Retrieve paginated invites with optional search", "operationId": "InvitesController_getInvites", "parameters": [ { "name": "search", "required": false, "in": "query", "description": "Search invites by email", "schema": { "example": "john@example.com", "type": "string" } }, { "name": "limit", "required": false, "in": "query", "description": "Maximum number of invites to return (default: 25)", "schema": { "default": 25, "example": 25, "type": "number" } }, { "name": "offset", "required": false, "in": "query", "description": "Number of invites to skip (default: 0)", "schema": { "default": 0, "example": 0, "type": "number" } } ], "responses": { "200": { "description": "Returns paginated invites for the organization", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedInvitesListResponseDto" } } } }, "500": { "description": "Internal server error" } }, "summary": "Get all invites for current user's organization", "tags": ["invites"] } }, "/invites/bulk": { "post": { "description": "Send invitations to multiple users. All rows are validated before any are processed.", "operationId": "InvitesController_createBulk", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateBulkInvitesDto" } } } }, "responses": { "201": { "description": "The invites have been processed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateBulkInvitesResponseDto" } } } }, "400": { "description": "Validation failed for one or more invites" }, "500": { "description": "Internal server error" } }, "summary": "Create multiple invites in bulk", "tags": ["invites"] } }, "/invites/{token}": { "get": { "description": "Retrieve invite details including organization name by token", "operationId": "InvitesController_getInviteByToken", "parameters": [ { "name": "token", "required": true, "in": "path", "description": "Token of the invited user", "schema": { "example": "1234567890", "type": "string" } } ], "responses": { "200": { "description": "Returns the invite with organization details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InviteDetailResponseDto" } } } }, "404": { "description": "Invite not found" }, "500": { "description": "Internal server error" } }, "summary": "Get a single invite by token", "tags": ["invites"] } }, "/invites/accept": { "post": { "description": "Accept an invitation using the JWT token", "operationId": "InvitesController_acceptInvite", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AcceptInviteDto" } } } }, "responses": { "200": { "description": "The invite has been successfully accepted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AcceptInviteResponseDto" } } } }, "400": { "description": "Invalid invite token or invite already accepted/expired" }, "404": { "description": "Invite not found" }, "500": { "description": "Internal server error" } }, "summary": "Accept an invite", "tags": ["invites"] } }, "/invites/{id}/resend": { "post": { "description": "Delete the expired invite and create a new one with the same details, then send the invitation email", "operationId": "InvitesController_resendExpiredInvite", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The UUID of the expired invite to resend", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "The invite has been successfully resent", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateInviteResponseDto" } } } }, "400": { "description": "Invite has not expired yet or invalid data" }, "404": { "description": "Invite not found" }, "500": { "description": "Internal server error" } }, "summary": "Resend an expired invite", "tags": ["invites"] } }, "/invites/all": { "delete": { "description": "Delete all pending invitations for the organization (Admin only)", "operationId": "InvitesController_deleteAllPending", "parameters": [], "responses": { "200": { "description": "All pending invites have been deleted", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteAllPendingInvitesResponseDto" } } } }, "403": { "description": "Unauthorized - Admin role required" }, "500": { "description": "Internal server error" } }, "summary": "Delete all pending invites", "tags": ["invites"] } }, "/invites/{id}": { "delete": { "description": "Delete an invitation (only allowed by the user who created it)", "operationId": "InvitesController_deleteInvite", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The UUID of the invite to delete", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "204": { "description": "The invite has been successfully deleted" }, "403": { "description": "Unauthorized to delete this invite" }, "404": { "description": "Invite not found" }, "500": { "description": "Internal server error" } }, "summary": "Delete an invite", "tags": ["invites"] } }, "/super-admin/orgs": { "post": { "description": "Create a new organization in the system. Only accessible to users with the super admin system role.", "operationId": "SuperAdminOrgsController_createOrg", "parameters": [], "requestBody": { "required": true, "description": "Organization information", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateOrgRequestDto" } } } }, "responses": { "201": { "description": "Successfully created organization for the super admin.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuperAdminOrgResponseDto" } } } }, "400": { "description": "Invalid request format or validation errors." }, "403": { "description": "The requester is not a super admin." } }, "summary": "Create a new organization", "tags": ["Super Admin Orgs"] }, "get": { "description": "Retrieve paginated organizations in the system. Only accessible to users with the super admin system role.", "operationId": "SuperAdminOrgsController_getAllOrgs", "parameters": [ { "name": "search", "required": false, "in": "query", "description": "Search organizations by name.", "schema": { "example": "Acme", "type": "string" } }, { "name": "limit", "required": false, "in": "query", "description": "Maximum number of organizations to return (default: 50).", "schema": { "default": 50, "example": 25, "type": "number" } }, { "name": "offset", "required": false, "in": "query", "description": "Number of organizations to skip (default: 0).", "schema": { "default": 0, "example": 0, "type": "number" } } ], "responses": { "200": { "description": "Successfully retrieved organizations for the super admin.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuperAdminOrgListResponseDto" } } } }, "403": { "description": "The requester is not a super admin." } }, "summary": "List all organizations", "tags": ["Super Admin Orgs"] } }, "/super-admin/orgs/{id}": { "get": { "description": "Retrieve an organization by its ID. Only accessible to users with the super admin system role.", "operationId": "SuperAdminOrgsController_getOrgById", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The ID of the organization to retrieve.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successfully retrieved organization for the super admin.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuperAdminOrgResponseDto" } } } }, "403": { "description": "The requester is not a super admin." } }, "summary": "Get an organization by ID", "tags": ["Super Admin Orgs"] } }, "/role-permissions": { "get": { "operationId": "RolePermissionsController_get", "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RolePermissionsResponseDto" } } } } }, "summary": "Get the per-role permission grants for the current user's organization", "tags": ["Role Permissions"] } }, "/role-permissions/{role}": { "put": { "operationId": "RolePermissionsController_update", "parameters": [ { "name": "role", "required": true, "in": "path", "schema": { "enum": ["manager", "user"], "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateRolePermissionsDto" } } } }, "responses": { "204": { "description": "" } }, "summary": "Replace the permissions granted to a role", "tags": ["Role Permissions"] } }, "/permissions/me": { "get": { "operationId": "MyPermissionsController_getMine", "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MyPermissionsResponseDto" } } } } }, "summary": "Get the current user's effective permissions", "tags": ["Permissions"] } }, "/subscriptions/active": { "get": { "operationId": "SubscriptionsController_hasActiveSubscription", "parameters": [], "responses": { "200": { "description": "Successfully checked subscription status", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ActiveSubscriptionResponseDto" } } } }, "500": { "description": "Internal server error" } }, "summary": "Check if the current organization has an active subscription", "tags": ["subscriptions"] } }, "/subscriptions/price": { "get": { "operationId": "SubscriptionsController_getCurrentPrice", "parameters": [], "responses": { "200": { "description": "Successfully retrieved current price", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PriceResponseDto" } } } }, "404": { "description": "Price not configured" }, "500": { "description": "Internal server error" } }, "summary": "Get the current price per seat monthly", "tags": ["subscriptions"] } }, "/super-admin/subscriptions/{orgId}": { "get": { "description": "Retrieve subscription details for the specified organization. This endpoint is only accessible to super admins.", "operationId": "SuperAdminSubscriptionsController_getSubscription", "parameters": [ { "name": "orgId", "required": true, "in": "path", "description": "Organization ID to get subscription for", "schema": { "format": "uuid", "example": "123e4567-e89b-12d3-a456-426614174000", "type": "string" } } ], "responses": { "200": { "description": "Successfully retrieved subscription details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubscriptionResponseDtoNullable" } } } }, "401": { "description": "User not authenticated or not authorized as super admin" }, "500": { "description": "Internal server error" } }, "summary": "Get subscription details for a specific organization", "tags": ["Super Admin Subscriptions"] }, "post": { "description": "Create a new subscription for the specified organization. This endpoint is only accessible to super admins.", "operationId": "SuperAdminSubscriptionsController_createSubscription", "parameters": [ { "name": "orgId", "required": true, "in": "path", "description": "Organization ID to create subscription for", "schema": { "format": "uuid", "example": "123e4567-e89b-12d3-a456-426614174000", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateSubscriptionRequestDto" } } } }, "responses": { "201": { "description": "Successfully created subscription", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubscriptionResponseDto" } } } }, "400": { "description": "Invalid subscription data provided" }, "401": { "description": "User not authenticated or not authorized as super admin" }, "409": { "description": "Subscription already exists for this organization" }, "500": { "description": "Internal server error" } }, "summary": "Create a new subscription for a specific organization", "tags": ["Super Admin Subscriptions"] }, "delete": { "description": "Cancel the subscription for the specified organization. This endpoint is only accessible to super admins.", "operationId": "SuperAdminSubscriptionsController_cancelSubscription", "parameters": [ { "name": "orgId", "required": true, "in": "path", "description": "Organization ID to cancel subscription for", "schema": { "format": "uuid", "example": "123e4567-e89b-12d3-a456-426614174000", "type": "string" } } ], "responses": { "204": { "description": "Successfully cancelled subscription" }, "401": { "description": "User not authenticated or not authorized as super admin" }, "404": { "description": "No subscription found for the organization" }, "409": { "description": "Subscription is already cancelled" }, "500": { "description": "Internal server error" } }, "summary": "Cancel the subscription for a specific organization", "tags": ["Super Admin Subscriptions"] } }, "/super-admin/subscriptions/{orgId}/change": { "post": { "description": "Ends the current subscription (cancelled or deleted, per oldSubscriptionDisposition) and creates a new one with the provided data. This is the only way to change subscription type. Only accessible to super admins.", "operationId": "SuperAdminSubscriptionsController_changeSubscription", "parameters": [ { "name": "orgId", "required": true, "in": "path", "description": "Organization ID to change the subscription for", "schema": { "format": "uuid", "example": "123e4567-e89b-12d3-a456-426614174000", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChangeSubscriptionRequestDto" } } } }, "responses": { "200": { "description": "Successfully changed subscription" }, "400": { "description": "Invalid subscription data provided" }, "401": { "description": "User not authenticated or not authorized as super admin" }, "404": { "description": "No active subscription found for the organization" }, "500": { "description": "Internal server error" } }, "summary": "Change an organization subscription (cancel/delete + recreate)", "tags": ["Super Admin Subscriptions"] } }, "/super-admin/subscriptions/{orgId}/seats": { "put": { "description": "Update the number of seats for the specified organization. This endpoint is only accessible to super admins.", "operationId": "SuperAdminSubscriptionsController_updateSeats", "parameters": [ { "name": "orgId", "required": true, "in": "path", "description": "Organization ID to update seats for", "schema": { "format": "uuid", "example": "123e4567-e89b-12d3-a456-426614174000", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateSeatsDto" } } } }, "responses": { "204": { "description": "Successfully updated seats" }, "400": { "description": "Invalid seat update data provided" }, "401": { "description": "User not authenticated or not authorized as super admin" }, "404": { "description": "No subscription found for the organization" }, "500": { "description": "Internal server error" } }, "summary": "Update the number of seats for a specific organization", "tags": ["Super Admin Subscriptions"] } }, "/super-admin/subscriptions/{orgId}/monthly-credits": { "put": { "operationId": "SuperAdminSubscriptionsController_updateMonthlyCredits", "parameters": [ { "name": "orgId", "required": true, "in": "path", "description": "Organization ID to update monthly credits for", "schema": { "format": "uuid", "example": "123e4567-e89b-12d3-a456-426614174000", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateMonthlyCreditsDto" } } } }, "responses": { "204": { "description": "Successfully updated monthly credits" }, "400": { "description": "Invalid monthly credits provided or subscription is not usage-based" }, "401": { "description": "User not authenticated or not authorized as super admin" }, "404": { "description": "No subscription found for the organization" } }, "summary": "Update monthly credits for an organization (super admin)", "tags": ["Super Admin Subscriptions"] } }, "/super-admin/subscriptions/{orgId}/billing-info": { "put": { "description": "Update the billing information for the specified organization. This endpoint is only accessible to super admins.", "operationId": "SuperAdminSubscriptionsController_updateBillingInfo", "parameters": [ { "name": "orgId", "required": true, "in": "path", "description": "Organization ID to update billing info for", "schema": { "format": "uuid", "example": "123e4567-e89b-12d3-a456-426614174000", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateBillingInfoDto" } } } }, "responses": { "204": { "description": "Successfully updated billing information" }, "400": { "description": "Invalid billing information provided" }, "401": { "description": "User not authenticated or not authorized as super admin" }, "404": { "description": "No subscription found for the organization" }, "500": { "description": "Internal server error" } }, "summary": "Update the billing information for a specific organization", "tags": ["Super Admin Subscriptions"] } }, "/super-admin/subscriptions/{orgId}/start-date": { "put": { "description": "Update the start date for the latest subscription of the specified organization. This endpoint is only accessible to super admins.", "operationId": "SuperAdminSubscriptionsController_updateStartDate", "parameters": [ { "name": "orgId", "required": true, "in": "path", "description": "Organization ID to update the subscription start date for", "schema": { "format": "uuid", "example": "123e4567-e89b-12d3-a456-426614174000", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateStartDateDto" } } } }, "responses": { "204": { "description": "Successfully updated subscription start date" }, "400": { "description": "Invalid start date provided" }, "401": { "description": "User not authenticated or not authorized as super admin" }, "404": { "description": "No subscription found for the organization" }, "500": { "description": "Internal server error" } }, "summary": "Update the start date for a specific organization subscription", "tags": ["Super Admin Subscriptions"] } }, "/super-admin/subscriptions/{orgId}/uncancel": { "post": { "description": "Uncancel the subscription for the specified organization. This endpoint is only accessible to super admins.", "operationId": "SuperAdminSubscriptionsController_uncancelSubscription", "parameters": [ { "name": "orgId", "required": true, "in": "path", "description": "Organization ID to uncancel subscription for", "schema": { "format": "uuid", "example": "123e4567-e89b-12d3-a456-426614174000", "type": "string" } } ], "responses": { "204": { "description": "Successfully uncancelled subscription" }, "401": { "description": "User not authenticated or not authorized as super admin" }, "404": { "description": "No subscription found for the organization" }, "409": { "description": "Subscription is not cancelled" }, "500": { "description": "Internal server error" } }, "summary": "Uncancel the subscription for a specific organization", "tags": ["Super Admin Subscriptions"] } }, "/models/available/language": { "get": { "operationId": "ModelsController_getAvailableLanguageModels", "parameters": [], "responses": { "200": { "description": "Successfully retrieved all available language models", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ModelWithConfigResponseDto" } } } } }, "500": { "description": "Internal server error" } }, "summary": "Get all available language models", "tags": ["models"] } }, "/models/available/embedding": { "get": { "operationId": "ModelsController_getAvailableEmbeddingModels", "parameters": [], "responses": { "200": { "description": "Successfully retrieved all available embedding models", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ModelWithConfigResponseDto" } } } } }, "500": { "description": "Internal server error" } }, "summary": "Get all available embedding models", "tags": ["models"] } }, "/models/available/image-generation": { "get": { "operationId": "ModelsController_getAvailableImageGenerationModels", "parameters": [], "responses": { "200": { "description": "Successfully retrieved all available image-generation models", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ModelWithConfigResponseDto" } } } } }, "500": { "description": "Internal server error" } }, "summary": "Get all available image-generation models", "tags": ["models"] } }, "/models/providers": { "get": { "operationId": "ModelsController_getProviders", "parameters": [], "responses": { "200": { "description": "Successfully retrieved all model providers", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ModelProviderInfoResponseDto" } } } } } }, "summary": "Get all available model providers with their info", "tags": ["models"] } }, "/models/permitted": { "post": { "operationId": "ModelsController_createPermittedModel", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreatePermittedModelDto" } } } }, "responses": { "201": { "description": "Successfully created a permitted model" }, "400": { "description": "Invalid model input" }, "500": { "description": "Internal server error" } }, "summary": "Create a permitted model", "tags": ["models"] } }, "/models/permitted/{id}": { "delete": { "operationId": "ModelsController_deletePermittedModel", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "204": { "description": "Successfully deleted a permitted model" }, "401": { "description": "Unauthorized" } }, "summary": "Delete a permitted model", "tags": ["models"] }, "patch": { "operationId": "ModelsController_updatePermittedModel", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdatePermittedModelDto" } } } }, "responses": { "200": { "description": "Successfully updated a permitted model", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/PermittedLanguageModelResponseDto" }, { "$ref": "#/components/schemas/PermittedEmbeddingModelResponseDto" }, { "$ref": "#/components/schemas/PermittedImageGenerationModelResponseDto" } ] } } } }, "401": { "description": "Unauthorized" }, "404": { "description": "Permitted model not found" } }, "summary": "Update a permitted model", "tags": ["models"] } }, "/models/permitted/language-models": { "get": { "description": "Returns the effective set of language models for the current user, considering team overrides. If the user is in any team with model override enabled, only those teams' models are returned (union). Otherwise, org-level models are returned.", "operationId": "ModelsController_getPermittedLanguageModels", "parameters": [], "responses": { "200": { "description": "Successfully retrieved effective language models", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PermittedLanguageModelResponseDto" } } } } }, "500": { "description": "Internal server error" } }, "summary": "Get effective permitted language models for the current user", "tags": ["models"] } }, "/models/permitted/language-models/org": { "get": { "description": "Returns only org-scoped permitted language models, ignoring team overrides. Used by the admin model settings page.", "operationId": "ModelsController_getOrgPermittedLanguageModels", "parameters": [], "responses": { "200": { "description": "Successfully retrieved org-level language models", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PermittedLanguageModelResponseDto" } } } } }, "500": { "description": "Internal server error" } }, "summary": "Get org-level permitted language models (admin view)", "tags": ["models"] } }, "/models/provider/{provider}": { "get": { "description": "Retrieves detailed information about a specific model provider", "operationId": "ModelsController_getModelProviderInfo", "parameters": [ { "name": "provider", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successfully retrieved model provider information", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ModelProviderInfoResponseDto" } } } }, "404": { "description": "Model provider not found" }, "500": { "description": "Internal server error" } }, "summary": "Get model provider information", "tags": ["models"] } }, "/models/embedding/enabled": { "get": { "operationId": "ModelsController_isEmbeddingModelEnabled", "parameters": [], "responses": { "200": { "description": "Successfully checked embedding model status", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EmbeddingModelEnabledResponseDto" } } } }, "500": { "description": "Internal server error" } }, "summary": "Check if an embedding model is enabled for this org", "tags": ["models"] } }, "/models/default": { "get": { "description": "Returns the applicable default model with fallback hierarchy: User default → Org default → First available model", "operationId": "ModelsDefaultsController_getEffectiveDefaultModel", "parameters": [], "responses": { "200": { "description": "Successfully retrieved the effective default model", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PermittedLanguageModelResponseDtoNullable" } } } }, "500": { "description": "Internal server error" } }, "summary": "Get the effective default model for the user", "tags": ["models"] } }, "/models/org/default": { "get": { "description": "Returns only the organization's specific default model. Returns null if no org default is set.", "operationId": "ModelsDefaultsController_getOrgSpecificDefaultModel", "parameters": [], "responses": { "200": { "description": "Successfully retrieved the organization default model", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PermittedLanguageModelResponseDtoNullable" } } } }, "500": { "description": "Internal server error" } }, "summary": "Get the organization default model", "tags": ["models"] }, "put": { "description": "Sets the specified permitted model as the organization default. If a default already exists, it will be updated to the new model.", "operationId": "ModelsDefaultsController_manageOrgDefaultModel", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetOrgDefaultModelDto" } } } }, "responses": { "200": { "description": "Successfully set or updated the organization default model", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PermittedLanguageModelResponseDto" } } } }, "400": { "description": "Invalid request payload" }, "404": { "description": "Permitted model not found" } }, "summary": "Set or update the organization default model", "tags": ["models"] } }, "/models/user/default": { "get": { "description": "Returns the user's personal default model only. Returns null if no user-specific default is set.", "operationId": "ModelsDefaultsController_getUserSpecificDefaultModel", "parameters": [], "responses": { "200": { "description": "Successfully retrieved the user-specific default model", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PermittedLanguageModelResponseDtoNullable" } } } }, "500": { "description": "Internal server error" } }, "summary": "Get the user-specific default model", "tags": ["models"] }, "put": { "description": "Sets the specified permitted model as the user default. If a default already exists, it will be updated to the new model.", "operationId": "ModelsDefaultsController_manageUserDefaultModel", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetUserDefaultModelDto" } } } }, "responses": { "200": { "description": "Successfully set or updated the user default model", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PermittedLanguageModelResponseDto" } } } }, "400": { "description": "Invalid request payload" }, "404": { "description": "Permitted model not found" } }, "summary": "Set or update the user default model", "tags": ["models"] }, "delete": { "operationId": "ModelsDefaultsController_deleteUserDefaultModel", "parameters": [], "responses": { "204": { "description": "Successfully deleted the user default model" }, "404": { "description": "User default model not found" } }, "summary": "Delete the user default model", "tags": ["models"] } }, "/teams/{teamId}/permitted-models": { "get": { "operationId": "TeamPermittedModelsController_listTeamPermittedModels", "parameters": [ { "name": "teamId", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successfully retrieved team's permitted language models", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PermittedLanguageModelResponseDto" } } } } }, "404": { "description": "Team not found" } }, "summary": "List a team's permitted language models", "tags": ["team-permitted-models"] }, "post": { "description": "Creates a team-scoped permitted model. The model must already be permitted at the organization level.", "operationId": "TeamPermittedModelsController_createTeamPermittedModel", "parameters": [ { "name": "teamId", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateTeamPermittedModelDto" } } } }, "responses": { "201": { "description": "Successfully added permitted model to team", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/PermittedLanguageModelResponseDto" }, { "$ref": "#/components/schemas/PermittedImageGenerationModelResponseDto" } ] } } } }, "400": { "description": "Invalid input or model not org-permitted" }, "404": { "description": "Model not found" }, "409": { "description": "Model already permitted for this team" } }, "summary": "Add a permitted model to a team", "tags": ["team-permitted-models"] } }, "/teams/{teamId}/permitted-models/image-generation": { "get": { "operationId": "TeamPermittedModelsController_listTeamImageGenerationModels", "parameters": [ { "name": "teamId", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successfully retrieved team's permitted image-generation models", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PermittedImageGenerationModelResponseDto" } } } } }, "404": { "description": "Team not found" } }, "summary": "List a team's permitted image-generation models", "tags": ["team-permitted-models"] } }, "/teams/{teamId}/permitted-models/{id}": { "patch": { "description": "Updates a team-scoped permitted model, e.g. toggling whether it enforces anonymous mode for members of the team.", "operationId": "TeamPermittedModelsController_updateTeamPermittedModel", "parameters": [ { "name": "teamId", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdatePermittedModelDto" } } } }, "responses": { "200": { "description": "Successfully updated team permitted model", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PermittedLanguageModelResponseDto" } } } }, "404": { "description": "Permitted model not found" } }, "summary": "Update a team's permitted model", "tags": ["team-permitted-models"] }, "delete": { "operationId": "TeamPermittedModelsController_deleteTeamPermittedModel", "parameters": [ { "name": "teamId", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "204": { "description": "Successfully removed permitted model from team" }, "404": { "description": "Permitted model not found" } }, "summary": "Remove a permitted model from a team", "tags": ["team-permitted-models"] } }, "/teams/{teamId}/permitted-models/default": { "put": { "description": "Sets the specified team-scoped permitted model as the default model for the team.", "operationId": "TeamPermittedModelsController_setTeamDefaultModel", "parameters": [ { "name": "teamId", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetTeamDefaultModelDto" } } } }, "responses": { "200": { "description": "Successfully set team default model", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PermittedLanguageModelResponseDto" } } } }, "404": { "description": "Permitted model not found" } }, "summary": "Set the team's default model", "tags": ["team-permitted-models"] } }, "/super-admin/models/{orgId}/available/language": { "get": { "operationId": "SuperAdminPermittedModelsController_getAvailableLanguageModels", "parameters": [ { "name": "orgId", "required": true, "in": "path", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Successfully retrieved available language models", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ModelWithConfigResponseDto" } } } } }, "401": { "description": "Not authorized as super admin" }, "500": { "description": "Internal server error" } }, "summary": "Get all available language models", "tags": ["Super Admin Models"] } }, "/super-admin/models/{orgId}/available/embedding": { "get": { "operationId": "SuperAdminPermittedModelsController_getAvailableEmbeddingModels", "parameters": [ { "name": "orgId", "required": true, "in": "path", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Successfully retrieved available embedding models", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ModelWithConfigResponseDto" } } } } }, "401": { "description": "Not authorized as super admin" }, "500": { "description": "Internal server error" } }, "summary": "Get all available embedding models", "tags": ["Super Admin Models"] } }, "/super-admin/models/{orgId}/available/image-generation": { "get": { "operationId": "SuperAdminPermittedModelsController_getAvailableImageGenerationModels", "parameters": [ { "name": "orgId", "required": true, "in": "path", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Successfully retrieved available image-generation models", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ModelWithConfigResponseDto" } } } } }, "401": { "description": "Not authorized as super admin" }, "500": { "description": "Internal server error" } }, "summary": "Get all available image-generation models", "tags": ["Super Admin Models"] } }, "/super-admin/models/{orgId}/default-model": { "put": { "description": "Sets the specified permitted model as the organization default. If a default already exists, it will be updated to the new model. This endpoint is only accessible to super admins.", "operationId": "SuperAdminPermittedModelsController_manageOrgDefaultModel", "parameters": [ { "name": "orgId", "required": true, "in": "path", "description": "Organization ID to set the default model for", "schema": { "format": "uuid", "example": "123e4567-e89b-12d3-a456-426614174000", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetOrgDefaultModelDto" } } } }, "responses": { "200": { "description": "Successfully set or updated organization default model", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PermittedLanguageModelResponseDto" } } } }, "400": { "description": "Invalid request payload" }, "401": { "description": "User not authenticated or not authorized as super admin" }, "404": { "description": "Permitted model not found" }, "500": { "description": "Internal server error" } }, "summary": "Set or update the organization default model", "tags": ["Super Admin Models"] } }, "/super-admin/models/{orgId}/permitted-models": { "get": { "description": "Retrieve all permitted models configured for the specified organization. This endpoint is only accessible to super admins.", "operationId": "SuperAdminPermittedModelsController_getPermittedModels", "parameters": [ { "name": "orgId", "required": true, "in": "path", "description": "Organization ID to retrieve permitted models for", "schema": { "format": "uuid", "example": "123e4567-e89b-12d3-a456-426614174000", "type": "string" } } ], "responses": { "200": { "description": "Successfully retrieved permitted models", "content": { "application/json": { "schema": { "type": "array", "items": { "oneOf": [ { "$ref": "#/components/schemas/PermittedLanguageModelResponseDto" }, { "$ref": "#/components/schemas/PermittedEmbeddingModelResponseDto" }, { "$ref": "#/components/schemas/PermittedImageGenerationModelResponseDto" } ] } } } } }, "401": { "description": "User not authenticated or not authorized as super admin" }, "500": { "description": "Internal server error" } }, "summary": "Get all permitted models for a specific organization", "tags": ["Super Admin Models"] }, "post": { "description": "Create a new permitted model for the specified organization. This endpoint is only accessible to super admins.", "operationId": "SuperAdminPermittedModelsController_createPermittedModel", "parameters": [ { "name": "orgId", "required": true, "in": "path", "description": "Organization ID to create permitted model for", "schema": { "format": "uuid", "example": "123e4567-e89b-12d3-a456-426614174000", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreatePermittedModelDto" } } } }, "responses": { "201": { "description": "Successfully created permitted model" }, "400": { "description": "Invalid model input" }, "401": { "description": "User not authenticated or not authorized as super admin" }, "409": { "description": "Model already permitted for this organization" }, "500": { "description": "Internal server error" } }, "summary": "Create a permitted model for a specific organization", "tags": ["Super Admin Models"] } }, "/super-admin/models/{orgId}/permitted-models/{id}": { "delete": { "description": "Delete a permitted model configured for the specified organization. This endpoint is only accessible to super admins.", "operationId": "SuperAdminPermittedModelsController_deletePermittedModel", "parameters": [ { "name": "orgId", "required": true, "in": "path", "description": "Organization ID that owns the permitted model", "schema": { "format": "uuid", "example": "123e4567-e89b-12d3-a456-426614174000", "type": "string" } }, { "name": "id", "required": true, "in": "path", "description": "Permitted model ID to delete", "schema": { "format": "uuid", "example": "123e4567-e89b-12d3-a456-426614174000", "type": "string" } } ], "responses": { "204": { "description": "Successfully deleted permitted model" }, "400": { "description": "Cannot delete the last permitted language model or default model" }, "401": { "description": "User not authenticated or not authorized as super admin" }, "404": { "description": "Permitted model not found" }, "500": { "description": "Internal server error" } }, "summary": "Delete a permitted model for a specific organization", "tags": ["Super Admin Models"] }, "patch": { "description": "Update a permitted model configured for the specified organization. This endpoint is only accessible to super admins.", "operationId": "SuperAdminPermittedModelsController_updatePermittedModel", "parameters": [ { "name": "orgId", "required": true, "in": "path", "description": "Organization ID that owns the permitted model", "schema": { "format": "uuid", "example": "123e4567-e89b-12d3-a456-426614174000", "type": "string" } }, { "name": "id", "required": true, "in": "path", "description": "Permitted model ID to update", "schema": { "format": "uuid", "example": "123e4567-e89b-12d3-a456-426614174000", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdatePermittedModelDto" } } } }, "responses": { "200": { "description": "Successfully updated permitted model", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/PermittedLanguageModelResponseDto" }, { "$ref": "#/components/schemas/PermittedEmbeddingModelResponseDto" }, { "$ref": "#/components/schemas/PermittedImageGenerationModelResponseDto" } ] } } } }, "400": { "description": "Invalid update data provided" }, "401": { "description": "User not authenticated or not authorized as super admin" }, "404": { "description": "Permitted model not found" }, "500": { "description": "Internal server error" } }, "summary": "Update a permitted model for a specific organization", "tags": ["Super Admin Models"] } }, "/super-admin/models/catalog": { "get": { "description": "Retrieve all models (language, embedding, and image-generation) from the master catalog. This endpoint is only accessible to super admins.", "operationId": "SuperAdminCatalogModelsController_getAllCatalogModels", "parameters": [], "responses": { "200": { "description": "Successfully retrieved all models", "content": { "application/json": { "schema": { "type": "array", "items": { "oneOf": [ { "$ref": "#/components/schemas/LanguageModelResponseDto" }, { "$ref": "#/components/schemas/EmbeddingModelResponseDto" }, { "$ref": "#/components/schemas/ImageGenerationModelResponseDto" } ] } } } } }, "401": { "description": "User not authenticated or not authorized as super admin" }, "500": { "description": "Internal server error" } }, "summary": "Get all models in the catalog", "tags": ["Super Admin Models"] } }, "/super-admin/models/catalog/{id}": { "get": { "description": "Retrieve a specific model from the master catalog by its ID. This endpoint is only accessible to super admins.", "operationId": "SuperAdminCatalogModelsController_getCatalogModelById", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Model ID to retrieve", "schema": { "format": "uuid", "example": "123e4567-e89b-12d3-a456-426614174000", "type": "string" } } ], "responses": { "200": { "description": "Successfully retrieved model", "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/LanguageModelResponseDto" }, { "$ref": "#/components/schemas/EmbeddingModelResponseDto" }, { "$ref": "#/components/schemas/ImageGenerationModelResponseDto" } ] } } } }, "401": { "description": "User not authenticated or not authorized as super admin" }, "404": { "description": "Model not found" }, "500": { "description": "Internal server error" } }, "summary": "Get a model by ID from the catalog", "tags": ["Super Admin Models"] }, "delete": { "description": "Remove a model (language, embedding, or image-generation) from the master catalog. This endpoint is only accessible to super admins.", "operationId": "SuperAdminCatalogModelsController_deleteCatalogModel", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Model ID to delete", "schema": { "format": "uuid", "example": "123e4567-e89b-12d3-a456-426614174000", "type": "string" } } ], "responses": { "204": { "description": "Successfully deleted model" }, "401": { "description": "User not authenticated or not authorized as super admin" }, "404": { "description": "Model not found" }, "500": { "description": "Internal server error" } }, "summary": "Delete a model from the catalog", "tags": ["Super Admin Models"] } }, "/super-admin/models/catalog/language": { "post": { "description": "Create a new language model in the master catalog. This endpoint is only accessible to super admins.", "operationId": "SuperAdminLanguageCatalogModelsController_createLanguageModel", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateLanguageModelRequestDto" } } } }, "responses": { "201": { "description": "Successfully created language model", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LanguageModelResponseDto" } } } }, "400": { "description": "Invalid model data provided" }, "401": { "description": "User not authenticated or not authorized as super admin" }, "409": { "description": "Model already exists" }, "500": { "description": "Internal server error" } }, "summary": "Create a new language model in the catalog", "tags": ["Super Admin Models"] } }, "/super-admin/models/catalog/language/{id}": { "patch": { "description": "Update an existing language model in the master catalog. This endpoint is only accessible to super admins.", "operationId": "SuperAdminLanguageCatalogModelsController_updateLanguageModel", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Model ID to update", "schema": { "format": "uuid", "example": "123e4567-e89b-12d3-a456-426614174000", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateLanguageModelRequestDto" } } } }, "responses": { "200": { "description": "Successfully updated language model", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LanguageModelResponseDto" } } } }, "400": { "description": "Invalid model data provided" }, "401": { "description": "User not authenticated or not authorized as super admin" }, "404": { "description": "Model not found" }, "500": { "description": "Internal server error" } }, "summary": "Update a language model in the catalog", "tags": ["Super Admin Models"] } }, "/super-admin/models/catalog/embedding": { "post": { "description": "Create a new embedding model in the master catalog. This endpoint is only accessible to super admins.", "operationId": "SuperAdminEmbeddingCatalogModelsController_createEmbeddingModel", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateEmbeddingModelRequestDto" } } } }, "responses": { "201": { "description": "Successfully created embedding model", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EmbeddingModelResponseDto" } } } }, "400": { "description": "Invalid model data provided" }, "401": { "description": "User not authenticated or not authorized as super admin" }, "409": { "description": "Model already exists" }, "500": { "description": "Internal server error" } }, "summary": "Create a new embedding model in the catalog", "tags": ["Super Admin Models"] } }, "/super-admin/models/catalog/embedding/{id}": { "patch": { "description": "Update an existing embedding model in the master catalog. This endpoint is only accessible to super admins.", "operationId": "SuperAdminEmbeddingCatalogModelsController_updateEmbeddingModel", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Model ID to update", "schema": { "format": "uuid", "example": "123e4567-e89b-12d3-a456-426614174000", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateEmbeddingModelRequestDto" } } } }, "responses": { "200": { "description": "Successfully updated embedding model", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EmbeddingModelResponseDto" } } } }, "400": { "description": "Invalid model data provided" }, "401": { "description": "User not authenticated or not authorized as super admin" }, "404": { "description": "Model not found" }, "500": { "description": "Internal server error" } }, "summary": "Update an embedding model in the catalog", "tags": ["Super Admin Models"] } }, "/super-admin/models/catalog/image-generation": { "post": { "description": "Create a new image-generation model in the master catalog. This endpoint is only accessible to super admins.", "operationId": "SuperAdminImageGenerationCatalogModelsController_createImageGenerationModel", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateImageGenerationModelRequestDto" } } } }, "responses": { "201": { "description": "Successfully created image-generation model", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImageGenerationModelResponseDto" } } } }, "400": { "description": "Invalid model data provided" }, "401": { "description": "User not authenticated or not authorized as super admin" }, "409": { "description": "Model already exists" }, "500": { "description": "Internal server error" } }, "summary": "Create a new image-generation model in the catalog", "tags": ["Super Admin Models"] } }, "/super-admin/models/catalog/image-generation/{id}": { "patch": { "description": "Update an existing image-generation model in the master catalog. This endpoint is only accessible to super admins.", "operationId": "SuperAdminImageGenerationCatalogModelsController_updateImageGenerationModel", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Model ID to update", "schema": { "format": "uuid", "example": "123e4567-e89b-12d3-a456-426614174000", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateImageGenerationModelRequestDto" } } } }, "responses": { "200": { "description": "Successfully updated image-generation model", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ImageGenerationModelResponseDto" } } } }, "400": { "description": "Invalid model data provided" }, "401": { "description": "User not authenticated or not authorized as super admin" }, "404": { "description": "Model not found" }, "500": { "description": "Internal server error" } }, "summary": "Update an image-generation model in the catalog", "tags": ["Super Admin Models"] } }, "/teams": { "get": { "operationId": "TeamsController_listTeams", "parameters": [], "responses": { "200": { "description": "Successfully retrieved teams", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TeamResponseDto" } } } } }, "401": { "description": "User is not authenticated" }, "403": { "description": "User is not authorized to view teams" }, "500": { "description": "Internal server error" } }, "summary": "List all teams for the current organization", "tags": ["teams"] }, "post": { "operationId": "TeamsController_createTeam", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateTeamDto" } } } }, "responses": { "201": { "description": "Successfully created team", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamResponseDto" } } } }, "400": { "description": "Invalid team data provided" }, "401": { "description": "User is not authenticated" }, "403": { "description": "User is not authorized to create teams" }, "409": { "description": "Team with this name already exists in the organization" }, "500": { "description": "Internal server error" } }, "summary": "Create a new team for the current organization", "tags": ["teams"] } }, "/teams/me": { "get": { "operationId": "TeamsController_listMyTeams", "parameters": [], "responses": { "200": { "description": "Successfully retrieved user teams", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TeamResponseDto" } } } } }, "401": { "description": "User is not authenticated" }, "500": { "description": "Internal server error" } }, "summary": "List teams the current user is a member of", "tags": ["teams"] } }, "/teams/{id}": { "get": { "operationId": "TeamsController_getTeam", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successfully retrieved team", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamResponseDto" } } } }, "401": { "description": "User is not authenticated" }, "403": { "description": "User is not authorized to view teams" }, "404": { "description": "Team not found" }, "500": { "description": "Internal server error" } }, "summary": "Get a team by ID", "tags": ["teams"] }, "patch": { "operationId": "TeamsController_updateTeam", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateTeamDto" } } } }, "responses": { "200": { "description": "Successfully updated team", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamResponseDto" } } } }, "400": { "description": "Invalid team data provided" }, "401": { "description": "User is not authenticated" }, "403": { "description": "User is not authorized to update teams" }, "404": { "description": "Team not found" }, "409": { "description": "Team with this name already exists in the organization" } }, "summary": "Update a team in the current organization", "tags": ["teams"] }, "delete": { "operationId": "TeamsController_deleteTeam", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "204": { "description": "Team successfully deleted" }, "401": { "description": "User is not authenticated" }, "403": { "description": "User is not authorized to delete teams" }, "404": { "description": "Team not found" }, "500": { "description": "Internal server error" } }, "summary": "Delete a team from the current organization", "tags": ["teams"] } }, "/teams/{id}/members": { "get": { "operationId": "TeamsController_listTeamMembers", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "limit", "required": false, "in": "query", "description": "Maximum number of items per page", "schema": { "default": 50, "example": 50, "type": "number" } }, { "name": "offset", "required": false, "in": "query", "description": "Number of items to skip", "schema": { "default": 0, "example": 0, "type": "number" } } ], "responses": { "200": { "description": "Successfully retrieved team members", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedTeamMembersResponseDto" } } } }, "401": { "description": "User is not authenticated" }, "403": { "description": "User is not authorized to view team members" }, "404": { "description": "Team not found" } }, "summary": "List members of a team", "tags": ["teams"] }, "post": { "operationId": "TeamsController_addTeamMember", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddTeamMemberDto" } } } }, "responses": { "201": { "description": "Successfully added user to team", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamMemberResponseDto" } } } }, "400": { "description": "Invalid data provided or user not in same organization" }, "401": { "description": "User is not authenticated" }, "403": { "description": "User is not authorized to add team members" }, "404": { "description": "Team or user not found" }, "409": { "description": "User is already a member of the team" } }, "summary": "Add a user to a team", "tags": ["teams"] } }, "/teams/{id}/members/bulk": { "post": { "description": "Adds every listed user. Users already in the team, not found, or not in the org are skipped; the response holds only the members added.", "operationId": "TeamsController_bulkAddTeamMembers", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BulkAddTeamMembersDto" } } } }, "responses": { "201": { "description": "Users successfully added to team", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TeamMemberResponseDto" } } } } } }, "summary": "Add multiple users to a team at once", "tags": ["teams"] } }, "/teams/{id}/members/{userId}": { "delete": { "operationId": "TeamsController_removeTeamMember", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "userId", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "204": { "description": "User successfully removed from team" }, "401": { "description": "User is not authenticated" }, "403": { "description": "User is not authorized to remove team members" }, "404": { "description": "Team not found or user is not a member of the team" }, "500": { "description": "Internal server error" } }, "summary": "Remove a user from a team", "tags": ["teams"] } }, "/transcriptions": { "post": { "description": "Upload an audio file and receive the transcribed text. Supports webm, mp4, mp3, wav, and m4a formats.", "operationId": "TranscriptionsController_transcribe", "parameters": [], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "type": "object", "required": ["file"], "properties": { "file": { "type": "string", "format": "binary", "description": "The audio file to transcribe" }, "language": { "type": "string", "description": "Optional language hint (e.g., \"en\", \"de\")", "example": "en" } } } } } }, "responses": { "200": { "description": "Audio successfully transcribed", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TranscriptionResponseDto" } } } }, "400": { "description": "Invalid request or unsupported audio format" }, "401": { "description": "Unauthorized" }, "500": { "description": "Transcription failed" } }, "security": [ { "bearer": [] } ], "summary": "Transcribe audio file to text", "tags": ["transcriptions"] } }, "/super-admin/crawl-domains/{orgId}": { "get": { "operationId": "SuperAdminCrawlDomainsController_list", "parameters": [ { "name": "orgId", "required": true, "in": "path", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/CrawlDomainGrantResponseDto" } } } } }, "401": { "description": "Not authorized as super admin" } }, "summary": "List the crawl domains assigned to an organization", "tags": ["Super Admin Crawl Domains"] }, "post": { "operationId": "SuperAdminCrawlDomainsController_grant", "parameters": [ { "name": "orgId", "required": true, "in": "path", "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GrantCrawlDomainRequestDto" } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CrawlDomainGrantResponseDto" } } } }, "400": { "description": "Invalid domain" }, "401": { "description": "Not authorized as super admin" }, "409": { "description": "Domain already assigned to another organization" } }, "summary": "Assign a crawl domain to an organization", "tags": ["Super Admin Crawl Domains"] } }, "/super-admin/crawl-domains/{orgId}/{grantId}": { "delete": { "operationId": "SuperAdminCrawlDomainsController_revoke", "parameters": [ { "name": "orgId", "required": true, "in": "path", "schema": { "format": "uuid", "type": "string" } }, { "name": "grantId", "required": true, "in": "path", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "204": { "description": "Crawl domain revoked" }, "401": { "description": "Not authorized as super admin" }, "404": { "description": "Crawl domain grant not found" } }, "summary": "Revoke a crawl domain from an organization", "tags": ["Super Admin Crawl Domains"] } }, "/threads": { "post": { "operationId": "ThreadsController_create", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateThreadDto" } } } }, "responses": { "201": { "description": "The thread has been successfully created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetThreadResponseDto" } } } }, "400": { "description": "Invalid model data" }, "500": { "description": "Internal server error" } }, "summary": "Create a new thread", "tags": ["threads"] }, "get": { "operationId": "ThreadsController_findAll", "parameters": [ { "name": "search", "required": false, "in": "query", "description": "Search threads by title", "schema": { "type": "string" } }, { "name": "workspaceId", "required": false, "in": "query", "description": "Only threads filed under this workspace. Omit for all threads.", "schema": { "format": "uuid", "type": "string" } }, { "name": "limit", "required": false, "in": "query", "description": "Maximum number of threads to return (default: 50)", "schema": { "type": "number" } }, { "name": "offset", "required": false, "in": "query", "description": "Number of threads to skip (default: 0)", "schema": { "default": 0, "type": "number" } } ], "responses": { "200": { "description": "Returns paginated threads for the current user", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetThreadsResponseDto" } } } }, "500": { "description": "Internal server error" } }, "summary": "Get all threads for the current user", "tags": ["threads"] } }, "/threads/{id}": { "get": { "operationId": "ThreadsController_findOne", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The UUID of the thread to retrieve", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Returns the thread with the specified ID", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GetThreadResponseDto" } } } }, "404": { "description": "Thread not found" }, "500": { "description": "Internal server error" } }, "summary": "Get a thread by ID", "tags": ["threads"] }, "delete": { "operationId": "ThreadsController_delete", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The UUID of the thread to delete", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "204": { "description": "The thread has been successfully deleted" }, "404": { "description": "Thread not found" }, "500": { "description": "Internal server error" } }, "summary": "Delete a thread", "tags": ["threads"] } }, "/threads/{id}/title": { "patch": { "operationId": "ThreadsController_updateTitle", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The UUID of the thread to update", "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateThreadTitleDto" } } } }, "responses": { "204": { "description": "The thread title has been successfully updated" }, "400": { "description": "Invalid title data" }, "404": { "description": "Thread not found" }, "500": { "description": "Internal server error" } }, "summary": "Update a thread title", "tags": ["threads"] } }, "/threads/{id}/workspace": { "patch": { "operationId": "ThreadsController_assignWorkspace", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The UUID of the thread to move", "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AssignThreadWorkspaceDto" } } } }, "responses": { "204": { "description": "The thread has been moved" }, "404": { "description": "Thread or workspace not found" } }, "summary": "Move a thread into a workspace or out of one", "tags": ["threads"] } }, "/threads/{id}/sources": { "get": { "operationId": "ThreadSourcesController_getThreadSources", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The UUID of the thread", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Returns all sources for the thread", "content": { "application/json": { "schema": { "type": "array", "items": { "oneOf": [ { "$ref": "#/components/schemas/FileSourceResponseDto" }, { "$ref": "#/components/schemas/UrlSourceResponseDto" }, { "$ref": "#/components/schemas/CSVDataSourceResponseDto" } ] } } } } }, "404": { "description": "Thread not found" }, "500": { "description": "Internal server error" } }, "summary": "Get all sources for a thread", "tags": ["threads"] } }, "/threads/{id}/sources/file": { "post": { "operationId": "ThreadSourcesController_addFileSource", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The UUID of the thread", "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "file": { "type": "string", "format": "binary", "description": "The file to upload (max 25 MB)" } }, "required": ["file"] } } } }, "responses": { "201": { "description": "The file source has been successfully added to the thread", "content": { "application/json": { "schema": { "type": "array", "items": { "oneOf": [ { "$ref": "#/components/schemas/FileSourceResponseDto" }, { "$ref": "#/components/schemas/UrlSourceResponseDto" }, { "$ref": "#/components/schemas/CSVDataSourceResponseDto" } ] } } } } }, "413": { "description": "File exceeds the 25 MB upload limit" } }, "summary": "Add a file source to a thread", "tags": ["threads"] } }, "/threads/{id}/sources/{sourceId}": { "delete": { "operationId": "ThreadSourcesController_removeSource", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The UUID of the thread", "schema": { "format": "uuid", "type": "string" } }, { "name": "sourceId", "required": true, "in": "path", "description": "The UUID of the source to remove", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "204": { "description": "The source has been successfully removed from the thread" }, "404": { "description": "Thread or source not found" } }, "summary": "Remove a source from a thread", "tags": ["threads"] } }, "/threads/{id}/sources/{sourceId}/download": { "get": { "operationId": "ThreadSourcesController_downloadSource", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The UUID of the thread", "schema": { "format": "uuid", "type": "string" } }, { "name": "sourceId", "required": true, "in": "path", "description": "The UUID of the source to download", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Returns the source as a CSV file", "content": { "text/csv": { "schema": { "type": "string", "format": "binary" } } } }, "400": { "description": "Source is not a CSV data source" }, "404": { "description": "Thread or source not found" }, "409": { "description": "Source is still processing and has no data yet" } }, "summary": "Download a data source as CSV", "tags": ["threads"] } }, "/threads/{id}/knowledge-bases/{knowledgeBaseId}": { "post": { "operationId": "ThreadKnowledgeBasesController_addKnowledgeBase", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The UUID of the thread", "schema": { "format": "uuid", "type": "string" } }, { "name": "knowledgeBaseId", "required": true, "in": "path", "description": "The UUID of the knowledge base to add", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "204": { "description": "The knowledge base has been successfully added to the thread" }, "404": { "description": "Thread or knowledge base not found" } }, "summary": "Add a knowledge base to a thread", "tags": ["threads"] }, "delete": { "operationId": "ThreadKnowledgeBasesController_removeKnowledgeBase", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The UUID of the thread", "schema": { "format": "uuid", "type": "string" } }, { "name": "knowledgeBaseId", "required": true, "in": "path", "description": "The UUID of the knowledge base to remove", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "204": { "description": "The knowledge base has been successfully removed from the thread" }, "404": { "description": "Thread not found" } }, "summary": "Remove a knowledge base from a thread", "tags": ["threads"] } }, "/threads/{id}/mcp-integrations/{mcpIntegrationId}": { "post": { "operationId": "ThreadMcpIntegrationsController_addMcpIntegration", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The UUID of the thread", "schema": { "format": "uuid", "type": "string" } }, { "name": "mcpIntegrationId", "required": true, "in": "path", "description": "The UUID of the MCP integration to add", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "204": { "description": "The MCP integration has been successfully added to the thread" }, "404": { "description": "Thread or MCP integration not found" } }, "summary": "Add an MCP integration to a thread", "tags": ["threads"] }, "delete": { "operationId": "ThreadMcpIntegrationsController_removeMcpIntegration", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The UUID of the thread", "schema": { "format": "uuid", "type": "string" } }, { "name": "mcpIntegrationId", "required": true, "in": "path", "description": "The UUID of the MCP integration to remove", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "204": { "description": "The MCP integration has been successfully removed from the thread" }, "404": { "description": "Thread not found" } }, "summary": "Remove an MCP integration from a thread", "tags": ["threads"] } }, "/threads/{threadId}/generated-images/{imageId}": { "get": { "operationId": "GeneratedImagesController_resolve", "parameters": [ { "name": "threadId", "required": true, "in": "path", "schema": { "format": "uuid", "type": "string" } }, { "name": "imageId", "required": true, "in": "path", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Presigned URL for the generated image", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GeneratedImageUrlResponseDto" } } } }, "404": { "description": "Thread or image not found" } }, "summary": "Get presigned URL for a generated image", "tags": ["threads"] } }, "/threads/{threadId}/messages/{messageId}/images/{index}": { "get": { "operationId": "MessageImagesController_download", "parameters": [ { "name": "threadId", "required": true, "in": "path", "schema": { "format": "uuid", "type": "string" } }, { "name": "messageId", "required": true, "in": "path", "schema": { "format": "uuid", "type": "string" } }, { "name": "index", "required": true, "in": "path", "schema": { "type": "number" } } ], "responses": { "200": { "description": "Image streamed successfully" }, "404": { "description": "Thread, message, or image not found" } }, "summary": "Download an image attached to a message", "tags": ["threads"] } }, "/knowledge-bases": { "post": { "operationId": "KnowledgeBasesController_create", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateKnowledgeBaseDto" } } } }, "responses": { "201": { "description": "The knowledge base has been successfully created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KnowledgeBaseResponseDto" } } } }, "400": { "description": "Invalid input data" } }, "summary": "Create a new knowledge base", "tags": ["knowledge-bases"] }, "get": { "operationId": "KnowledgeBasesController_findAll", "parameters": [], "responses": { "200": { "description": "Returns all knowledge bases for the current user", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KnowledgeBaseListResponseDto" } } } } }, "summary": "List all knowledge bases for the current user", "tags": ["knowledge-bases"] } }, "/knowledge-bases/{id}": { "get": { "operationId": "KnowledgeBasesController_findOne", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The UUID of the knowledge base", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Returns the knowledge base", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KnowledgeBaseResponseDto" } } } }, "404": { "description": "Knowledge base not found" } }, "summary": "Get a knowledge base by ID", "tags": ["knowledge-bases"] }, "patch": { "operationId": "KnowledgeBasesController_update", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The UUID of the knowledge base to update", "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateKnowledgeBaseDto" } } } }, "responses": { "200": { "description": "The knowledge base has been successfully updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KnowledgeBaseResponseDto" } } } }, "400": { "description": "Invalid input data" }, "404": { "description": "Knowledge base not found" } }, "summary": "Update a knowledge base", "tags": ["knowledge-bases"] }, "delete": { "operationId": "KnowledgeBasesController_delete", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The UUID of the knowledge base to delete", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "204": { "description": "The knowledge base has been successfully deleted" }, "404": { "description": "Knowledge base not found" } }, "summary": "Delete a knowledge base", "tags": ["knowledge-bases"] } }, "/knowledge-bases/{id}/documents": { "get": { "operationId": "KnowledgeBasesController_listDocuments", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The UUID of the knowledge base", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Returns the documents in the knowledge base", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KnowledgeBaseDocumentListResponseDto" } } } }, "404": { "description": "Knowledge base not found" } }, "summary": "List all documents in a knowledge base", "tags": ["knowledge-bases"] }, "post": { "operationId": "KnowledgeBasesController_addDocument", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The UUID of the knowledge base", "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "file": { "type": "string", "format": "binary", "description": "The file to upload (PDF, DOCX, PPTX, TXT, max 25 MB)" } }, "required": ["file"] } } } }, "responses": { "202": { "description": "The document has been accepted and is being processed in the background", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KnowledgeBaseDocumentResponseDto" } } } }, "404": { "description": "Knowledge base not found" }, "413": { "description": "File exceeds the 25 MB upload limit" } }, "summary": "Add a document to a knowledge base", "tags": ["knowledge-bases"] } }, "/knowledge-bases/{id}/urls": { "post": { "operationId": "KnowledgeBasesController_addUrl", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The UUID of the knowledge base", "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddUrlToKnowledgeBaseDto" } } } }, "responses": { "202": { "description": "The URL source has been accepted and is being processed in the background", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/KnowledgeBaseDocumentResponseDto" } } } }, "404": { "description": "Knowledge base not found" } }, "summary": "Add a URL source to a knowledge base", "tags": ["knowledge-bases"] } }, "/knowledge-bases/{id}/documents/{documentId}": { "delete": { "operationId": "KnowledgeBasesController_removeDocument", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The UUID of the knowledge base", "schema": { "format": "uuid", "type": "string" } }, { "name": "documentId", "required": true, "in": "path", "description": "The UUID of the document to remove", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "204": { "description": "The document has been removed from the knowledge base" }, "404": { "description": "Knowledge base or document not found" } }, "summary": "Remove a document from a knowledge base", "tags": ["knowledge-bases"] } }, "/shares/skills": { "post": { "operationId": "SharesController_createSkillShare", "parameters": [], "requestBody": { "required": true, "description": "Skill share creation data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateSkillShareDto" } } } }, "responses": { "201": { "description": "Share created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ShareResponseDto" } } } }, "400": { "description": "Invalid request data" }, "401": { "description": "User not authenticated" }, "403": { "description": "User cannot create share for this skill" } }, "summary": "Create a share for a skill", "tags": ["shares"] } }, "/shares/knowledge-bases": { "post": { "operationId": "SharesController_createKnowledgeBaseShare", "parameters": [], "requestBody": { "required": true, "description": "Knowledge base share creation data", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateKnowledgeBaseShareDto" } } } }, "responses": { "201": { "description": "Share created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ShareResponseDto" } } } }, "400": { "description": "Invalid request data" }, "401": { "description": "User not authenticated" }, "403": { "description": "User cannot create share for this knowledge base" } }, "summary": "Create a share for a knowledge base", "tags": ["shares"] } }, "/shares": { "get": { "operationId": "SharesController_getShares", "parameters": [ { "name": "entityId", "required": true, "in": "query", "description": "ID of the entity to get shares for", "schema": { "format": "uuid", "type": "string" } }, { "name": "entityType", "required": true, "in": "query", "description": "Type of the entity", "schema": { "enum": ["prompt", "skill", "knowledge_base"], "type": "string" } } ], "responses": { "200": { "description": "Returns shares for the specified entity", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ShareResponseDto" } } } } }, "401": { "description": "User not authenticated" }, "403": { "description": "User cannot view shares for this entity" }, "500": { "description": "Internal server error" } }, "summary": "Get shares for an entity", "tags": ["shares"] } }, "/shares/{id}": { "delete": { "operationId": "SharesController_deleteShare", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The UUID of the share to delete", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "204": { "description": "The share has been successfully deleted" }, "401": { "description": "Unauthorized" }, "404": { "description": "Share not found" }, "500": { "description": "Internal server error" } }, "summary": "Delete a share", "tags": ["shares"] } }, "/skills/install-from-marketplace": { "post": { "operationId": "SkillsController_installFromMarketplace", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InstallSkillFromMarketplaceDto" } } } }, "responses": { "201": { "description": "The skill has been successfully installed from the marketplace", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SkillResponseDto" } } } }, "404": { "description": "Marketplace skill not found" } }, "summary": "Install a skill from the marketplace", "tags": ["skills"] } }, "/skills": { "post": { "operationId": "SkillsController_create", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateSkillDto" } } } }, "responses": { "201": { "description": "The skill has been successfully created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SkillResponseDto" } } } }, "400": { "description": "Invalid skill data" }, "409": { "description": "A skill with this name already exists" } }, "summary": "Create a new skill", "tags": ["skills"] }, "get": { "operationId": "SkillsController_findAll", "parameters": [], "responses": { "200": { "description": "Returns all skills for the current user", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/SkillResponseDto" } } } } } }, "summary": "Get all skills for the current user", "tags": ["skills"] } }, "/skills/{id}": { "get": { "operationId": "SkillsController_findOne", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The UUID of the skill to retrieve", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Returns the skill with the specified ID", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SkillResponseDto" } } } }, "404": { "description": "Skill not found" } }, "summary": "Get a skill by ID", "tags": ["skills"] }, "put": { "operationId": "SkillsController_update", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The UUID of the skill to update", "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateSkillDto" } } } }, "responses": { "200": { "description": "The skill has been successfully updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SkillResponseDto" } } } }, "400": { "description": "Invalid skill data" }, "404": { "description": "Skill not found" }, "409": { "description": "A skill with this name already exists" } }, "summary": "Update a skill", "tags": ["skills"] }, "delete": { "operationId": "SkillsController_delete", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The UUID of the skill to delete", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "204": { "description": "The skill has been successfully deleted" }, "404": { "description": "Skill not found" } }, "summary": "Delete a skill", "tags": ["skills"] } }, "/skills/{id}/toggle-active": { "patch": { "operationId": "SkillsController_toggleActive", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The UUID of the skill to toggle", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "The skill active status has been toggled", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SkillResponseDto" } } } }, "404": { "description": "Skill not found" } }, "summary": "Toggle skill active/inactive status", "tags": ["skills"] } }, "/skills/{id}/toggle-pinned": { "patch": { "operationId": "SkillsController_togglePinned", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The UUID of the skill to toggle pinned status", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "The skill pinned status has been toggled", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SkillResponseDto" } } } }, "400": { "description": "Skill is not active" }, "404": { "description": "Skill not found" } }, "summary": "Toggle skill pinned/unpinned status", "tags": ["skills"] } }, "/skills/{id}/sources": { "get": { "operationId": "SkillSourcesController_getSkillSources", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The UUID of the skill", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Returns all sources for the skill", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/SkillSourceResponseDto" } } } } }, "404": { "description": "Skill not found" } }, "summary": "Get all sources for a skill", "tags": ["skills"] } }, "/skills/{id}/sources/file": { "post": { "operationId": "SkillSourcesController_addFileSource", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The UUID of the skill", "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "file": { "type": "string", "format": "binary", "description": "The file to upload (max 25 MB)" } }, "required": ["file"] } } } }, "responses": { "201": { "description": "The file source has been successfully added to the skill", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SkillResponseDto" } } } }, "400": { "description": "Invalid or unsupported file type" }, "404": { "description": "Skill not found" }, "413": { "description": "File exceeds the 25 MB upload limit" } }, "summary": "Add a file source to a skill", "tags": ["skills"] } }, "/skills/{id}/sources/{sourceId}": { "delete": { "operationId": "SkillSourcesController_removeSource", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The UUID of the skill", "schema": { "format": "uuid", "type": "string" } }, { "name": "sourceId", "required": true, "in": "path", "description": "The UUID of the source to remove", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "204": { "description": "The source has been successfully removed from the skill" }, "404": { "description": "Skill or source not found" } }, "summary": "Remove a source from a skill", "tags": ["skills"] } }, "/skills/{skillId}/mcp-integrations/{integrationId}": { "post": { "operationId": "SkillMcpIntegrationsController_assignMcpIntegration", "parameters": [ { "name": "skillId", "required": true, "in": "path", "description": "The UUID of the skill", "schema": { "format": "uuid", "type": "string" } }, { "name": "integrationId", "required": true, "in": "path", "description": "The UUID of the MCP integration to assign", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "201": { "description": "The MCP integration has been successfully assigned", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SkillResponseDto" } } } }, "404": { "description": "Skill or integration not found" }, "409": { "description": "Integration already assigned" } }, "summary": "Assign MCP integration to skill", "tags": ["skills"] }, "delete": { "operationId": "SkillMcpIntegrationsController_unassignMcpIntegration", "parameters": [ { "name": "skillId", "required": true, "in": "path", "description": "The UUID of the skill", "schema": { "format": "uuid", "type": "string" } }, { "name": "integrationId", "required": true, "in": "path", "description": "The UUID of the MCP integration to unassign", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "The MCP integration has been successfully unassigned", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SkillResponseDto" } } } }, "404": { "description": "Skill not found or integration not assigned" } }, "summary": "Unassign MCP integration from skill", "tags": ["skills"] } }, "/skills/{skillId}/mcp-integrations": { "get": { "operationId": "SkillMcpIntegrationsController_listSkillMcpIntegrations", "parameters": [ { "name": "skillId", "required": true, "in": "path", "description": "The UUID of the skill", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Returns all MCP integrations assigned to the skill", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/McpIntegrationResponseDto" } } } } }, "404": { "description": "Skill not found" } }, "summary": "List MCP integrations assigned to skill", "tags": ["skills"] } }, "/skills/{skillId}/knowledge-bases/{knowledgeBaseId}": { "post": { "operationId": "SkillKnowledgeBasesController_assignKnowledgeBase", "parameters": [ { "name": "skillId", "required": true, "in": "path", "description": "The UUID of the skill", "schema": { "format": "uuid", "type": "string" } }, { "name": "knowledgeBaseId", "required": true, "in": "path", "description": "The UUID of the knowledge base to assign", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "201": { "description": "The knowledge base has been successfully assigned", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SkillResponseDto" } } } }, "404": { "description": "Skill or knowledge base not found" }, "409": { "description": "Knowledge base already assigned" } }, "summary": "Assign knowledge base to skill", "tags": ["skills"] }, "delete": { "operationId": "SkillKnowledgeBasesController_unassignKnowledgeBase", "parameters": [ { "name": "skillId", "required": true, "in": "path", "description": "The UUID of the skill", "schema": { "format": "uuid", "type": "string" } }, { "name": "knowledgeBaseId", "required": true, "in": "path", "description": "The UUID of the knowledge base to unassign", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "The knowledge base has been successfully unassigned", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SkillResponseDto" } } } }, "404": { "description": "Skill not found or knowledge base not assigned" } }, "summary": "Unassign knowledge base from skill", "tags": ["skills"] } }, "/skills/{skillId}/knowledge-bases": { "get": { "operationId": "SkillKnowledgeBasesController_listSkillKnowledgeBases", "parameters": [ { "name": "skillId", "required": true, "in": "path", "description": "The UUID of the skill", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Returns all knowledge bases assigned to the skill", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/KnowledgeBaseResponseDto" } } } } }, "404": { "description": "Skill not found" } }, "summary": "List knowledge bases assigned to skill", "tags": ["skills"] } }, "/mcp-integrations/{id}/oauth/authorize": { "post": { "operationId": "McpIntegrationsController_authorizeOAuth", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/McpOAuthAuthorizationUrlDto" } } } } }, "tags": ["mcp-integrations"] } }, "/mcp-integrations/oauth/complete": { "post": { "operationId": "McpIntegrationsController_completeOAuth", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompleteMcpOAuthDto" } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/McpOAuthCompleteResponseDto" } } } } }, "tags": ["mcp-integrations"] } }, "/mcp-integrations/{id}/oauth/authorization": { "delete": { "operationId": "McpIntegrationsController_disconnectOAuth", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "204": { "description": "" } }, "tags": ["mcp-integrations"] } }, "/mcp-integrations/predefined": { "post": { "operationId": "McpIntegrationsController_createPredefined", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreatePredefinedIntegrationDto" } } } }, "responses": { "201": { "description": "Integration created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/McpIntegrationResponseDto" } } } }, "400": { "description": "Invalid slug or missing required fields" }, "404": { "description": "Predefined integration slug not found" } }, "summary": "Create a new predefined MCP integration", "tags": ["mcp-integrations"] } }, "/mcp-integrations/custom": { "post": { "operationId": "McpIntegrationsController_createCustom", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateCustomIntegrationDto" } } } }, "responses": { "201": { "description": "Integration created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/McpIntegrationResponseDto" } } } }, "400": { "description": "Invalid data" } }, "summary": "Create a new custom MCP integration", "tags": ["mcp-integrations"] } }, "/mcp-integrations": { "get": { "operationId": "McpIntegrationsController_list", "parameters": [], "responses": { "200": { "description": "List of integrations", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/McpIntegrationResponseDto" } } } } } }, "summary": "List all MCP integrations for organization", "tags": ["mcp-integrations"] } }, "/mcp-integrations/predefined/available": { "get": { "operationId": "McpIntegrationsController_listPredefinedConfigs", "parameters": [], "responses": { "200": { "description": "List of available predefined integrations", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PredefinedConfigResponseDto" } } } } } }, "summary": "List available predefined MCP integration configurations", "tags": ["mcp-integrations"] } }, "/mcp-integrations/available": { "get": { "operationId": "McpIntegrationsController_listAvailable", "parameters": [], "responses": { "200": { "description": "List of available enabled integrations", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/McpIntegrationResponseDto" } } } } } }, "summary": "List all available (enabled) MCP integrations for organization", "tags": ["mcp-integrations"] } }, "/mcp-integrations/{id}": { "get": { "operationId": "McpIntegrationsController_getById", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Integration found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/McpIntegrationResponseDto" } } } }, "404": { "description": "Integration not found" } }, "summary": "Get MCP integration by ID", "tags": ["mcp-integrations"] }, "patch": { "operationId": "McpIntegrationsController_update", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateMcpIntegrationDto" } } } }, "responses": { "200": { "description": "Integration updated successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/McpIntegrationResponseDto" } } } }, "400": { "description": "Invalid data" }, "404": { "description": "Integration not found" } }, "summary": "Update MCP integration", "tags": ["mcp-integrations"] }, "delete": { "operationId": "McpIntegrationsController_delete", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "204": { "description": "Integration deleted successfully" }, "404": { "description": "Integration not found" } }, "summary": "Delete MCP integration", "tags": ["mcp-integrations"] } }, "/mcp-integrations/{id}/enable": { "post": { "operationId": "McpIntegrationsController_enable", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Integration enabled successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/McpIntegrationResponseDto" } } } }, "404": { "description": "Integration not found" } }, "summary": "Enable MCP integration", "tags": ["mcp-integrations"] } }, "/mcp-integrations/{id}/disable": { "post": { "operationId": "McpIntegrationsController_disable", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Integration disabled successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/McpIntegrationResponseDto" } } } }, "404": { "description": "Integration not found" } }, "summary": "Disable MCP integration", "tags": ["mcp-integrations"] } }, "/mcp-integrations/install-from-marketplace": { "post": { "operationId": "McpIntegrationsController_installFromMarketplace", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InstallMarketplaceIntegrationDto" } } } }, "responses": { "201": { "description": "Integration installed successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/McpIntegrationResponseDto" } } } }, "400": { "description": "Missing or invalid integration configuration" }, "404": { "description": "Marketplace integration not found" } }, "summary": "Install an MCP integration from the marketplace", "tags": ["mcp-integrations"] } }, "/mcp-integrations/{id}/user-config": { "get": { "operationId": "McpIntegrationsController_getUserConfig", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "User configuration (secret values masked)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserConfigResponseDto" } } } } }, "summary": "Get current user config for an MCP integration", "tags": ["mcp-integrations"] }, "patch": { "operationId": "McpIntegrationsController_setUserConfig", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetUserConfigDto" } } } }, "responses": { "200": { "description": "User configuration saved", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserConfigResponseDto" } } } }, "400": { "description": "Integration has no user fields" }, "404": { "description": "Integration not found" } }, "summary": "Set current user config for an MCP integration", "tags": ["mcp-integrations"] } }, "/mcp-integrations/{id}/validate": { "post": { "operationId": "McpIntegrationsController_validate", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Validation result", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ValidationResponseDto" } } } }, "404": { "description": "Integration not found" } }, "summary": "Validate MCP integration connection", "tags": ["mcp-integrations"] } }, "/mcp-integrations/oauth/client-metadata.json": { "get": { "operationId": "McpOAuthMetadataController_getClientMetadata", "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/McpOAuthClientMetadataDto" } } } } }, "summary": "Get MCP OAuth client metadata", "tags": ["mcp-integrations"] } }, "/marketplace/config": { "get": { "operationId": "MarketplaceController_getConfig", "parameters": [], "responses": { "200": { "description": "Returns whether the marketplace is enabled and its URL", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MarketplaceConfigResponseDto" } } } } }, "summary": "Get marketplace availability and URL", "tags": ["marketplace"] } }, "/marketplace/skills/{identifier}": { "get": { "operationId": "MarketplaceController_getSkill", "parameters": [ { "name": "identifier", "required": true, "in": "path", "description": "The unique identifier slug of the marketplace skill", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Returns the marketplace skill details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MarketplaceSkillResponseDto" } } } }, "404": { "description": "Marketplace skill not found" } }, "summary": "Preview a marketplace skill before installation", "tags": ["marketplace"] } }, "/marketplace/integrations/{identifier}": { "get": { "operationId": "MarketplaceController_getIntegration", "parameters": [ { "name": "identifier", "required": true, "in": "path", "description": "The unique identifier slug of the marketplace integration", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Returns the marketplace integration details", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MarketplaceIntegrationResponseDto" } } } }, "404": { "description": "Marketplace integration not found" } }, "summary": "Preview a marketplace integration before installation", "tags": ["marketplace"] } }, "/workspaces": { "post": { "operationId": "WorkspacesController_create", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateWorkspaceDto" } } } }, "responses": { "201": { "description": "The created workspace", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkspaceResponseDto" } } } } }, "summary": "Create a workspace", "tags": ["workspaces"] }, "get": { "operationId": "WorkspacesController_findAll", "parameters": [ { "name": "offset", "required": false, "in": "query", "schema": { "default": 0, "type": "number" } }, { "name": "limit", "required": false, "in": "query", "schema": { "default": 20, "type": "number" } }, { "name": "sort", "required": false, "in": "query", "schema": { "enum": ["updatedAt", "createdAt", "name"], "type": "string" } }, { "name": "search", "required": false, "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "A page of workspaces ordered by the requested sort", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkspaceListResponseDto" } } } } }, "summary": "List the current user’s workspaces", "tags": ["workspaces"] } }, "/workspaces/{id}": { "get": { "operationId": "WorkspacesController_findOne", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The UUID of the workspace", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "The workspace", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkspaceResponseDto" } } } }, "404": { "description": "Workspace not found" } }, "summary": "Get a workspace", "tags": ["workspaces"] }, "patch": { "operationId": "WorkspacesController_update", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The UUID of the workspace", "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateWorkspaceDto" } } } }, "responses": { "200": { "description": "The updated workspace", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkspaceResponseDto" } } } }, "404": { "description": "Workspace not found" } }, "summary": "Update a workspace", "tags": ["workspaces"] }, "delete": { "operationId": "WorkspacesController_remove", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The UUID of the workspace", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "204": { "description": "The workspace was deleted" }, "404": { "description": "Workspace not found" } }, "summary": "Delete a workspace and every chat inside it", "tags": ["workspaces"] } }, "/workspaces/{id}/context": { "get": { "operationId": "WorkspaceContextController_findContext", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkspaceContextResponseDto" } } } } }, "summary": "Get workspace context", "tags": ["workspaces"] } }, "/workspaces/{id}/context/skill-candidates": { "get": { "operationId": "WorkspaceContextController_listSkillCandidates", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "offset", "required": false, "in": "query", "schema": { "default": 0, "type": "number" } }, { "name": "limit", "required": false, "in": "query", "schema": { "default": 20, "type": "number" } }, { "name": "search", "required": false, "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkspaceSkillCandidateListResponseDto" } } } } }, "tags": ["workspaces"] } }, "/workspaces/{id}/context/knowledge-base-candidates": { "get": { "operationId": "WorkspaceContextController_listKnowledgeBaseCandidates", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "offset", "required": false, "in": "query", "schema": { "default": 0, "type": "number" } }, { "name": "limit", "required": false, "in": "query", "schema": { "default": 20, "type": "number" } }, { "name": "search", "required": false, "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkspaceKnowledgeBaseCandidateListResponseDto" } } } } }, "tags": ["workspaces"] } }, "/workspaces/{id}/context/skills": { "get": { "operationId": "WorkspaceContextController_listSkills", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "offset", "required": false, "in": "query", "schema": { "default": 0, "type": "number" } }, { "name": "limit", "required": false, "in": "query", "schema": { "default": 20, "type": "number" } }, { "name": "search", "required": false, "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkspaceSkillListResponseDto" } } } } }, "tags": ["workspaces"] } }, "/workspaces/{id}/context/knowledge-bases": { "get": { "operationId": "WorkspaceContextController_listKnowledgeBases", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "offset", "required": false, "in": "query", "schema": { "default": 0, "type": "number" } }, { "name": "limit", "required": false, "in": "query", "schema": { "default": 20, "type": "number" } }, { "name": "search", "required": false, "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkspaceKnowledgeBaseListResponseDto" } } } } }, "tags": ["workspaces"] } }, "/workspaces/{id}/context/documents": { "get": { "operationId": "WorkspaceContextController_listDocuments", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "offset", "required": false, "in": "query", "schema": { "default": 0, "type": "number" } }, { "name": "limit", "required": false, "in": "query", "schema": { "default": 20, "type": "number" } }, { "name": "search", "required": false, "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkspaceDocumentListResponseDto" } } } } }, "tags": ["workspaces"] }, "post": { "operationId": "WorkspaceContextController_addDocument", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "type": "object", "properties": { "file": { "type": "string", "format": "binary" } }, "required": ["file"] } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkspaceDocumentResponseDto" } } } } }, "tags": ["workspaces"] } }, "/workspaces/{id}/context/skills/{skillId}": { "post": { "operationId": "WorkspaceContextController_attachSkill", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "skillId", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "204": { "description": "" } }, "tags": ["workspaces"] }, "delete": { "operationId": "WorkspaceContextController_detachSkill", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "skillId", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "204": { "description": "" } }, "tags": ["workspaces"] } }, "/workspaces/{id}/context/knowledge-bases/{knowledgeBaseId}": { "post": { "operationId": "WorkspaceContextController_attachKnowledgeBase", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "knowledgeBaseId", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "204": { "description": "" } }, "tags": ["workspaces"] }, "delete": { "operationId": "WorkspaceContextController_detachKnowledgeBase", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "knowledgeBaseId", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "204": { "description": "" } }, "tags": ["workspaces"] } }, "/workspaces/{id}/context/documents/{documentId}": { "delete": { "operationId": "WorkspaceContextController_removeDocument", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } }, { "name": "documentId", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "204": { "description": "" } }, "tags": ["workspaces"] } }, "/workspaces/{id}/context/instruction": { "patch": { "operationId": "WorkspaceContextController_updateInstruction", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateWorkspaceInstructionDto" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WorkspaceResponseDto" } } } } }, "tags": ["workspaces"] } }, "/favorites": { "get": { "operationId": "FavoritesController_findAll", "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "oneOf": [ { "$ref": "#/components/schemas/WorkspaceFavoriteResponseDto" }, { "$ref": "#/components/schemas/ThreadFavoriteResponseDto" } ], "discriminator": { "propertyName": "referenceType" } } } } } } }, "summary": "Get the current user favorites", "tags": ["favorites"] } }, "/favorites/toggle": { "patch": { "operationId": "FavoritesController_toggle", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ToggleFavoriteDto" } } } }, "responses": { "204": { "description": "The favorite was toggled" } }, "summary": "Favorite or unfavorite an authorized reference", "tags": ["favorites"] } }, "/favorites/reorder": { "patch": { "operationId": "FavoritesController_reorder", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReorderFavoritesDto" } } } }, "responses": { "204": { "description": "The favorites were reordered" } }, "summary": "Reorder the current user favorites", "tags": ["favorites"] } }, "/anonymization-settings/pii-whitelist": { "get": { "operationId": "AnonymizationSettingsController_get", "parameters": [], "responses": { "200": { "description": "Current PII whitelist (empty list if none)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PiiWhitelistResponseDto" } } } } }, "summary": "Get the PII whitelist for the current org", "tags": ["anonymization-settings"] }, "put": { "operationId": "AnonymizationSettingsController_update", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdatePiiWhitelistRequestDto" } } } }, "responses": { "200": { "description": "Updated PII whitelist", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PiiWhitelistResponseDto" } } } }, "400": { "description": "Invalid or unsafe regex pattern, or duplicate category" } }, "summary": "Replace the PII whitelist for the current org", "tags": ["anonymization-settings"] } }, "/super-admin/anonymization-whitelist": { "get": { "operationId": "SuperAdminAnonymizationWhitelistController_list", "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/GlobalPiiWhitelistWordDto" } } } } }, "401": { "description": "Not authorized as super admin" } }, "summary": "List all global anonymization whitelist words", "tags": ["Super Admin Anonymization Whitelist"] }, "post": { "operationId": "SuperAdminAnonymizationWhitelistController_add", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddGlobalPiiWhitelistWordRequestDto" } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GlobalPiiWhitelistWordDto" } } } }, "400": { "description": "Empty or invalid word" }, "401": { "description": "Not authorized as super admin" }, "409": { "description": "Word already on the whitelist for this category" } }, "summary": "Add a word to the global anonymization whitelist", "tags": ["Super Admin Anonymization Whitelist"] } }, "/super-admin/anonymization-whitelist/{wordId}": { "delete": { "operationId": "SuperAdminAnonymizationWhitelistController_remove", "parameters": [ { "name": "wordId", "required": true, "in": "path", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "204": { "description": "Word removed" }, "401": { "description": "Not authorized as super admin" }, "404": { "description": "Word not found" } }, "summary": "Remove a word from the global anonymization whitelist", "tags": ["Super Admin Anonymization Whitelist"] } }, "/super-admin/skill-templates": { "post": { "description": "Create a new skill template. Only accessible to super admins.", "operationId": "SuperAdminSkillTemplatesController_create", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateSkillTemplateDto" } } } }, "responses": { "201": { "description": "Successfully created skill template", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SkillTemplateResponseDto" } } } }, "401": { "description": "User not authenticated or not authorized as super admin" }, "409": { "description": "Skill template with this name already exists" }, "500": { "description": "Internal server error" } }, "summary": "Create a new skill template", "tags": ["Super Admin Skill Templates"] }, "get": { "description": "Retrieve all skill templates. Only accessible to super admins.", "operationId": "SuperAdminSkillTemplatesController_findAll", "parameters": [], "responses": { "200": { "description": "Successfully retrieved skill templates", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/SkillTemplateResponseDto" } } } } }, "401": { "description": "User not authenticated or not authorized as super admin" }, "500": { "description": "Internal server error" } }, "summary": "Get all skill templates", "tags": ["Super Admin Skill Templates"] } }, "/super-admin/skill-templates/{id}": { "get": { "description": "Retrieve a specific skill template by its ID. Only accessible to super admins.", "operationId": "SuperAdminSkillTemplatesController_findOne", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Skill template ID", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "Successfully retrieved skill template", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SkillTemplateResponseDto" } } } }, "401": { "description": "User not authenticated or not authorized as super admin" }, "404": { "description": "Skill template not found" }, "500": { "description": "Internal server error" } }, "summary": "Get a skill template by ID", "tags": ["Super Admin Skill Templates"] }, "patch": { "description": "Partially update an existing skill template. Only accessible to super admins.", "operationId": "SuperAdminSkillTemplatesController_update", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Skill template ID", "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateSkillTemplateDto" } } } }, "responses": { "200": { "description": "Successfully updated skill template", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SkillTemplateResponseDto" } } } }, "401": { "description": "User not authenticated or not authorized as super admin" }, "404": { "description": "Skill template not found" }, "409": { "description": "Skill template with this name already exists" }, "500": { "description": "Internal server error" } }, "summary": "Update a skill template", "tags": ["Super Admin Skill Templates"] }, "delete": { "description": "Delete a skill template. Only accessible to super admins.", "operationId": "SuperAdminSkillTemplatesController_delete", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Skill template ID", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "204": { "description": "Successfully deleted skill template" }, "401": { "description": "User not authenticated or not authorized as super admin" }, "404": { "description": "Skill template not found" }, "500": { "description": "Internal server error" } }, "summary": "Delete a skill template", "tags": ["Super Admin Skill Templates"] } }, "/artifacts": { "post": { "operationId": "ArtifactsController_create", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateArtifactDto" } } } }, "responses": { "201": { "description": "The artifact has been created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ArtifactResponseDto" } } } }, "400": { "description": "Invalid input data" } }, "summary": "Create a new artifact (document)", "tags": ["artifacts"] } }, "/artifacts/{id}": { "patch": { "operationId": "ArtifactsController_update", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The UUID of the artifact", "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateArtifactDto" } } } }, "responses": { "200": { "description": "The new version has been created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ArtifactVersionResponseDto" } } } }, "204": { "description": "Letterhead updated (no content change)" }, "404": { "description": "Artifact not found" } }, "summary": "Update an artifact (add a new version)", "tags": ["artifacts"] }, "get": { "operationId": "ArtifactsController_findOne", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The UUID of the artifact", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "The artifact with all versions", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ArtifactResponseDto" } } } }, "404": { "description": "Artifact not found" } }, "summary": "Get an artifact by ID with all versions", "tags": ["artifacts"] } }, "/artifacts/thread/{threadId}": { "get": { "operationId": "ArtifactsController_findByThread", "parameters": [ { "name": "threadId", "required": true, "in": "path", "description": "The UUID of the thread", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "List of artifacts for the thread", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ArtifactResponseDto" } } } } } }, "summary": "Get all artifacts for a thread", "tags": ["artifacts"] } }, "/artifacts/workspace/{workspaceId}": { "get": { "operationId": "ArtifactsController_findByWorkspace", "parameters": [ { "name": "workspaceId", "required": true, "in": "path", "description": "The UUID of the workspace", "schema": { "format": "uuid", "type": "string" } }, { "name": "search", "required": false, "in": "query", "description": "Search artifacts by title", "schema": { "type": "string" } }, { "name": "type", "required": false, "in": "query", "description": "Filter by type", "schema": { "enum": ["document", "diagram", "spreadsheet"], "type": "string" } }, { "name": "limit", "required": false, "in": "query", "description": "Maximum number of artifacts to return", "schema": { "type": "number" } }, { "name": "offset", "required": false, "in": "query", "description": "Number of artifacts to skip", "schema": { "default": 0, "type": "number" } } ], "responses": { "200": { "description": "List of artifacts from chats in the workspace", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ArtifactListResponseDto" } } } } }, "summary": "Get all artifacts in a workspace", "tags": ["artifacts"] } }, "/artifacts/{id}/revert": { "post": { "operationId": "ArtifactsController_revert", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The UUID of the artifact", "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RevertArtifactDto" } } } }, "responses": { "201": { "description": "A new version was created with the reverted content", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ArtifactVersionResponseDto" } } } }, "404": { "description": "Artifact or version not found" } }, "summary": "Revert an artifact to a specific version", "tags": ["artifacts"] } }, "/artifacts/{id}/export": { "get": { "operationId": "ArtifactsController_export", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The UUID of the artifact", "schema": { "format": "uuid", "type": "string" } }, { "name": "format", "required": true, "in": "query", "description": "Export format", "schema": { "enum": ["docx", "pdf", "xlsx", "csv"], "type": "string" } }, { "name": "versionNumber", "required": false, "in": "query", "description": "Version number to export; defaults to the current version", "schema": { "example": 2, "type": "number" } } ], "responses": { "200": { "description": "The exported file", "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } } } }, "404": { "description": "Artifact not found" } }, "summary": "Export an artifact as DOCX, PDF, XLSX, or CSV", "tags": ["artifacts"] } }, "/letterheads": { "post": { "operationId": "LetterheadsController_create", "parameters": [], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/CreateLetterheadDto" } } } }, "responses": { "201": { "description": "The letterhead has been created", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LetterheadResponseDto" } } } }, "400": { "description": "Invalid input data" } }, "summary": "Create a new letterhead", "tags": ["letterheads"] }, "get": { "operationId": "LetterheadsController_findAll", "parameters": [], "responses": { "200": { "description": "List of letterheads", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/LetterheadResponseDto" } } } } } }, "summary": "List all letterheads for the current org", "tags": ["letterheads"] } }, "/letterheads/{id}": { "get": { "operationId": "LetterheadsController_findOne", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The UUID of the letterhead", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "The letterhead", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LetterheadResponseDto" } } } }, "404": { "description": "Letterhead not found" } }, "summary": "Get a letterhead by ID", "tags": ["letterheads"] }, "patch": { "operationId": "LetterheadsController_update", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The UUID of the letterhead", "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/UpdateLetterheadDto" } } } }, "responses": { "200": { "description": "The updated letterhead", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LetterheadResponseDto" } } } }, "404": { "description": "Letterhead not found" } }, "summary": "Update a letterhead", "tags": ["letterheads"] }, "delete": { "operationId": "LetterheadsController_remove", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The UUID of the letterhead", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "204": { "description": "Letterhead deleted" }, "404": { "description": "Letterhead not found" } }, "summary": "Delete a letterhead", "tags": ["letterheads"] } }, "/letterheads/{id}/first-page-pdf": { "get": { "operationId": "LetterheadsController_downloadFirstPagePdf", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The UUID of the letterhead", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "The first-page PDF file" }, "404": { "description": "Letterhead not found" } }, "summary": "Download the first-page PDF of a letterhead", "tags": ["letterheads"] } }, "/letterheads/{id}/continuation-page-pdf": { "get": { "operationId": "LetterheadsController_downloadContinuationPagePdf", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "The UUID of the letterhead", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "The continuation-page PDF file" }, "404": { "description": "Letterhead or PDF not found" } }, "summary": "Download the continuation-page PDF of a letterhead", "tags": ["letterheads"] } }, "/usage/config": { "get": { "description": "Returns configuration settings for the usage dashboard, including deployment mode. This endpoint helps the frontend determine which features to show based on the deployment type.", "operationId": "UsageController_getUsageConfig", "parameters": [], "responses": { "200": { "description": "Usage configuration retrieved successfully. Returns deployment mode information.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UsageConfigResponseDto" } } } } }, "summary": "Get usage dashboard configuration", "tags": ["Admin Usage"] } }, "/usage/credits": { "get": { "description": "Returns the monthly credit budget, credits consumed this month, and credits remaining. Fields are null if the organization does not have a usage-based subscription.", "operationId": "UsageController_getCreditUsage", "parameters": [], "responses": { "200": { "description": "Credit usage retrieved successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreditUsageResponseDto" } } } } }, "summary": "Get credit usage for the current month", "tags": ["Admin Usage"] } }, "/usage/users": { "get": { "description": "Returns paginated user usage statistics with search, sorting, and filtering capabilities. Includes activity status. Dates are optional - if not provided, shows all usage.", "operationId": "UsageController_getUserUsage", "parameters": [ { "name": "startDate", "required": false, "in": "query", "description": "Start date in ISO format", "schema": { "example": "2024-01-01T00:00:00.000Z", "type": "string" } }, { "name": "endDate", "required": false, "in": "query", "description": "End date in ISO format", "schema": { "example": "2024-01-31T23:59:59.999Z", "type": "string" } }, { "name": "limit", "required": false, "in": "query", "description": "Number of users per page (1-1000). Defaults to 50.", "schema": { "example": 50, "type": "number" } }, { "name": "offset", "required": false, "in": "query", "description": "Number of users to skip for pagination. Defaults to 0.", "schema": { "example": 0, "type": "number" } }, { "name": "search", "required": false, "in": "query", "description": "Search term to filter users by name or email", "schema": { "example": "john.doe", "type": "string" } }, { "name": "sortBy", "required": false, "in": "query", "description": "Field to sort users by. Defaults to credits.", "schema": { "enum": ["credits", "requests", "lastActivity", "userName"], "type": "string" } }, { "name": "sortOrder", "required": false, "in": "query", "description": "Sort order (ascending or descending). Defaults to desc.", "schema": { "enum": ["asc", "desc"], "type": "string" } } ], "responses": { "200": { "description": "User usage statistics retrieved successfully. Includes pagination metadata.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserUsageResponseDto" } } } } }, "summary": "Get usage statistics by user", "tags": ["Admin Usage"] } }, "/usage/stats": { "get": { "operationId": "UsageController_getUsageStats", "parameters": [ { "name": "startDate", "required": false, "in": "query", "schema": { "type": "string" } }, { "name": "endDate", "required": false, "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UsageStatsResponseDto" } } } } }, "summary": "Get overall usage statistics for the current organization", "tags": ["Admin Usage"] } }, "/usage/models": { "get": { "operationId": "UsageController_getModelDistribution", "parameters": [ { "name": "startDate", "required": false, "in": "query", "schema": { "type": "string" } }, { "name": "endDate", "required": false, "in": "query", "schema": { "type": "string" } }, { "name": "maxModels", "required": false, "in": "query", "schema": { "type": "number" } }, { "name": "modelId", "required": false, "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ModelDistributionResponseDto" } } } } }, "summary": "Get usage distribution by model for the current organization", "tags": ["Admin Usage"] } }, "/usage/providers/chart": { "get": { "operationId": "UsageController_getProviderUsageChart", "parameters": [ { "name": "startDate", "required": false, "in": "query", "schema": { "type": "string" } }, { "name": "endDate", "required": false, "in": "query", "schema": { "type": "string" } }, { "name": "provider", "required": false, "in": "query", "schema": { "type": "string" } }, { "name": "modelId", "required": false, "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProviderUsageChartResponseDto" } } } } }, "summary": "Get provider usage time series for the current organization (chart-ready)", "tags": ["Admin Usage"] } }, "/super-admin/usage/{orgId}/config": { "get": { "operationId": "SuperAdminUsageController_getUsageConfig", "parameters": [ { "name": "orgId", "required": true, "in": "path", "description": "Organization ID", "schema": { "format": "uuid" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UsageConfigResponseDto" } } } } }, "summary": "Get usage dashboard configuration for an organization", "tags": ["Super Admin Usage"] } }, "/super-admin/usage/{orgId}/credits": { "get": { "description": "Returns the monthly credit budget, credits consumed this month, and credits remaining. Fields are null if the organization does not have a usage-based subscription.", "operationId": "SuperAdminUsageController_getCreditUsage", "parameters": [ { "name": "orgId", "required": true, "in": "path", "description": "Organization ID", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreditUsageResponseDto" } } } } }, "summary": "Get credit usage for an organization", "tags": ["Super Admin Usage"] } }, "/super-admin/usage/{orgId}/stats": { "get": { "operationId": "SuperAdminUsageController_getUsageStats", "parameters": [ { "name": "orgId", "required": true, "in": "path", "description": "Organization ID", "schema": { "format": "uuid", "type": "string" } }, { "name": "startDate", "required": false, "in": "query", "schema": { "type": "string" } }, { "name": "endDate", "required": false, "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UsageStatsResponseDto" } } } } }, "summary": "Get overall usage statistics for an organization", "tags": ["Super Admin Usage"] } }, "/super-admin/usage/{orgId}/models": { "get": { "operationId": "SuperAdminUsageController_getModelDistribution", "parameters": [ { "name": "orgId", "required": true, "in": "path", "description": "Organization ID", "schema": { "format": "uuid", "type": "string" } }, { "name": "startDate", "required": false, "in": "query", "schema": { "type": "string" } }, { "name": "endDate", "required": false, "in": "query", "schema": { "type": "string" } }, { "name": "maxModels", "required": false, "in": "query", "schema": { "type": "number" } }, { "name": "modelId", "required": false, "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ModelDistributionResponseDto" } } } } }, "summary": "Get usage distribution by model for an organization", "tags": ["Super Admin Usage"] } }, "/super-admin/usage/{orgId}/providers": { "get": { "operationId": "SuperAdminUsageDataController_getProviderUsage", "parameters": [ { "name": "orgId", "required": true, "in": "path", "description": "Organization ID", "schema": { "format": "uuid", "type": "string" } }, { "name": "startDate", "required": false, "in": "query", "schema": { "type": "string" } }, { "name": "endDate", "required": false, "in": "query", "schema": { "type": "string" } }, { "name": "includeTimeSeries", "required": false, "in": "query", "schema": { "type": "boolean" } }, { "name": "provider", "required": false, "in": "query", "schema": { "type": "string" } }, { "name": "modelId", "required": false, "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProviderUsageResponseDto" } } } } }, "summary": "Get usage statistics by provider for an organization", "tags": ["Super Admin Usage"] } }, "/super-admin/usage/{orgId}/providers/chart": { "get": { "operationId": "SuperAdminUsageDataController_getProviderUsageChart", "parameters": [ { "name": "orgId", "required": true, "in": "path", "description": "Organization ID", "schema": { "format": "uuid", "type": "string" } }, { "name": "startDate", "required": false, "in": "query", "schema": { "type": "string" } }, { "name": "endDate", "required": false, "in": "query", "schema": { "type": "string" } }, { "name": "provider", "required": false, "in": "query", "schema": { "type": "string" } }, { "name": "modelId", "required": false, "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProviderUsageChartResponseDto" } } } } }, "summary": "Get provider usage time series for an organization (chart-ready)", "tags": ["Super Admin Usage"] } }, "/super-admin/usage/{orgId}/users": { "get": { "operationId": "SuperAdminUsageDataController_getUserUsage", "parameters": [ { "name": "orgId", "required": true, "in": "path", "description": "Organization ID", "schema": { "format": "uuid", "type": "string" } }, { "name": "startDate", "required": false, "in": "query", "schema": { "type": "string" } }, { "name": "endDate", "required": false, "in": "query", "schema": { "type": "string" } }, { "name": "limit", "required": false, "in": "query", "schema": { "type": "number" } }, { "name": "offset", "required": false, "in": "query", "schema": { "type": "number" } }, { "name": "search", "required": false, "in": "query", "schema": { "type": "string" } }, { "name": "sortBy", "required": false, "in": "query", "schema": { "enum": ["credits", "requests", "lastActivity", "userName"], "type": "string" } }, { "name": "sortOrder", "required": false, "in": "query", "schema": { "enum": ["asc", "desc"], "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserUsageResponseDto" } } } } }, "summary": "Get usage statistics by user for an organization", "tags": ["Super Admin Usage"] } }, "/super-admin/platform-config/credits-per-euro": { "get": { "description": "Retrieve the global credits-per-euro value used for credit calculations. Super admin only.", "operationId": "SuperAdminPlatformConfigController_getCreditsPerEuro", "parameters": [], "responses": { "200": { "description": "Successfully retrieved credits-per-euro value", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreditsPerEuroResponseDto" } } } }, "401": { "description": "User not authenticated or not authorized as super admin" }, "404": { "description": "Credits-per-euro value has not been configured" }, "500": { "description": "Internal server error" } }, "summary": "Get the current credits-per-euro configuration", "tags": ["Super Admin Platform Config"] }, "put": { "description": "Update the global credits-per-euro value used for credit calculations. Super admin only.", "operationId": "SuperAdminPlatformConfigController_setCreditsPerEuro", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetCreditsPerEuroRequestDto" } } } }, "responses": { "204": { "description": "Successfully updated credits-per-euro value" }, "400": { "description": "Invalid value provided (must be positive number)" }, "401": { "description": "User not authenticated or not authorized as super admin" }, "500": { "description": "Internal server error" } }, "summary": "Set the credits-per-euro configuration", "tags": ["Super Admin Platform Config"] } }, "/super-admin/platform-config/fair-use-limits": { "get": { "description": "Retrieve the configured fair-use limits: per-tier message limits (zero, low, medium, high) plus a single global image-generation limit. Missing keys fall back to baked-in defaults so this endpoint always returns 200. The zero-tier value is informational only — runtime quota enforcement skips ZERO-tier models entirely. Super admin only.", "operationId": "SuperAdminPlatformConfigController_getFairUseLimits", "parameters": [], "responses": { "200": { "description": "Successfully retrieved fair-use limits", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/FairUseLimitsResponseDto" } } } }, "401": { "description": "User not authenticated or not authorized as super admin" }, "500": { "description": "Internal server error" } }, "summary": "Get the current fair-use limits", "tags": ["Super Admin Platform Config"] }, "put": { "description": "Update the messages-per-window limit for one model tier (zero, low, medium, or high). Storing a value for the zero tier is permitted but informational — runtime quota enforcement skips ZERO-tier models. Super admin only.", "operationId": "SuperAdminPlatformConfigController_setFairUseLimit", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetFairUseLimitRequestDto" } } } }, "responses": { "204": { "description": "Successfully updated fair-use limit for the given tier" }, "400": { "description": "Invalid value provided (limit and windowMs must be positive)" }, "401": { "description": "User not authenticated or not authorized as super admin" }, "500": { "description": "Internal server error" } }, "summary": "Set the fair-use limit for a single model tier", "tags": ["Super Admin Platform Config"] } }, "/super-admin/platform-config/image-fair-use-limit": { "put": { "description": "Update the images-per-window fair-use limit. Image generation has a single global bucket (no tiering), so this endpoint takes only limit + windowMs. Super admin only.", "operationId": "SuperAdminPlatformConfigController_setImageFairUseLimit", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetImageFairUseLimitRequestDto" } } } }, "responses": { "204": { "description": "Successfully updated image fair-use limit" }, "400": { "description": "Invalid value provided (limit and windowMs must be positive)" }, "401": { "description": "User not authenticated or not authorized as super admin" }, "500": { "description": "Internal server error" } }, "summary": "Set the fair-use limit for image generation", "tags": ["Super Admin Platform Config"] } }, "/super-admin/platform-config/app-alert": { "put": { "description": "Enable or disable the persistent alert banner shown to all users and set its message. When enabling, a non-empty message is required. Super admin only.", "operationId": "SuperAdminPlatformConfigController_setAppAlert", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetAppAlertRequestDto" } } } }, "responses": { "204": { "description": "Successfully updated the app alert banner" }, "400": { "description": "Invalid value provided (message required when enabled, or message too long)" }, "401": { "description": "User not authenticated or not authorized as super admin" }, "500": { "description": "Internal server error" } }, "summary": "Set the app-wide alert banner", "tags": ["Super Admin Platform Config"] } }, "/app-alert": { "get": { "description": "Retrieve the persistent alert banner configuration shown to all users. Returns `enabled: false` with an empty message when no banner has been configured.", "operationId": "AppAlertController_getAppAlert", "parameters": [], "responses": { "200": { "description": "Successfully retrieved the app alert configuration", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AppAlertResponseDto" } } } }, "401": { "description": "User not authenticated" }, "500": { "description": "Internal server error" } }, "summary": "Get the current app-wide alert banner", "tags": ["App Alert"] } }, "/runs/send-message": { "post": { "description": "Sends a user message (with optional image attachments) and returns a server-sent events stream with the AI response. Images are processed transactionally with the message.", "operationId": "RunsController_sendMessage", "parameters": [], "requestBody": { "required": true, "content": { "multipart/form-data": { "schema": { "type": "object", "required": ["threadId"], "properties": { "threadId": { "type": "string", "format": "uuid" }, "text": { "type": "string", "description": "Message text (optional if images provided)" }, "images": { "type": "array", "items": { "type": "string", "format": "binary" }, "description": "Image files to attach (max 10, max 10MB each, 50MB total)" }, "imageAltTexts": { "type": "string", "description": "JSON array of alt texts matching image order" }, "toolResult": { "type": "string", "description": "JSON object for tool result input" }, "skillId": { "type": "string", "format": "uuid", "description": "Skill ID to activate for this message" }, "streaming": { "type": "boolean", "default": true } } } } } }, "responses": { "200": { "description": "Server-sent events stream with discriminated response types", "content": { "text/event-stream": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/RunSessionResponseDto" }, { "$ref": "#/components/schemas/RunMessageResponseDto" }, { "$ref": "#/components/schemas/RunErrorResponseDto" }, { "$ref": "#/components/schemas/RunThreadResponseDto" }, { "$ref": "#/components/schemas/RunMasksResponseDto" } ], "discriminator": { "propertyName": "type", "mapping": { "session": "#/components/schemas/RunSessionResponseDto", "message": "#/components/schemas/RunMessageResponseDto", "error": "#/components/schemas/RunErrorResponseDto", "thread": "#/components/schemas/RunThreadResponseDto", "masks": "#/components/schemas/RunMasksResponseDto" } } } } }, "headers": { "Content-Type": { "description": "Content type for server-sent events", "schema": { "type": "string", "example": "text/event-stream" } }, "Cache-Control": { "description": "Cache control header", "schema": { "type": "string", "example": "no-cache" } }, "Connection": { "description": "Connection type", "schema": { "type": "string", "example": "keep-alive" } } } }, "400": { "description": "Invalid request payload" }, "403": { "description": "Subscription required" }, "500": { "description": "Internal server error" } }, "summary": "Send a message with optional images and receive streaming response", "tags": ["runs"] } }, "/super-admin/trials": { "post": { "description": "Create a new trial for an organization. Only accessible to users with the super admin system role.", "operationId": "SuperAdminTrialsController_createTrial", "parameters": [], "requestBody": { "required": true, "description": "Trial information", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateTrialRequestDto" } } } }, "responses": { "201": { "description": "Successfully created trial for the super admin.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuperAdminTrialResponseDto" } } } }, "400": { "description": "Invalid request format or validation errors." }, "403": { "description": "The requester is not a super admin." } }, "summary": "Create a new trial", "tags": ["Super Admin Trials"] } }, "/super-admin/trials/{orgId}": { "get": { "description": "Retrieve a trial by its organization ID. Only accessible to users with the super admin system role.", "operationId": "SuperAdminTrialsController_getTrialByOrgId", "parameters": [ { "name": "orgId", "required": true, "in": "path", "description": "The organization ID of the trial to retrieve.", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Successfully retrieved trial for the super admin.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuperAdminTrialResponseDtoNullable" } } } }, "400": { "description": "Trial not found for the organization." }, "403": { "description": "The requester is not a super admin." } }, "summary": "Get a trial by organization ID", "tags": ["Super Admin Trials"] }, "put": { "description": "Update a trial for an organization. Can update maxMessages and/or messagesSent. Only accessible to users with the super admin system role.", "operationId": "SuperAdminTrialsController_updateTrial", "parameters": [ { "name": "orgId", "required": true, "in": "path", "description": "The organization ID of the trial to update.", "schema": { "type": "string" } } ], "requestBody": { "required": true, "description": "Trial update information", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateTrialRequestDto" } } } }, "responses": { "200": { "description": "Successfully updated trial for the super admin.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuperAdminTrialResponseDto" } } } }, "400": { "description": "Invalid request format or validation errors." }, "403": { "description": "The requester is not a super admin." } }, "summary": "Update a trial", "tags": ["Super Admin Trials"] } }, "/credit-limits/users": { "get": { "operationId": "CreditLimitsController_getUserLimits", "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/UserCreditLimitItemDto" } } } } } }, "summary": "List configured user credit limits with current consumption", "tags": ["credit-limits"] } }, "/credit-limits/teams": { "get": { "operationId": "CreditLimitsController_getTeamLimits", "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/TeamCreditLimitItemDto" } } } } } }, "summary": "List configured team credit limits with current consumption", "tags": ["credit-limits"] } }, "/credit-limits/users/{userId}": { "put": { "operationId": "CreditLimitsController_setUserLimit", "parameters": [ { "name": "userId", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetCreditLimitDto" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserCreditLimitResponseDto" } } } } }, "summary": "Set a monthly credit limit for a user", "tags": ["credit-limits"] }, "delete": { "operationId": "CreditLimitsController_removeUserLimit", "parameters": [ { "name": "userId", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "204": { "description": "" } }, "summary": "Remove a user credit limit (back to unlimited)", "tags": ["credit-limits"] } }, "/credit-limits/teams/{teamId}": { "put": { "operationId": "CreditLimitsController_setTeamLimit", "parameters": [ { "name": "teamId", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetCreditLimitDto" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamCreditLimitResponseDto" } } } } }, "summary": "Set a monthly credit limit for a team", "tags": ["credit-limits"] }, "delete": { "operationId": "CreditLimitsController_removeTeamLimit", "parameters": [ { "name": "teamId", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "204": { "description": "" } }, "summary": "Remove a team credit limit (back to unlimited)", "tags": ["credit-limits"] } }, "/chat-settings/system-prompt": { "get": { "description": "Returns the custom system prompt for the authenticated user, or null if not set.", "operationId": "ChatSettingsController_getSystemPrompt", "parameters": [], "responses": { "200": { "description": "The user system prompt", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserSystemPromptResponseDto" } } } } }, "summary": "Get the user system prompt", "tags": ["Chat Settings"] }, "put": { "description": "Creates or replaces the custom system prompt for the authenticated user.", "operationId": "ChatSettingsController_upsertSystemPrompt", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpsertUserSystemPromptDto" } } } }, "responses": { "200": { "description": "Successfully set or updated the user system prompt", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UserSystemPromptResponseDto" } } } }, "400": { "description": "Invalid request payload" } }, "summary": "Set or update the user system prompt", "tags": ["Chat Settings"] }, "delete": { "description": "Deletes the custom system prompt for the authenticated user.", "operationId": "ChatSettingsController_deleteSystemPrompt", "parameters": [], "responses": { "204": { "description": "Successfully deleted the user system prompt" } }, "summary": "Delete the user system prompt", "tags": ["Chat Settings"] } }, "/chat-settings/generate-personalized-system-prompt": { "post": { "description": "Generates a personalized system prompt and welcome message based on user preferences, then saves the system prompt.", "operationId": "ChatSettingsController_generatePersonalizedSystemPrompt", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GeneratePersonalizedSystemPromptDto" } } } }, "responses": { "200": { "description": "Successfully generated and saved the personalized system prompt", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GeneratePersonalizedSystemPromptResponseDto" } } } }, "400": { "description": "Invalid request payload" }, "422": { "description": "No default model configured for the organization" }, "500": { "description": "Inference failure during prompt generation" } }, "summary": "Generate a personalized system prompt", "tags": ["Chat Settings"] } }, "/chat-settings/org-system-prompt": { "get": { "description": "Returns the organization-wide system prompt for the admin's organization, or null if not set. Admin only.", "operationId": "OrgSystemPromptController_getOrgSystemPrompt", "parameters": [], "responses": { "200": { "description": "The organization-wide system prompt", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrgSystemPromptResponseDto" } } } }, "403": { "description": "User is not an organization admin" } }, "summary": "Get the organization-wide system prompt", "tags": ["Chat Settings"] }, "put": { "description": "Creates or replaces the organization-wide system prompt, which is injected into all conversations of users of the organization. Admin only.", "operationId": "OrgSystemPromptController_upsertOrgSystemPrompt", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpsertOrgSystemPromptDto" } } } }, "responses": { "200": { "description": "Successfully set or updated the organization-wide system prompt", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrgSystemPromptResponseDto" } } } }, "400": { "description": "Invalid request payload" }, "403": { "description": "User is not an organization admin" } }, "summary": "Set or update the organization-wide system prompt", "tags": ["Chat Settings"] }, "delete": { "description": "Deletes the organization-wide system prompt. Admin only.", "operationId": "OrgSystemPromptController_deleteOrgSystemPrompt", "parameters": [], "responses": { "204": { "description": "Successfully deleted the organization-wide system prompt" }, "403": { "description": "User is not an organization admin" } }, "summary": "Delete the organization-wide system prompt", "tags": ["Chat Settings"] } }, "/chat-settings/org-chat-settings": { "get": { "description": "Returns the organization-wide chat settings for the admin's organization. Defaults to internet access enabled when not configured. Admin only.", "operationId": "OrgChatSettingsController_getOrgChatSettings", "parameters": [], "responses": { "200": { "description": "The organization-wide chat settings", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrgChatSettingsResponseDto" } } } }, "403": { "description": "User is not an organization admin" } }, "summary": "Get the organization-wide chat settings", "tags": ["Chat Settings"] }, "put": { "description": "Creates or replaces the organization-wide chat settings. When internet access is disabled, web search and website content tools are not offered to the AI assistant in any of the org users conversations. Admin only.", "operationId": "OrgChatSettingsController_upsertOrgChatSettings", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpsertOrgChatSettingsDto" } } } }, "responses": { "200": { "description": "Successfully set or updated the organization-wide chat settings", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrgChatSettingsResponseDto" } } } }, "400": { "description": "Invalid request payload" }, "403": { "description": "User is not an organization admin" } }, "summary": "Set or update the organization-wide chat settings", "tags": ["Chat Settings"] } }, "/retention-policies/org": { "get": { "operationId": "RetentionPoliciesController_get", "parameters": [], "responses": { "200": { "description": "Current retention policy (disabled if never configured)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RetentionPolicyResponseDto" } } } } }, "summary": "Get the data-retention policy for the current org", "tags": ["retention-policies"] }, "put": { "operationId": "RetentionPoliciesController_update", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateRetentionPolicyRequestDto" } } } }, "responses": { "200": { "description": "Updated retention policy", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RetentionPolicyResponseDto" } } } }, "400": { "description": "Retention period is not one of the allowed windows" } }, "summary": "Set or clear the data-retention policy for the current org", "tags": ["retention-policies"] } }, "/academy/chapters": { "get": { "description": "Retrieve all chapters with nested modules, ordered by position. Requires the academy add-on to be active for the organization.", "operationId": "AcademyChaptersController_getChapters", "parameters": [], "responses": { "200": { "description": "Successfully retrieved academy chapters", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AcademyChapterResponseDto" } } } } }, "401": { "description": "User not authenticated or academy add-on not active" }, "500": { "description": "Internal server error" } }, "summary": "Get all academy chapters with their modules", "tags": ["Academy"] } }, "/academy/chapters/{chapterId}/quiz": { "get": { "description": "Draw up to 10 random questions from the chapter pool (the whole pool if smaller). Correct answers are never included.", "operationId": "AcademyQuizController_getChapterQuiz", "parameters": [ { "name": "chapterId", "required": true, "in": "path", "description": "Chapter ID", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/QuizQuestionForTakingResponseDto" } } } } }, "401": { "description": "User not authenticated or academy add-on not active" }, "500": { "description": "Internal server error" } }, "summary": "Get a chapter quiz", "tags": ["Academy"] } }, "/academy/chapters/{chapterId}/quiz/submit": { "post": { "description": "Grade a quiz submission against the chapter pass threshold, record progress and, when the whole academy is passed, stamp completion. Unlimited retries.", "operationId": "AcademyQuizController_submitChapterQuiz", "parameters": [ { "name": "chapterId", "required": true, "in": "path", "description": "Chapter ID", "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubmitQuizRequestDto" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QuizResultResponseDto" } } } }, "401": { "description": "User not authenticated or academy add-on not active" }, "500": { "description": "Internal server error" } }, "summary": "Submit a chapter quiz", "tags": ["Academy"] } }, "/academy/progress": { "get": { "description": "Get the current user per-chapter pass state and the whole-academy completion date.", "operationId": "AcademyQuizController_getProgress", "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AcademyProgressResponseDto" } } } }, "401": { "description": "User not authenticated or academy add-on not active" }, "500": { "description": "Internal server error" } }, "summary": "Get academy progress", "tags": ["Academy"] } }, "/academy/certificate": { "get": { "description": "Render the KI-Führerschein certificate PDF for the current user. Available once the whole academy has been completed.", "operationId": "AcademyCertificateController_getCertificate", "parameters": [], "responses": { "200": { "description": "The certificate PDF", "content": { "application/octet-stream": { "schema": { "type": "string", "format": "binary" } } } }, "401": { "description": "User not authenticated or academy add-on not active" }, "404": { "description": "The academy has not been completed" }, "500": { "description": "Internal server error" } }, "summary": "Download the academy completion certificate", "tags": ["Academy"] } }, "/super-admin/academy/chapters": { "get": { "description": "Retrieve all chapters with nested modules, ordered by position. Only accessible to super admins.", "operationId": "SuperAdminAcademyChaptersController_getChapters", "parameters": [], "responses": { "200": { "description": "Successfully retrieved academy chapters", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/SuperAdminAcademyChapterResponseDto" } } } } }, "401": { "description": "User not authenticated or not authorized as super admin" }, "500": { "description": "Internal server error" } }, "summary": "Get all academy chapters with their modules", "tags": ["Super Admin Academy"] }, "post": { "description": "Create a new chapter appended after the last position. Only accessible to super admins.", "operationId": "SuperAdminAcademyChaptersController_createChapter", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateChapterRequestDto" } } } }, "responses": { "201": { "description": "Successfully created chapter", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AcademyChapterResponseDto" } } } }, "401": { "description": "User not authenticated or not authorized as super admin" }, "500": { "description": "Internal server error" } }, "summary": "Create a new academy chapter", "tags": ["Super Admin Academy"] } }, "/super-admin/academy/chapters/order": { "put": { "description": "Persist a new chapter order. The submitted ids must be exactly the ids of all existing chapters. Only accessible to super admins.", "operationId": "SuperAdminAcademyChaptersController_reorderChapters", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReorderChaptersRequestDto" } } } }, "responses": { "204": { "description": "Successfully reordered chapters" }, "400": { "description": "Submitted ids do not match the current set of chapters" }, "401": { "description": "User not authenticated or not authorized as super admin" }, "500": { "description": "Internal server error" } }, "summary": "Reorder academy chapters", "tags": ["Super Admin Academy"] } }, "/super-admin/academy/chapters/{id}": { "put": { "description": "Replace title and description of a chapter. Only accessible to super admins.", "operationId": "SuperAdminAcademyChaptersController_updateChapter", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Chapter ID", "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateChapterRequestDto" } } } }, "responses": { "200": { "description": "Successfully updated chapter", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AcademyChapterResponseDto" } } } }, "401": { "description": "User not authenticated or not authorized as super admin" }, "404": { "description": "Chapter not found" }, "500": { "description": "Internal server error" } }, "summary": "Update an academy chapter", "tags": ["Super Admin Academy"] }, "delete": { "description": "Delete a chapter and all of its modules. Only accessible to super admins.", "operationId": "SuperAdminAcademyChaptersController_deleteChapter", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Chapter ID", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "204": { "description": "Successfully deleted chapter" }, "401": { "description": "User not authenticated or not authorized as super admin" }, "404": { "description": "Chapter not found" }, "500": { "description": "Internal server error" } }, "summary": "Delete an academy chapter", "tags": ["Super Admin Academy"] } }, "/super-admin/academy/chapters/{chapterId}/course-modules": { "post": { "description": "Create a module in a chapter, appended after the last position. Only accessible to super admins.", "operationId": "SuperAdminAcademyCourseModulesController_createCourseModule", "parameters": [ { "name": "chapterId", "required": true, "in": "path", "description": "Chapter ID", "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateCourseModuleRequestDto" } } } }, "responses": { "201": { "description": "Successfully created module", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CourseModuleResponseDto" } } } }, "401": { "description": "User not authenticated or not authorized as super admin" }, "404": { "description": "Chapter not found" }, "500": { "description": "Internal server error" } }, "summary": "Create a new academy module", "tags": ["Super Admin Academy"] } }, "/super-admin/academy/chapters/{chapterId}/course-modules/order": { "put": { "description": "Persist a new module order within a chapter. The submitted ids must be exactly the ids of all modules in the chapter. Only accessible to super admins.", "operationId": "SuperAdminAcademyCourseModulesController_reorderCourseModules", "parameters": [ { "name": "chapterId", "required": true, "in": "path", "description": "Chapter ID", "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReorderCourseModulesRequestDto" } } } }, "responses": { "204": { "description": "Successfully reordered modules" }, "400": { "description": "Submitted ids do not match the current modules of the chapter" }, "401": { "description": "User not authenticated or not authorized as super admin" }, "404": { "description": "Chapter not found" }, "500": { "description": "Internal server error" } }, "summary": "Reorder the modules of a chapter", "tags": ["Super Admin Academy"] } }, "/super-admin/academy/course-modules/{id}": { "put": { "description": "Replace title, description, and Loom link of a module. Only accessible to super admins.", "operationId": "SuperAdminAcademyCourseModulesController_updateCourseModule", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Module ID", "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateCourseModuleRequestDto" } } } }, "responses": { "200": { "description": "Successfully updated module", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CourseModuleResponseDto" } } } }, "401": { "description": "User not authenticated or not authorized as super admin" }, "404": { "description": "Module not found" }, "500": { "description": "Internal server error" } }, "summary": "Update an academy module", "tags": ["Super Admin Academy"] }, "delete": { "description": "Delete a module. Only accessible to super admins.", "operationId": "SuperAdminAcademyCourseModulesController_deleteCourseModule", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Module ID", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "204": { "description": "Successfully deleted module" }, "401": { "description": "User not authenticated or not authorized as super admin" }, "404": { "description": "Module not found" }, "500": { "description": "Internal server error" } }, "summary": "Delete an academy module", "tags": ["Super Admin Academy"] } }, "/super-admin/academy/chapters/{chapterId}/quiz-questions": { "post": { "description": "Add a question to a chapter quiz pool, appended after the last position. Only accessible to super admins.", "operationId": "SuperAdminAcademyQuizQuestionsController_createQuizQuestion", "parameters": [ { "name": "chapterId", "required": true, "in": "path", "description": "Chapter ID", "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateQuizQuestionRequestDto" } } } }, "responses": { "201": { "description": "Successfully created quiz question", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QuizQuestionResponseDto" } } } }, "400": { "description": "Invalid question (bad option count or no single correct)" }, "401": { "description": "User not authenticated or not authorized as super admin" }, "404": { "description": "Chapter not found" }, "500": { "description": "Internal server error" } }, "summary": "Create a new academy quiz question", "tags": ["Super Admin Academy"] } }, "/super-admin/academy/quiz-questions/{id}": { "put": { "description": "Replace the prompt and answer options of a quiz question. Only accessible to super admins.", "operationId": "SuperAdminAcademyQuizQuestionsController_updateQuizQuestion", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Quiz question ID", "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateQuizQuestionRequestDto" } } } }, "responses": { "200": { "description": "Successfully updated quiz question", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/QuizQuestionResponseDto" } } } }, "400": { "description": "Invalid question (bad option count or no single correct)" }, "401": { "description": "User not authenticated or not authorized as super admin" }, "404": { "description": "Quiz question not found" }, "500": { "description": "Internal server error" } }, "summary": "Update an academy quiz question", "tags": ["Super Admin Academy"] }, "delete": { "description": "Delete a quiz question. Only accessible to super admins.", "operationId": "SuperAdminAcademyQuizQuestionsController_deleteQuizQuestion", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Quiz question ID", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "204": { "description": "Successfully deleted quiz question" }, "401": { "description": "User not authenticated or not authorized as super admin" }, "404": { "description": "Quiz question not found" }, "500": { "description": "Internal server error" } }, "summary": "Delete an academy quiz question", "tags": ["Super Admin Academy"] } }, "/openai-compat/v1/chat/completions": { "post": { "operationId": "ChatCompletionsController_create", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChatCompletionRequestDto" } } } }, "responses": { "201": { "description": "" } }, "tags": ["ChatCompletions"] } }, "/openai-compat/v1/models": { "get": { "operationId": "ModelsController_list", "parameters": [], "responses": { "200": { "description": "" } }, "tags": ["Models"] } }, "/openai-compat/v1/models/{model}": { "get": { "operationId": "ModelsController_retrieve", "parameters": [ { "name": "model", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "" } }, "tags": ["Models"] } }, "/super-admin/addons/{orgId}": { "get": { "operationId": "SuperAdminAddonsController_list", "parameters": [ { "name": "orgId", "required": true, "in": "path", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AddonStatusResponseDto" } } } } }, "401": { "description": "Not authorized as super admin" } }, "summary": "List all add-ons with their active state for an organization", "tags": ["Super Admin Addons"] } }, "/super-admin/addons/{orgId}/{type}": { "post": { "operationId": "SuperAdminAddonsController_activate", "parameters": [ { "name": "orgId", "required": true, "in": "path", "schema": { "format": "uuid", "type": "string" } }, { "name": "type", "required": true, "in": "path", "schema": { "enum": ["ayunis_core_academy"], "type": "string" } } ], "responses": { "204": { "description": "Add-on active" }, "401": { "description": "Not authorized as super admin" } }, "summary": "Activate an add-on for an organization", "tags": ["Super Admin Addons"] }, "delete": { "operationId": "SuperAdminAddonsController_deactivate", "parameters": [ { "name": "orgId", "required": true, "in": "path", "schema": { "format": "uuid", "type": "string" } }, { "name": "type", "required": true, "in": "path", "schema": { "enum": ["ayunis_core_academy"], "type": "string" } } ], "responses": { "204": { "description": "Add-on inactive" }, "401": { "description": "Not authorized as super admin" } }, "summary": "Deactivate an add-on for an organization", "tags": ["Super Admin Addons"] } }, "/addons": { "get": { "operationId": "AddonsController_list", "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/AddonStatusResponseDto" } } } } }, "401": { "description": "Not authenticated" } }, "summary": "List all add-ons with their active state for the current user's organization", "tags": ["Addons"] } }, "/auth/login": { "post": { "description": "Authenticate user with email and password. Sets authentication cookies on successful login.", "operationId": "AuthenticationController_login", "parameters": [], "requestBody": { "required": true, "description": "User credentials for authentication", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoginDto" } } } }, "responses": { "200": { "description": "Credentials accepted. Session cookies are set unless mfaRequired is true, in which case a short-lived MFA pending cookie is set instead.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoginResponseDto" } } } }, "400": { "description": "Invalid request format", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseDto" } } } }, "401": { "description": "Invalid credentials", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseDto" } } } } }, "summary": "User login", "tags": ["Authentication"] } }, "/auth/register": { "post": { "description": "Register a new user account with email, password, and organization name. Automatically logs in the user and sets authentication cookies.", "operationId": "AuthenticationController_register", "parameters": [], "requestBody": { "required": true, "description": "User registration information", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegisterDto" } } } }, "responses": { "201": { "description": "Registration successful. User is automatically logged in and authentication cookies are set.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuccessResponseDto" } } } }, "400": { "description": "Invalid request format or validation errors", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseDto" } } } }, "409": { "description": "User with this email already exists", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseDto" } } } } }, "summary": "User registration", "tags": ["Authentication"] } }, "/auth/refresh": { "post": { "description": "Refresh expired access tokens using the refresh token stored in cookies. Returns new authentication cookies.", "operationId": "AuthenticationController_refresh", "parameters": [], "responses": { "200": { "description": "Token refresh successful. New authentication cookies are set.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuccessResponseDto" } } } }, "401": { "description": "Invalid or expired refresh token", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseDto" } } } }, "500": { "description": "Authentication configuration error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseDto" } } } } }, "security": [ { "refreshToken": [] } ], "summary": "Refresh authentication tokens", "tags": ["Authentication"] } }, "/auth/me": { "get": { "description": "Get the current authenticated user's email and role. If access token is expired but refresh token is valid, automatically refreshes tokens and sets new cookies.", "operationId": "AuthenticationController_me", "parameters": [], "responses": { "200": { "description": "User information retrieved successfully. If tokens were refreshed, new cookies are set.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MeResponseDto" } } } }, "401": { "description": "Not authenticated - no valid tokens found", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseDto" } } } }, "500": { "description": "Authentication configuration error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponseDto" } } } } }, "summary": "Get current user information", "tags": ["Authentication"] } }, "/auth/logout": { "post": { "description": "Log out the current user by clearing authentication cookies.", "operationId": "AuthenticationController_logout", "parameters": [], "responses": { "200": { "description": "Logout successful. Authentication cookies are cleared.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuccessResponseDto" } } } } }, "summary": "User logout", "tags": ["Authentication"] } }, "/auth/mfa/verify": { "post": { "description": "Requires the MFA pending cookie set by successful authentication.", "operationId": "MfaLoginController_verify", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MfaCodeRequestDto" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SuccessResponseDto" } } } } }, "summary": "Complete login with a TOTP or recovery code", "tags": ["Authentication"] } }, "/auth/mfa/setup": { "post": { "description": "Only available when the pending token has enrollmentRequired (the org mandates MFA and the user is not enrolled).", "operationId": "MfaLoginController_setup", "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MfaSetupResponseDto" } } } } }, "summary": "Start forced TOTP enrollment during login", "tags": ["Authentication"] } }, "/auth/mfa/setup/confirm": { "post": { "description": "Activates two-factor auth, returns the recovery codes and issues the session cookies.", "operationId": "MfaLoginController_confirmSetup", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MfaCodeRequestDto" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MfaLoginConfirmResponseDto" } } } } }, "summary": "Confirm forced enrollment and complete the login", "tags": ["Authentication"] } }, "/onboarding": { "get": { "description": "Get the current user's onboarding progress and welcome-video status.", "operationId": "OnboardingController_getOnboarding", "parameters": [], "responses": { "200": { "description": "Onboarding progress", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OnboardingResponseDto" } } } }, "401": { "description": "User not authenticated" }, "500": { "description": "Internal server error occurred while reading onboarding" } }, "summary": "Get onboarding progress", "tags": ["Onboarding"] }, "put": { "description": "Persist the current user's onboarding progress: the IDs of completed steps and whether the checklist is hidden.", "operationId": "OnboardingController_updateOnboarding", "parameters": [], "requestBody": { "required": true, "description": "Onboarding progress to persist", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateOnboardingDto" } } } }, "responses": { "200": { "description": "Onboarding progress successfully updated", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OnboardingResponseDto" } } } }, "400": { "description": "Invalid onboarding payload" }, "401": { "description": "User not authenticated" }, "500": { "description": "Internal server error occurred while updating onboarding" } }, "summary": "Update onboarding progress", "tags": ["Onboarding"] } }, "/onboarding/welcome-video-seen": { "post": { "description": "Record when the current user first dismisses the welcome video.", "operationId": "OnboardingController_markWelcomeVideoSeen", "parameters": [], "responses": { "200": { "description": "Welcome video successfully marked as seen", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OnboardingResponseDto" } } } }, "401": { "description": "User not authenticated" }, "500": { "description": "Internal server error occurred while updating onboarding" } }, "summary": "Mark the welcome video as seen", "tags": ["Onboarding"] } }, "/ip-allowlist": { "get": { "operationId": "IpAllowlistController_get", "parameters": [], "responses": { "200": { "description": "Current IP allow list (empty array if none)", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IpAllowlistResponseDto" } } } } }, "summary": "Get the IP allow list for the current org", "tags": ["ip-allowlist"] }, "put": { "operationId": "IpAllowlistController_update", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateIpAllowlistRequestDto" } } } }, "responses": { "200": { "description": "Updated IP allow list", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IpAllowlistResponseDto" } } } }, "400": { "description": "Invalid CIDR or admin lockout (requesting IP not in new allowlist)" } }, "summary": "Replace the IP allow list for the current org", "tags": ["ip-allowlist"] }, "delete": { "operationId": "IpAllowlistController_remove", "parameters": [], "responses": { "204": { "description": "IP allow list removed" } }, "summary": "Remove the IP allow list (disable IP restriction)", "tags": ["ip-allowlist"] } }, "/api-keys": { "get": { "operationId": "ApiKeysController_listApiKeys", "parameters": [], "responses": { "200": { "description": "Successfully retrieved API keys", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ApiKeyResponseDto" } } } } }, "401": { "description": "User is not authenticated" }, "403": { "description": "User is not authorized to view API keys" } }, "summary": "List API keys for the current organization", "tags": ["api-keys"] }, "post": { "operationId": "ApiKeysController_createApiKey", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateApiKeyDto" } } } }, "responses": { "201": { "description": "Successfully created API key", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateApiKeyResponseDto" } } } }, "400": { "description": "Invalid input" }, "401": { "description": "User is not authenticated" }, "403": { "description": "User is not authorized to create API keys" } }, "summary": "Create a new API key. The full plaintext secret is returned ONLY in this response.", "tags": ["api-keys"] } }, "/api-keys/{id}": { "delete": { "operationId": "ApiKeysController_revokeApiKey", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "204": { "description": "API key successfully revoked" }, "401": { "description": "User is not authenticated" }, "403": { "description": "User is not authorized to revoke this API key" }, "404": { "description": "API key not found" } }, "summary": "Revoke an API key", "tags": ["api-keys"] } }, "/academy-access/status": { "get": { "operationId": "AcademyAccessController_getStatus", "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AcademyAccessStatusResponseDto" } } } }, "401": { "description": "Not authenticated" } }, "summary": "Whether the current user may use Ayunis Core chat, and why not", "tags": ["Academy Access"] } }, "/academy-access/org-settings": { "get": { "operationId": "AcademyAccessController_getOrgSettings", "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrgAcademyAccessSettingsResponseDto" } } } } }, "summary": "Get the org's academy certificate requirement", "tags": ["Academy Access"] }, "put": { "operationId": "AcademyAccessController_upsertOrgSettings", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpsertOrgAcademyAccessSettingsDto" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrgAcademyAccessSettingsResponseDto" } } } } }, "summary": "Set the org's academy certificate requirement", "tags": ["Academy Access"] } }, "/academy-access/org-certificates": { "get": { "operationId": "AcademyAccessController_listOrgCertificates", "parameters": [ { "name": "search", "required": false, "in": "query", "description": "Search members by name or email", "schema": { "example": "anna", "type": "string" } }, { "name": "status", "required": false, "in": "query", "description": "Only return members whose certificate is in this state", "schema": { "$ref": "#/components/schemas/CertificateValidityStatus" } }, { "name": "limit", "required": false, "in": "query", "description": "Maximum number of members to return", "schema": { "default": 25, "example": 25, "type": "number" } }, { "name": "offset", "required": false, "in": "query", "description": "Number of members to skip", "schema": { "default": 0, "example": 0, "type": "number" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedOrgCertificateStatusesResponseDto" } } } } }, "summary": "Certificate standing of every member of the admin's org", "tags": ["Academy Access"] } }, "/mfa/status": { "get": { "operationId": "MfaController_getStatus", "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MfaStatusResponseDto" } } } } }, "summary": "Get the current user’s two-factor auth status", "tags": ["mfa"] } }, "/mfa/setup": { "post": { "description": "Generates a secret and QR code. Enrollment is pending until confirmed with a valid code.", "operationId": "MfaController_setup", "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MfaSetupResponseDto" } } } } }, "summary": "Start TOTP enrollment", "tags": ["mfa"] } }, "/mfa/setup/confirm": { "post": { "description": "Activates two-factor auth and returns the recovery codes.", "operationId": "MfaController_confirm", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MfaCodeRequestDto" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RecoveryCodesResponseDto" } } } } }, "summary": "Confirm TOTP enrollment with a code", "tags": ["mfa"] } }, "/mfa/disable": { "post": { "operationId": "MfaController_disable", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MfaCodeRequestDto" } } } }, "responses": { "200": { "description": "Two-factor auth disabled" }, "409": { "description": "MFA is required by the org" } }, "summary": "Disable two-factor auth (requires a valid code)", "tags": ["mfa"] } }, "/mfa/org": { "get": { "operationId": "MfaController_getOrgRequirement", "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrgMfaRequirementResponseDto" } } } } }, "summary": "Get the org’s MFA requirement (admin)", "tags": ["mfa"] }, "put": { "operationId": "MfaController_updateOrgRequirement", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateOrgMfaRequirementRequestDto" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrgMfaRequirementResponseDto" } } } } }, "summary": "Set the org’s MFA requirement (admin)", "tags": ["mfa"] } }, "/mfa/users/{userId}": { "delete": { "operationId": "MfaController_resetUser", "parameters": [ { "name": "userId", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Two-factor auth reset" } }, "summary": "Reset a user’s two-factor auth (admin, lockout recovery)", "tags": ["mfa"] } }, "/super-admin/orgs/{orgId}/sso": { "get": { "operationId": "SuperAdminSsoConnectionsController_get", "parameters": [ { "name": "orgId", "required": true, "in": "path", "schema": { "format": "uuid", "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrgSsoConnectionResourceDto" } } } }, "403": { "description": "The requester is not a super admin" } }, "summary": "Get an organization SSO connection", "tags": ["Super Admin SSO Connections"] }, "put": { "operationId": "SuperAdminSsoConnectionsController_configure", "parameters": [ { "name": "orgId", "required": true, "in": "path", "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConfigureOrgSsoConnectionRequestDto" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrgSsoConnectionResourceDto" } } } }, "403": { "description": "The requester is not a super admin" } }, "summary": "Configure an organization SSO connection", "tags": ["Super Admin SSO Connections"] } }, "/super-admin/orgs/{orgId}/sso/enabled": { "patch": { "operationId": "SuperAdminSsoConnectionsController_setEnabled", "parameters": [ { "name": "orgId", "required": true, "in": "path", "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetOrgSsoEnabledRequestDto" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrgSsoConnectionResourceDto" } } } }, "403": { "description": "The requester is not a super admin" } }, "summary": "Enable or disable organization SSO", "tags": ["Super Admin SSO Connections"] } }, "/super-admin/orgs/{orgId}/sso/jit-provisioning": { "patch": { "operationId": "SuperAdminSsoConnectionsController_setJitProvisioning", "parameters": [ { "name": "orgId", "required": true, "in": "path", "schema": { "format": "uuid", "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SetOrgSsoStateRequestDto" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrgSsoConnectionResourceDto" } } } }, "403": { "description": "The requester is not a super admin" } }, "summary": "Enable or disable JIT user provisioning", "tags": ["Super Admin SSO Connections"] } }, "/auth/sso/discover": { "post": { "operationId": "SsoLoginController_discover", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DiscoverSsoDto" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SsoDiscoveryResponseDto" } } } } }, "summary": "Discover enabled SSO from a work email", "tags": ["SSO"] } }, "/auth/sso/organizations/{orgId}/start": { "get": { "operationId": "SsoLoginController_start", "parameters": [ { "name": "orgId", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "302": { "description": "Redirect to the identity broker" } }, "summary": "Start SSO for an enabled organization", "tags": ["SSO"] } }, "/auth/sso/link/start": { "post": { "operationId": "SsoLoginController_startLink", "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SsoAuthorizationResponseDto" } } } } }, "summary": "Start linking SSO to the current account", "tags": ["SSO"] } }, "/auth/sso/oidc/callback": { "get": { "operationId": "SsoLoginController_callback", "parameters": [], "responses": { "302": { "description": "Core session or MFA-pending cookie issued and redirected" } }, "summary": "Complete an organization-pinned SSO login", "tags": ["SSO"] } }, "/auth/sso/session/logout": { "post": { "operationId": "SsoLoginController_logout", "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SsoLogoutResponseDto" } } } } }, "summary": "Revoke the Core session and prepare broker logout", "tags": ["SSO"] } }, "/auth/sso/oidc/backchannel-logout": { "post": { "operationId": "SsoLoginController_backchannelLogout", "parameters": [], "requestBody": { "required": true, "content": { "application/x-www-form-urlencoded": { "schema": { "$ref": "#/components/schemas/SsoBackchannelLogoutRequestDto" } } } }, "responses": { "200": { "description": "Matching Core SSO sessions revoked" } }, "summary": "Process a signed broker back-channel logout", "tags": ["SSO"] } } }, "info": { "title": "Ayunis Core API", "description": "The Ayunis Core API description", "version": "1.0", "contact": {} }, "tags": [ { "name": "ayunis", "description": "" } ], "servers": [], "components": { "schemas": { "IsCloudResponseDto": { "type": "object", "properties": { "isCloud": { "type": "boolean", "description": "Whether the deployment is running in a cloud environment", "example": true }, "isRegistrationDisabled": { "type": "boolean", "description": "Whether new user registration is disabled", "example": false } }, "required": ["isCloud", "isRegistrationDisabled"] }, "FeatureTogglesResponseDto": { "type": "object", "properties": { "knowledgeBasesEnabled": { "type": "boolean", "description": "Whether the standalone knowledge bases feature is enabled", "example": true }, "letterheadsEnabled": { "type": "boolean", "description": "Whether the letterheads feature is enabled", "example": false }, "skillsEnabled": { "type": "boolean", "description": "Whether the skills feature is enabled", "example": false }, "workspacesEnabled": { "type": "boolean", "description": "Whether the workspaces feature is enabled", "example": false }, "agentRuntimeEnabled": { "type": "boolean", "description": "Whether runs use the independent agent runtime", "example": false } }, "required": [ "knowledgeBasesEnabled", "letterheadsEnabled", "skillsEnabled", "workspacesEnabled", "agentRuntimeEnabled" ] }, "UserResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "User unique identifier", "example": "123e4567-e89b-12d3-a456-426614174000", "format": "uuid" }, "name": { "type": "string", "description": "User name", "example": "John Doe" }, "email": { "type": "string", "description": "User email address", "example": "john.doe@example.com" }, "role": { "type": "string", "description": "User role", "enum": ["admin", "manager", "user"], "example": "user" }, "orgId": { "type": "string", "description": "Organization ID the user belongs to", "example": "123e4567-e89b-12d3-a456-426614174001", "format": "uuid" }, "department": { "type": "string", "description": "Department the user belongs to", "example": "hauptamt", "nullable": true }, "createdAt": { "format": "date-time", "type": "string", "description": "Date when the user was created", "example": "2024-01-15T10:30:00Z" } }, "required": ["id", "name", "email", "role", "orgId", "createdAt"] }, "PaginationDto": { "type": "object", "properties": { "limit": { "type": "number", "description": "Maximum number of items per page", "example": 50 }, "offset": { "type": "number", "description": "Number of items to skip", "example": 0 }, "total": { "type": "number", "description": "Total number of items available", "example": 150 } }, "required": ["limit", "offset"] }, "PaginatedUsersListResponseDto": { "type": "object", "properties": { "data": { "description": "Array of users for the current page", "type": "array", "items": { "$ref": "#/components/schemas/UserResponseDto" } }, "pagination": { "description": "Pagination metadata", "allOf": [ { "$ref": "#/components/schemas/PaginationDto" } ] } }, "required": ["data", "pagination"] }, "UpdateUserRoleDto": { "type": "object", "properties": { "role": { "type": "string", "description": "New role for the user", "enum": ["admin", "manager", "user"], "example": "admin" } }, "required": ["role"] }, "UpdateUserNameDto": { "type": "object", "properties": { "name": { "type": "string", "description": "New name for the user", "example": "John Doe", "minLength": 1, "maxLength": 100 } }, "required": ["name"] }, "UpdatePasswordDto": { "type": "object", "properties": { "currentPassword": { "type": "string", "description": "Current password for verification", "example": "currentPassword123", "minLength": 8 }, "newPassword": { "type": "string", "description": "New password", "example": "newPassword123!", "minLength": 8 }, "newPasswordConfirmation": { "type": "string", "description": "Confirmation of the new password", "example": "newPassword123!", "minLength": 8 } }, "required": [ "currentPassword", "newPassword", "newPasswordConfirmation" ] }, "ConfirmEmailDto": { "type": "object", "properties": { "token": { "type": "string", "description": "JWT token for email confirmation", "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." } }, "required": ["token"] }, "ResendEmailConfirmationDto": { "type": "object", "properties": { "email": { "type": "string", "description": "Email address to resend confirmation to", "example": "user@example.com", "format": "email" } }, "required": ["email"] }, "ForgotPasswordDto": { "type": "object", "properties": { "email": { "type": "string", "description": "Email address to send password reset link to", "example": "user@example.com" } }, "required": ["email"] }, "ResetPasswordDto": { "type": "object", "properties": { "resetToken": { "type": "string", "description": "Password reset token from email", "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." }, "newPassword": { "type": "string", "description": "New password", "example": "newPassword123!", "minLength": 8 }, "newPasswordConfirmation": { "type": "string", "description": "Confirm new password", "example": "newPassword123!", "minLength": 8 } }, "required": ["resetToken", "newPassword", "newPasswordConfirmation"] }, "AdminUpdateUserDto": { "type": "object", "properties": { "name": { "type": "string", "description": "New name for the user", "example": "Maria Schmidt", "minLength": 1, "maxLength": 100 }, "email": { "type": "string", "description": "New email address for the user", "example": "maria.schmidt@gemeinde.de" } } }, "TriggerPasswordResetResponseDto": { "type": "object", "properties": { "resetUrl": { "type": "string", "description": "The password reset URL sent to the user", "example": "https://app.ayunis.de/password/reset?token=eyJhbGci..." } }, "required": ["resetUrl"] }, "CreateUserDto": { "type": "object", "properties": { "email": { "type": "string", "description": "Email address for the user", "example": "user@example.com" }, "name": { "type": "string", "description": "Name of the user", "example": "John Doe" }, "role": { "type": "string", "description": "Role for the user", "enum": ["admin", "manager", "user"], "example": "user" }, "sendActivationEmail": { "type": "boolean", "description": "Send the account activation (welcome) email to the new user", "example": true } }, "required": ["email", "name", "role", "sendActivationEmail"] }, "SuperAdminUserListItemResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "User unique identifier", "example": "123e4567-e89b-12d3-a456-426614174000", "format": "uuid" }, "name": { "type": "string", "description": "User name", "example": "John Doe" }, "email": { "type": "string", "description": "User email address", "example": "john.doe@example.com" }, "role": { "type": "string", "description": "User role", "enum": ["admin", "manager", "user"], "example": "user" }, "orgId": { "type": "string", "description": "Organization ID the user belongs to", "example": "123e4567-e89b-12d3-a456-426614174001", "format": "uuid" }, "department": { "type": "string", "description": "Department the user belongs to", "example": "hauptamt", "nullable": true }, "createdAt": { "format": "date-time", "type": "string", "description": "Date when the user was created", "example": "2024-01-15T10:30:00Z" }, "orgName": { "type": "string", "description": "Name of the organization the user belongs to", "example": "Stadt Beispiel" } }, "required": [ "id", "name", "email", "role", "orgId", "createdAt", "orgName" ] }, "PaginatedSuperAdminUsersListResponseDto": { "type": "object", "properties": { "data": { "description": "Array of users for the current page", "type": "array", "items": { "$ref": "#/components/schemas/SuperAdminUserListItemResponseDto" } }, "pagination": { "description": "Pagination metadata", "allOf": [ { "$ref": "#/components/schemas/PaginationDto" } ] } }, "required": ["data", "pagination"] }, "SuperAdminUserResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "User unique identifier", "example": "123e4567-e89b-12d3-a456-426614174000", "format": "uuid" }, "name": { "type": "string", "description": "User name", "example": "John Doe" }, "email": { "type": "string", "description": "User email address", "example": "john.doe@example.com" }, "role": { "type": "string", "description": "User role", "enum": ["admin", "manager", "user"], "example": "user" }, "orgId": { "type": "string", "description": "Organization ID the user belongs to", "example": "123e4567-e89b-12d3-a456-426614174001", "format": "uuid" }, "department": { "type": "string", "description": "Department the user belongs to", "example": "hauptamt", "nullable": true }, "createdAt": { "format": "date-time", "type": "string", "description": "Date when the user was created", "example": "2024-01-15T10:30:00Z" }, "systemRole": { "type": "string", "description": "System-level role of the user", "enum": ["customer", "super_admin"], "example": "super_admin" } }, "required": [ "id", "name", "email", "role", "orgId", "createdAt", "systemRole" ] }, "PromoteToSuperAdminDto": { "type": "object", "properties": { "email": { "type": "string", "description": "Email address of the user to promote to super admin", "example": "user@example.com" } }, "required": ["email"] }, "CreateInviteDto": { "type": "object", "properties": { "email": { "type": "string", "description": "Email address of the person to invite", "example": "user@example.com" }, "role": { "type": "string", "description": "Role to assign to the invited user", "enum": ["admin", "manager", "user"], "example": "user" } }, "required": ["email", "role"] }, "CreateInviteResponseDto": { "type": "object", "properties": { "url": { "type": "string", "description": "URL of the invite, returned when not using email configuration", "example": "https://example.com/invite/123e4567-e89b-12d3-a456-426614174000", "nullable": true } }, "required": ["url"] }, "CreateBulkInviteItemDto": { "type": "object", "properties": { "email": { "type": "string", "description": "Email address of the person to invite", "example": "user@example.com" }, "role": { "type": "string", "description": "Role to assign to the invited user", "enum": ["admin", "manager", "user"], "example": "user" } }, "required": ["email", "role"] }, "CreateBulkInvitesDto": { "type": "object", "properties": { "invites": { "description": "Array of invites to create", "maxItems": 500, "minItems": 1, "type": "array", "items": { "$ref": "#/components/schemas/CreateBulkInviteItemDto" } } }, "required": ["invites"] }, "BulkInviteResultDto": { "type": "object", "properties": { "email": { "type": "string", "description": "Email address of the invited user", "example": "user@example.com" }, "role": { "type": "string", "description": "Role assigned to the invited user", "enum": ["admin", "manager", "user"], "example": "user" }, "success": { "type": "boolean", "description": "Whether the invite was created successfully", "example": true }, "url": { "type": "string", "description": "Invitation URL (only populated when email configuration is unavailable)", "nullable": true, "example": "https://app.example.com/accept-invite?token=abc123" }, "errorCode": { "type": "string", "description": "Error code if the invite failed", "nullable": true, "example": "EMAIL_NOT_AVAILABLE" }, "errorMessage": { "type": "string", "description": "Error message if the invite failed", "nullable": true, "example": "Email is already registered" } }, "required": [ "email", "role", "success", "url", "errorCode", "errorMessage" ] }, "CreateBulkInvitesResponseDto": { "type": "object", "properties": { "totalCount": { "type": "number", "description": "Total number of invites in the request", "example": 10 }, "successCount": { "type": "number", "description": "Number of invites created successfully", "example": 8 }, "failureCount": { "type": "number", "description": "Number of invites that failed", "example": 2 }, "results": { "description": "Individual results for each invite", "type": "array", "items": { "$ref": "#/components/schemas/BulkInviteResultDto" } } }, "required": ["totalCount", "successCount", "failureCount", "results"] }, "InviteResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier of the invite", "example": "123e4567-e89b-12d3-a456-426614174000", "format": "uuid" }, "email": { "type": "string", "description": "Email address of the invited user", "example": "user@example.com" }, "role": { "type": "string", "description": "Role assigned to the invited user", "enum": ["admin", "manager", "user"], "example": "user" }, "status": { "type": "string", "description": "Current status of the invite", "enum": ["pending", "accepted", "expired"], "example": "pending" }, "sentDate": { "format": "date-time", "type": "string", "description": "Date when the invite was sent", "example": "2023-12-01T10:00:00Z" }, "expiresAt": { "format": "date-time", "type": "string", "description": "Date when the invite expires", "example": "2023-12-08T10:00:00Z" }, "acceptedAt": { "format": "date-time", "type": "string", "description": "Date when the invite was accepted (if applicable)", "example": "2023-12-02T15:30:00Z" } }, "required": ["id", "email", "role", "status", "sentDate", "expiresAt"] }, "PaginatedInvitesListResponseDto": { "type": "object", "properties": { "data": { "description": "Array of invites for the current page", "type": "array", "items": { "$ref": "#/components/schemas/InviteResponseDto" } }, "pagination": { "description": "Pagination metadata", "allOf": [ { "$ref": "#/components/schemas/PaginationDto" } ] } }, "required": ["data", "pagination"] }, "InviteDetailResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier of the invite", "example": "123e4567-e89b-12d3-a456-426614174000", "format": "uuid" }, "email": { "type": "string", "description": "Email address of the invited user", "example": "user@example.com" }, "role": { "type": "string", "description": "Role assigned to the invited user", "enum": ["admin", "manager", "user"], "example": "user" }, "status": { "type": "string", "description": "Current status of the invite", "enum": ["pending", "accepted", "expired"], "example": "pending" }, "sentDate": { "format": "date-time", "type": "string", "description": "Date when the invite was sent", "example": "2023-12-01T10:00:00Z" }, "expiresAt": { "format": "date-time", "type": "string", "description": "Date when the invite expires", "example": "2023-12-08T10:00:00Z" }, "acceptedAt": { "format": "date-time", "type": "string", "description": "Date when the invite was accepted (if applicable)", "example": "2023-12-02T15:30:00Z" }, "organizationName": { "type": "string", "description": "Name of the organization", "example": "Acme Corporation" } }, "required": [ "id", "email", "role", "status", "sentDate", "expiresAt", "organizationName" ] }, "AcceptInviteDto": { "type": "object", "properties": { "inviteToken": { "type": "string", "description": "JWT token from the invite", "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." }, "userName": { "type": "string", "description": "Name of the user accepting the invite", "example": "John Doe" }, "password": { "type": "string", "description": "Password of the user accepting the invite", "example": "password" }, "hasAcceptedMarketing": { "type": "boolean", "description": "Marketing acceptance", "example": true }, "department": { "type": "string", "description": "Department within the municipality", "example": "hauptamt" } }, "required": [ "inviteToken", "userName", "password", "hasAcceptedMarketing" ] }, "AcceptInviteResponseDto": { "type": "object", "properties": { "inviteId": { "type": "string", "description": "ID of the accepted invite", "example": "123e4567-e89b-12d3-a456-426614174000", "format": "uuid" }, "email": { "type": "string", "description": "Email of the user who accepted the invite", "example": "user@example.com" }, "orgId": { "type": "string", "description": "Organization ID the user was invited to", "example": "123e4567-e89b-12d3-a456-426614174000", "format": "uuid" } }, "required": ["inviteId", "email", "orgId"] }, "DeleteAllPendingInvitesResponseDto": { "type": "object", "properties": { "deletedCount": { "type": "number", "description": "Number of invites deleted" } }, "required": ["deletedCount"] }, "CreateOrgRequestDto": { "type": "object", "properties": { "name": { "type": "string", "description": "Organization display name", "example": "Acme Corporation" } }, "required": ["name"] }, "SuperAdminOrgResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "Organization unique identifier", "format": "uuid", "example": "123e4567-e89b-12d3-a456-426614174000" }, "name": { "type": "string", "description": "Organization display name", "example": "Acme Corporation" }, "createdAt": { "format": "date-time", "type": "string", "description": "Date when the organization was created", "example": "2024-01-15T10:30:00Z" } }, "required": ["id", "name", "createdAt"] }, "SuperAdminOrgListResponseDto": { "type": "object", "properties": { "data": { "description": "Array of organizations for the current page", "type": "array", "items": { "$ref": "#/components/schemas/SuperAdminOrgResponseDto" } }, "pagination": { "description": "Pagination metadata", "allOf": [ { "$ref": "#/components/schemas/PaginationDto" } ] } }, "required": ["data", "pagination"] }, "RolePermissionSetDto": { "type": "object", "properties": { "role": { "type": "string", "enum": ["admin", "manager", "user"] }, "permissions": { "type": "array", "items": { "type": "string", "enum": [ "manage_teams", "assign_users_to_teams", "manage_skills", "share_skills", "manage_knowledge_bases", "share_knowledge_bases" ] } } }, "required": ["role", "permissions"] }, "RolePermissionsResponseDto": { "type": "object", "properties": { "roles": { "description": "Granted permissions per configurable role. Admins implicitly hold all permissions and are omitted.", "type": "array", "items": { "$ref": "#/components/schemas/RolePermissionSetDto" } } }, "required": ["roles"] }, "UpdateRolePermissionsDto": { "type": "object", "properties": { "permissions": { "type": "array", "description": "Permissions granted to the role. Must contain at least one permission.", "items": { "type": "string", "enum": [ "manage_teams", "assign_users_to_teams", "manage_skills", "share_skills", "manage_knowledge_bases", "share_knowledge_bases" ] } } }, "required": ["permissions"] }, "MyPermissionsResponseDto": { "type": "object", "properties": { "permissions": { "type": "array", "description": "The current user's effective permissions (admins hold all of them)", "items": { "type": "string", "enum": [ "manage_teams", "assign_users_to_teams", "manage_skills", "share_skills", "manage_knowledge_bases", "share_knowledge_bases" ] } } }, "required": ["permissions"] }, "ActiveSubscriptionResponseDto": { "type": "object", "properties": { "hasActiveSubscription": { "type": "boolean", "description": "Whether the organization has an active subscription", "example": true }, "subscriptionType": { "type": "string", "description": "Type of the active subscription. Null when there is no active subscription or on self-hosted deployments.", "enum": ["SEAT_BASED", "USAGE_BASED"], "example": "SEAT_BASED", "nullable": true } }, "required": ["hasActiveSubscription", "subscriptionType"] }, "PriceResponseDto": { "type": "object", "properties": { "pricePerSeatMonthly": { "type": "number", "description": "Current price per seat per month in the configured currency", "example": 29.99 } }, "required": ["pricePerSeatMonthly"] }, "SubscriptionBillingInfoResponseDto": { "type": "object", "properties": { "companyName": { "type": "string", "description": "Company name", "example": "Acme GmbH" }, "street": { "type": "string", "description": "Street", "example": "Musterstraße" }, "houseNumber": { "type": "string", "description": "Number", "example": "123a" }, "city": { "type": "string", "description": "City", "example": "Musterstadt" }, "postalCode": { "type": "string", "description": "Postal code", "example": "12345" }, "country": { "type": "string", "description": "Country", "example": "Deutschland" }, "vatNumber": { "type": "string", "description": "USt-ID", "example": "DE1234567890" } }, "required": [ "companyName", "street", "houseNumber", "city", "postalCode", "country" ] }, "SubscriptionResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier of the subscription", "example": "123e4567-e89b-12d3-a456-426614174000", "format": "uuid" }, "createdAt": { "format": "date-time", "type": "string", "description": "Date when the subscription was created", "example": "2023-12-01T10:00:00Z" }, "updatedAt": { "format": "date-time", "type": "string", "description": "Date when the subscription was last updated", "example": "2023-12-01T10:00:00Z" }, "cancelledAt": { "type": "object", "description": "Date when the subscription was cancelled (if applicable)", "example": "2023-12-15T10:00:00Z" }, "startsAt": { "format": "date-time", "type": "string", "description": "Date when the subscription becomes active", "example": "2026-07-01T00:00:00Z" }, "orgId": { "type": "string", "description": "Organization ID associated with the subscription", "example": "123e4567-e89b-12d3-a456-426614174000", "format": "uuid" }, "type": { "type": "string", "description": "Subscription type", "enum": ["SEAT_BASED", "USAGE_BASED"], "example": "SEAT_BASED" }, "noOfSeats": { "type": "number", "description": "Number of seats in the subscription (seat-based only)", "example": 10 }, "pricePerSeat": { "type": "number", "description": "Price per seat in the subscription (seat-based only)", "example": 29.99 }, "renewalCycle": { "type": "string", "description": "Renewal cycle of the subscription (seat-based only)", "enum": ["monthly", "yearly"], "example": "monthly" }, "renewalCycleAnchor": { "format": "date-time", "type": "string", "description": "Date that serves as the anchor for renewal cycles (seat-based only)", "example": "2023-12-01T10:00:00Z" }, "monthlyCredits": { "type": "number", "description": "Monthly credit budget (usage-based only)", "example": 1000 }, "availableSeats": { "type": "number", "description": "Number of available seats (total seats minus invites, seat-based only)", "example": 3, "nullable": true }, "nextRenewalDate": { "format": "date-time", "type": "string", "description": "Date of the next renewal", "example": "2024-01-01T10:00:00Z" }, "billingInfo": { "description": "Billing information", "allOf": [ { "$ref": "#/components/schemas/SubscriptionBillingInfoResponseDto" } ] } }, "required": [ "id", "createdAt", "updatedAt", "startsAt", "orgId", "type", "nextRenewalDate", "billingInfo" ] }, "SubscriptionResponseDtoNullable": { "type": "object", "properties": { "subscription": { "description": "Subscription", "allOf": [ { "$ref": "#/components/schemas/SubscriptionResponseDto" } ] } } }, "CreateSubscriptionRequestDto": { "type": "object", "properties": { "companyName": { "type": "string", "description": "Company name for the subscription", "example": "Acme Inc." }, "street": { "type": "string", "description": "Street for the subscription", "example": "123 Main St" }, "houseNumber": { "type": "string", "description": "House number for the subscription", "example": "123" }, "postalCode": { "type": "string", "description": "Postal code for the subscription", "example": "12345" }, "city": { "type": "string", "description": "City for the subscription", "example": "New York" }, "country": { "type": "string", "description": "Country for the subscription", "example": "United States" }, "vatNumber": { "type": "string", "description": "VAT number for the subscription", "example": "1234567890" }, "type": { "type": "string", "description": "Subscription type. Defaults to SEAT_BASED if not specified.", "enum": ["SEAT_BASED", "USAGE_BASED"], "example": "SEAT_BASED", "default": "SEAT_BASED" }, "noOfSeats": { "type": "number", "description": "Number of seats for the subscription (seat-based only)", "example": 10, "minimum": 1, "default": 1 }, "monthlyCredits": { "type": "number", "description": "Monthly credit budget (usage-based only)", "example": 1000, "minimum": 1 }, "subText": { "type": "string", "description": "Sub text for the subscription", "example": "Sub text" }, "startsAt": { "type": "string", "description": "Start date for the subscription (ISO 8601). If omitted, the subscription starts immediately.", "example": "2026-07-01T00:00:00.000Z" } }, "required": [ "companyName", "street", "houseNumber", "postalCode", "city", "country" ] }, "ChangeSubscriptionRequestDto": { "type": "object", "properties": { "companyName": { "type": "string", "description": "Company name for the subscription", "example": "Acme Inc." }, "street": { "type": "string", "description": "Street for the subscription", "example": "123 Main St" }, "houseNumber": { "type": "string", "description": "House number for the subscription", "example": "123" }, "postalCode": { "type": "string", "description": "Postal code for the subscription", "example": "12345" }, "city": { "type": "string", "description": "City for the subscription", "example": "New York" }, "country": { "type": "string", "description": "Country for the subscription", "example": "United States" }, "vatNumber": { "type": "string", "description": "VAT number for the subscription", "example": "1234567890" }, "type": { "type": "string", "description": "Subscription type. Defaults to SEAT_BASED if not specified.", "enum": ["SEAT_BASED", "USAGE_BASED"], "example": "SEAT_BASED", "default": "SEAT_BASED" }, "noOfSeats": { "type": "number", "description": "Number of seats for the subscription (seat-based only)", "example": 10, "minimum": 1, "default": 1 }, "monthlyCredits": { "type": "number", "description": "Monthly credit budget (usage-based only)", "example": 1000, "minimum": 1 }, "subText": { "type": "string", "description": "Sub text for the subscription", "example": "Sub text" }, "startsAt": { "type": "string", "description": "Start date for the subscription (ISO 8601). If omitted, the subscription starts immediately.", "example": "2026-07-01T00:00:00.000Z" }, "oldSubscriptionDisposition": { "type": "string", "description": "How to handle the current subscription. CANCEL soft-cancels it (kept in history); DELETE removes it entirely. A new subscription is created with the provided data either way.", "enum": ["CANCEL", "DELETE"], "example": "CANCEL" } }, "required": [ "companyName", "street", "houseNumber", "postalCode", "city", "country", "oldSubscriptionDisposition" ] }, "UpdateBillingInfoDto": { "type": "object", "properties": { "companyName": { "type": "string", "description": "Company name for the subscription", "example": "Acme Inc." }, "street": { "type": "string", "description": "Street for the subscription", "example": "123 Main St" }, "houseNumber": { "type": "string", "description": "House number for the subscription", "example": "123" }, "postalCode": { "type": "string", "description": "Postal code for the subscription", "example": "12345" }, "city": { "type": "string", "description": "City for the subscription", "example": "New York" }, "country": { "type": "string", "description": "Country for the subscription", "example": "United States" }, "vatNumber": { "type": "string", "description": "VAT number for the subscription", "example": "1234567890" } }, "required": [ "companyName", "street", "houseNumber", "postalCode", "city", "country" ] }, "UpdateStartDateDto": { "type": "object", "properties": { "startsAt": { "type": "string", "description": "New subscription start date (ISO 8601)", "example": "2026-08-15T00:00:00.000Z" } }, "required": ["startsAt"] }, "UpdateMonthlyCreditsDto": { "type": "object", "properties": {} }, "UpdateSeatsDto": { "type": "object", "properties": {} }, "ModelWithConfigResponseDto": { "type": "object", "properties": { "modelId": { "type": "string", "description": "The id of the model" }, "permittedModelId": { "type": "string", "description": "The id of the model. Null if the model is not permitted.", "nullable": true }, "name": { "type": "string", "description": "The name of the model" }, "provider": { "type": "string", "enum": [ "openai", "anthropic", "bedrock", "mistral", "ollama", "synaforce", "ayunis", "otc", "azure", "gemini", "stackit", "scaleway" ], "description": "The provider of the model" }, "displayName": { "type": "string", "description": "The display name of the model" }, "type": { "type": "string", "enum": ["language", "embedding", "image-generation"], "description": "The type of the model" }, "canStream": { "type": "boolean", "description": "Whether the model can stream" }, "isReasoning": { "type": "boolean", "description": "Whether the model can reason" }, "canUseTools": { "type": "boolean", "description": "Whether the model can use tools" }, "canVision": { "type": "boolean", "description": "Whether the model supports vision (image processing)" }, "isPermitted": { "type": "boolean", "description": "Whether the model is permitted to be used" }, "isDefault": { "type": "boolean", "description": "Whether the model is the default model" }, "anonymousOnly": { "type": "boolean", "description": "Whether this model enforces anonymous mode. Null if not permitted.", "nullable": true }, "tier": { "type": "string", "enum": ["zero", "low", "medium", "high"], "description": "Fair-use tier label assigned by super admins; drives quota bucket selection. Undefined for embedding models and untiered language models.", "example": "medium" }, "description": { "type": "string", "description": "User-facing description of the model, shown in the model selector info card. Maintained by super admins." } }, "required": [ "modelId", "permittedModelId", "name", "provider", "displayName", "type", "canStream", "isReasoning", "canUseTools", "canVision", "isPermitted", "isDefault", "anonymousOnly" ] }, "ModelProviderInfoResponseDto": { "type": "object", "properties": { "provider": { "type": "string", "enum": [ "openai", "anthropic", "bedrock", "mistral", "ollama", "synaforce", "ayunis", "otc", "azure", "gemini", "stackit", "scaleway" ], "description": "The model provider identifier", "example": "openai" }, "displayName": { "type": "string", "description": "The display name of the model provider", "example": "OpenAI" }, "hostedIn": { "type": "string", "enum": ["DE", "EU", "US", "SELF_HOSTED", "AYUNIS"], "description": "The location where the provider hosts their services", "example": "US" } }, "required": ["provider", "displayName", "hostedIn"] }, "CreatePermittedModelDto": { "type": "object", "properties": { "modelId": { "type": "string", "description": "The id of the model", "example": "123e4567-e89b-12d3-a456-426614174000" }, "anonymousOnly": { "type": "boolean", "description": "Whether this model should enforce anonymous mode", "example": false, "default": false } }, "required": ["modelId"] }, "UpdatePermittedModelDto": { "type": "object", "properties": { "anonymousOnly": { "type": "boolean", "description": "Whether this model should enforce anonymous mode", "example": true } }, "required": ["anonymousOnly"] }, "PermittedLanguageModelResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "The id of the permitted model" }, "name": { "type": "string", "description": "The name of the model" }, "provider": { "type": "string", "enum": [ "openai", "anthropic", "bedrock", "mistral", "ollama", "synaforce", "ayunis", "otc", "azure", "gemini", "stackit", "scaleway" ], "description": "The provider of the model" }, "providerDisplayName": { "type": "string", "description": "The display name of the provider" }, "displayName": { "type": "string", "description": "The display name of the model" }, "isArchived": { "type": "boolean", "description": "Whether the model is archived" }, "modelId": { "type": "string", "description": "The catalog model UUID" }, "type": { "type": "string", "enum": ["language"], "description": "The type of the model (always language)" }, "canStream": { "type": "boolean", "description": "Whether the model can stream" }, "isReasoning": { "type": "boolean", "description": "Whether the model can reason" }, "canVision": { "type": "boolean", "description": "Whether the model supports vision (image processing)" }, "isDefault": { "type": "boolean", "description": "Whether this is the default model" }, "anonymousOnly": { "type": "boolean", "description": "Whether this model enforces anonymous mode" }, "tier": { "type": "string", "enum": ["zero", "low", "medium", "high"], "nullable": true, "description": "Resource-usage tier of the model, used to categorise models for the user (e.g. fast vs. powerful)" }, "description": { "type": "string", "nullable": true, "description": "User-facing description of the model, shown in the model selector info card. Maintained by super admins." } }, "required": [ "id", "name", "provider", "providerDisplayName", "displayName", "isArchived", "modelId", "type", "canStream", "isReasoning", "canVision", "isDefault", "anonymousOnly" ] }, "PermittedEmbeddingModelResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "The id of the permitted model" }, "name": { "type": "string", "description": "The name of the model" }, "provider": { "type": "string", "enum": [ "openai", "anthropic", "bedrock", "mistral", "ollama", "synaforce", "ayunis", "otc", "azure", "gemini", "stackit", "scaleway" ], "description": "The provider of the model" }, "providerDisplayName": { "type": "string", "description": "The display name of the provider" }, "displayName": { "type": "string", "description": "The display name of the model" }, "isArchived": { "type": "boolean", "description": "Whether the model is archived" }, "modelId": { "type": "string", "description": "The catalog model UUID" }, "type": { "type": "string", "enum": ["embedding"], "description": "The type of the model (always embedding)" }, "dimensions": { "type": "number", "description": "The number of dimensions for embeddings", "nullable": true }, "anonymousOnly": { "type": "boolean", "description": "Whether this model enforces anonymous mode" } }, "required": [ "id", "name", "provider", "providerDisplayName", "displayName", "isArchived", "modelId", "type", "dimensions", "anonymousOnly" ] }, "PermittedImageGenerationModelResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "The id of the permitted model" }, "name": { "type": "string", "description": "The name of the model" }, "provider": { "type": "string", "enum": [ "openai", "anthropic", "bedrock", "mistral", "ollama", "synaforce", "ayunis", "otc", "azure", "gemini", "stackit", "scaleway" ], "description": "The provider of the model" }, "providerDisplayName": { "type": "string", "description": "The display name of the provider" }, "displayName": { "type": "string", "description": "The display name of the model" }, "isArchived": { "type": "boolean", "description": "Whether the model is archived" }, "modelId": { "type": "string", "description": "The catalog model UUID" }, "type": { "type": "string", "enum": ["image-generation"], "description": "The type of the model (always image-generation)" }, "anonymousOnly": { "type": "boolean", "description": "Whether this model enforces anonymous mode" } }, "required": [ "id", "name", "provider", "providerDisplayName", "displayName", "isArchived", "modelId", "type", "anonymousOnly" ] }, "EmbeddingModelEnabledResponseDto": { "type": "object", "properties": { "isEmbeddingModelEnabled": { "type": "boolean", "description": "Whether the organization has an embedding model enabled", "example": true } }, "required": ["isEmbeddingModelEnabled"] }, "PermittedLanguageModelResponseDtoNullable": { "type": "object", "properties": { "permittedLanguageModel": { "description": "The permitted language model", "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/PermittedLanguageModelResponseDto" } ] } }, "required": ["permittedLanguageModel"] }, "SetUserDefaultModelDto": { "type": "object", "properties": { "permittedModelId": { "type": "string", "description": "The ID of the permitted model to set as default", "example": "123e4567-e89b-12d3-a456-426614174000" } }, "required": ["permittedModelId"] }, "SetOrgDefaultModelDto": { "type": "object", "properties": { "permittedModelId": { "type": "string", "description": "The ID of the permitted model to set as organization default", "example": "123e4567-e89b-12d3-a456-426614174000" } }, "required": ["permittedModelId"] }, "CreateTeamPermittedModelDto": { "type": "object", "properties": { "modelId": { "type": "string", "description": "The ID of the catalog model to permit for the team", "example": "123e4567-e89b-12d3-a456-426614174000" }, "anonymousOnly": { "type": "boolean", "description": "Whether this model should enforce anonymous mode", "example": false, "default": false } }, "required": ["modelId"] }, "SetTeamDefaultModelDto": { "type": "object", "properties": { "permittedModelId": { "type": "string", "description": "The ID of the team-scoped permitted model to set as the team default", "example": "123e4567-e89b-12d3-a456-426614174000" } }, "required": ["permittedModelId"] }, "LanguageModelResponseDto": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "description": "The unique identifier of the model", "example": "123e4567-e89b-12d3-a456-426614174000" }, "name": { "type": "string", "description": "The name of the model", "example": "gpt-4" }, "provider": { "type": "string", "enum": [ "openai", "anthropic", "bedrock", "mistral", "ollama", "synaforce", "ayunis", "otc", "azure", "gemini", "stackit", "scaleway" ], "description": "The provider of the model", "example": "openai" }, "displayName": { "type": "string", "description": "The display name of the model", "example": "GPT-4" }, "type": { "type": "string", "enum": ["language"], "description": "The type of the model (always language)" }, "isArchived": { "type": "boolean", "description": "Whether the model is archived", "example": false }, "canStream": { "type": "boolean", "description": "Whether the model supports streaming", "example": true }, "canUseTools": { "type": "boolean", "description": "Whether the model supports tool use", "example": true }, "isReasoning": { "type": "boolean", "description": "Whether the model has reasoning capabilities", "example": false }, "canVision": { "type": "boolean", "description": "Whether the model supports vision (image processing)", "example": false }, "createdAt": { "type": "string", "format": "date-time", "description": "The date the model was created" }, "updatedAt": { "type": "string", "format": "date-time", "description": "The date the model was last updated" }, "inputTokenCost": { "type": "number", "description": "Cost per million input tokens in EUR", "example": 3 }, "outputTokenCost": { "type": "number", "description": "Cost per million output tokens in EUR", "example": 15 }, "tier": { "type": "string", "enum": ["zero", "low", "medium", "high"], "description": "Fair-use tier label assigned by super admins; drives quota bucket selection. Optional today — runtime fallback for untiered models is tracked in AYC-109.", "example": "medium" }, "description": { "type": "string", "description": "User-facing description of the model, shown in the model selector info card. Maintained by super admins.", "example": "Geeignet für komplexe Aufgaben und lange Dokumente." } }, "required": [ "id", "name", "provider", "displayName", "type", "isArchived", "canStream", "canUseTools", "isReasoning", "canVision", "createdAt", "updatedAt" ] }, "EmbeddingModelResponseDto": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "description": "The unique identifier of the model", "example": "123e4567-e89b-12d3-a456-426614174000" }, "name": { "type": "string", "description": "The name of the model", "example": "text-embedding-3-small" }, "provider": { "type": "string", "enum": [ "openai", "anthropic", "bedrock", "mistral", "ollama", "synaforce", "ayunis", "otc", "azure", "gemini", "stackit", "scaleway" ], "description": "The provider of the model", "example": "openai" }, "displayName": { "type": "string", "description": "The display name of the model", "example": "Text Embedding 3 Small" }, "type": { "type": "string", "enum": ["embedding"], "description": "The type of the model (always embedding)" }, "isArchived": { "type": "boolean", "description": "Whether the model is archived", "example": false }, "dimensions": { "type": "number", "enum": [1024, 1536, 2560], "description": "The dimensions of the embedding", "example": 1536 }, "createdAt": { "type": "string", "format": "date-time", "description": "The date the model was created" }, "updatedAt": { "type": "string", "format": "date-time", "description": "The date the model was last updated" }, "inputTokenCost": { "type": "number", "description": "Cost per million input tokens in EUR", "example": 0.13 }, "outputTokenCost": { "type": "number", "description": "Cost per million output tokens in EUR", "example": 0 } }, "required": [ "id", "name", "provider", "displayName", "type", "isArchived", "dimensions", "createdAt", "updatedAt" ] }, "ImageGenerationModelResponseDto": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "description": "The unique identifier of the model", "example": "123e4567-e89b-12d3-a456-426614174000" }, "name": { "type": "string", "description": "The name of the model", "example": "gpt-image-1" }, "provider": { "type": "string", "enum": ["azure"], "description": "The provider of the model", "example": "azure" }, "displayName": { "type": "string", "description": "The display name of the model", "example": "GPT Image 1" }, "type": { "type": "string", "enum": ["image-generation"], "description": "The type of the model (always image-generation)" }, "isArchived": { "type": "boolean", "description": "Whether the model is archived", "example": false }, "createdAt": { "type": "string", "format": "date-time", "description": "The date the model was created" }, "updatedAt": { "type": "string", "format": "date-time", "description": "The date the model was last updated" }, "inputTokenCost": { "type": "number", "description": "Cost per million input tokens in EUR", "example": 5 }, "outputTokenCost": { "type": "number", "description": "Cost per million output tokens in EUR", "example": 40 } }, "required": [ "id", "name", "provider", "displayName", "type", "isArchived", "createdAt", "updatedAt" ] }, "CreateLanguageModelRequestDto": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the model", "example": "gpt-4" }, "provider": { "type": "string", "description": "The provider of the model", "enum": [ "openai", "anthropic", "bedrock", "mistral", "ollama", "synaforce", "ayunis", "otc", "azure", "gemini", "stackit", "scaleway" ], "example": "openai" }, "displayName": { "type": "string", "description": "The display name of the model", "example": "GPT-4" }, "canStream": { "type": "boolean", "description": "Whether the model supports streaming", "example": true }, "canUseTools": { "type": "boolean", "description": "Whether the model supports tool use", "example": true }, "isReasoning": { "type": "boolean", "description": "Whether the model has reasoning capabilities", "example": false }, "canVision": { "type": "boolean", "description": "Whether the model supports vision (image processing)", "example": false }, "isArchived": { "type": "boolean", "description": "Whether the model is archived", "example": false }, "inputTokenCost": { "type": "number", "description": "Cost per million input tokens in EUR", "example": 3, "minimum": 0 }, "outputTokenCost": { "type": "number", "description": "Cost per million output tokens in EUR", "example": 15, "minimum": 0 }, "tier": { "type": "string", "description": "Fair-use tier label assigned by super admins; drives which fair-use quota bucket the model consumes. Optional today — runtime fallback for untiered models is tracked in AYC-109.", "enum": ["zero", "low", "medium", "high"], "example": "medium" }, "description": { "type": "string", "description": "User-facing description of the model, shown in the model selector info card. Maintained by super admins.", "example": "Geeignet für komplexe Aufgaben und lange Dokumente.", "maxLength": 500 } }, "required": [ "name", "provider", "displayName", "canStream", "canUseTools", "isReasoning", "canVision", "isArchived" ] }, "UpdateLanguageModelRequestDto": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the model", "example": "gpt-4" }, "provider": { "type": "string", "description": "The provider of the model", "enum": [ "openai", "anthropic", "bedrock", "mistral", "ollama", "synaforce", "ayunis", "otc", "azure", "gemini", "stackit", "scaleway" ], "example": "openai" }, "displayName": { "type": "string", "description": "The display name of the model", "example": "GPT-4" }, "canStream": { "type": "boolean", "description": "Whether the model supports streaming", "example": true }, "canUseTools": { "type": "boolean", "description": "Whether the model supports tool use", "example": true }, "isReasoning": { "type": "boolean", "description": "Whether the model has reasoning capabilities", "example": false }, "canVision": { "type": "boolean", "description": "Whether the model supports vision (image processing)", "example": false }, "isArchived": { "type": "boolean", "description": "Whether the model is archived", "example": false }, "inputTokenCost": { "type": "number", "description": "Cost per million input tokens in EUR", "example": 3, "minimum": 0 }, "outputTokenCost": { "type": "number", "description": "Cost per million output tokens in EUR", "example": 15, "minimum": 0 }, "tier": { "type": "string", "description": "Fair-use tier label assigned by super admins; drives which fair-use quota bucket the model consumes. Optional today — runtime fallback for untiered models is tracked in AYC-109.", "enum": ["zero", "low", "medium", "high"], "example": "medium" }, "description": { "type": "string", "description": "User-facing description of the model, shown in the model selector info card. Maintained by super admins.", "example": "Geeignet für komplexe Aufgaben und lange Dokumente.", "maxLength": 500 } }, "required": [ "name", "provider", "displayName", "canStream", "canUseTools", "isReasoning", "canVision", "isArchived" ] }, "CreateEmbeddingModelRequestDto": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the model", "example": "text-embedding-3-small" }, "provider": { "type": "string", "description": "The provider of the model", "enum": [ "openai", "anthropic", "bedrock", "mistral", "ollama", "synaforce", "ayunis", "otc", "azure", "gemini", "stackit", "scaleway" ], "example": "openai" }, "displayName": { "type": "string", "description": "The display name of the model", "example": "Text Embedding 3 Small" }, "dimensions": { "type": "number", "description": "The dimensions of the embedding", "enum": [1024, 1536, 2560], "example": 1536 }, "isArchived": { "type": "boolean", "description": "Whether the model is archived", "example": false }, "inputTokenCost": { "type": "number", "description": "Cost per million input tokens in EUR", "example": 0.13, "minimum": 0 }, "outputTokenCost": { "type": "number", "description": "Cost per million output tokens in EUR", "example": 0, "minimum": 0 } }, "required": [ "name", "provider", "displayName", "dimensions", "isArchived" ] }, "UpdateEmbeddingModelRequestDto": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the model", "example": "text-embedding-3-small" }, "provider": { "type": "string", "description": "The provider of the model", "enum": [ "openai", "anthropic", "bedrock", "mistral", "ollama", "synaforce", "ayunis", "otc", "azure", "gemini", "stackit", "scaleway" ], "example": "openai" }, "displayName": { "type": "string", "description": "The display name of the model", "example": "Text Embedding 3 Small" }, "dimensions": { "type": "number", "description": "The dimensions of the embedding", "enum": [1024, 1536, 2560], "example": 1536 }, "isArchived": { "type": "boolean", "description": "Whether the model is archived", "example": false }, "inputTokenCost": { "type": "number", "description": "Cost per million input tokens in EUR", "example": 0.13, "minimum": 0 }, "outputTokenCost": { "type": "number", "description": "Cost per million output tokens in EUR", "example": 0, "minimum": 0 } }, "required": [ "name", "provider", "displayName", "dimensions", "isArchived" ] }, "CreateImageGenerationModelRequestDto": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the model", "example": "gpt-image-1" }, "provider": { "type": "string", "description": "The provider of the model. Image-generation models are Azure-only in v1.", "enum": ["azure"], "example": "azure" }, "displayName": { "type": "string", "description": "The display name of the model", "example": "GPT Image 1" }, "isArchived": { "type": "boolean", "description": "Whether the model is archived", "example": false }, "inputTokenCost": { "type": "number", "description": "Cost per million input tokens in EUR", "example": 5, "minimum": 0 }, "outputTokenCost": { "type": "number", "description": "Cost per million output tokens in EUR", "example": 40, "minimum": 0 } }, "required": ["name", "provider", "displayName", "isArchived"] }, "UpdateImageGenerationModelRequestDto": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the model", "example": "gpt-image-1" }, "provider": { "type": "string", "description": "The provider of the model. Image-generation models are Azure-only in v1.", "enum": ["azure"], "example": "azure" }, "displayName": { "type": "string", "description": "The display name of the model", "example": "GPT Image 1" }, "isArchived": { "type": "boolean", "description": "Whether the model is archived", "example": false }, "inputTokenCost": { "type": "number", "description": "Cost per million input tokens in EUR", "example": 5, "minimum": 0 }, "outputTokenCost": { "type": "number", "description": "Cost per million output tokens in EUR", "example": 40, "minimum": 0 } }, "required": ["name", "provider", "displayName", "isArchived"] }, "CreateTeamDto": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the team", "example": "Engineering" } }, "required": ["name"] }, "UpdateTeamDto": { "type": "object", "properties": { "name": { "type": "string", "description": "The new name of the team", "example": "Engineering" }, "modelOverrideEnabled": { "type": "boolean", "description": "Whether model access override is enabled for this team", "example": false } }, "required": ["name"] }, "TeamResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "The unique identifier of the team", "example": "550e8400-e29b-41d4-a716-446655440000" }, "name": { "type": "string", "description": "The name of the team", "example": "Engineering" }, "orgId": { "type": "string", "description": "The organization ID the team belongs to", "example": "550e8400-e29b-41d4-a716-446655440001" }, "createdAt": { "format": "date-time", "type": "string", "description": "The date and time when the team was created", "example": "2024-01-15T10:30:00.000Z" }, "updatedAt": { "format": "date-time", "type": "string", "description": "The date and time when the team was last updated", "example": "2024-01-15T10:30:00.000Z" }, "modelOverrideEnabled": { "type": "boolean", "description": "Whether model access override is enabled for this team", "example": false }, "memberCount": { "type": "number", "description": "The number of members in the team. Only populated by the admin list endpoint (GET /teams).", "example": 5 } }, "required": [ "id", "name", "orgId", "createdAt", "updatedAt", "modelOverrideEnabled" ] }, "TeamMemberResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "The unique identifier of the team member", "example": "550e8400-e29b-41d4-a716-446655440000" }, "userId": { "type": "string", "description": "The user ID of the team member", "example": "550e8400-e29b-41d4-a716-446655440001" }, "userName": { "type": "string", "description": "The name of the team member", "example": "John Doe" }, "userEmail": { "type": "string", "description": "The email of the team member", "example": "john.doe@example.com" }, "userRole": { "type": "string", "description": "The role of the team member in the organization", "enum": ["admin", "manager", "user"], "example": "user" }, "joinedAt": { "format": "date-time", "type": "string", "description": "The date when the user joined the team", "example": "2024-01-15T10:30:00.000Z" } }, "required": [ "id", "userId", "userName", "userEmail", "userRole", "joinedAt" ] }, "PaginatedTeamMembersResponseDto": { "type": "object", "properties": { "data": { "description": "Array of team members for the current page", "type": "array", "items": { "$ref": "#/components/schemas/TeamMemberResponseDto" } }, "pagination": { "description": "Pagination metadata", "allOf": [ { "$ref": "#/components/schemas/PaginationDto" } ] } }, "required": ["data", "pagination"] }, "AddTeamMemberDto": { "type": "object", "properties": { "userId": { "type": "string", "description": "The user ID to add to the team", "example": "550e8400-e29b-41d4-a716-446655440001" } }, "required": ["userId"] }, "ListTeamMembersQueryDto": { "type": "object", "properties": { "limit": { "type": "number", "description": "Maximum number of items per page", "example": 50, "default": 50 }, "offset": { "type": "number", "description": "Number of items to skip", "example": 0, "default": 0 } } }, "BulkAddTeamMembersDto": { "type": "object", "properties": { "userIds": { "description": "The user IDs to add to the team", "example": [ "550e8400-e29b-41d4-a716-446655440001", "550e8400-e29b-41d4-a716-446655440002" ], "type": "array", "items": { "type": "string" } } }, "required": ["userIds"] }, "TranscriptionResponseDto": { "type": "object", "properties": { "text": { "type": "string", "description": "The transcribed text from the audio file", "example": "Hello, this is a test transcription." } }, "required": ["text"] }, "CrawlDomainGrantResponseDto": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "orgId": { "type": "string", "format": "uuid" }, "domain": { "type": "string", "example": "intranet.customer.de" }, "createdAt": { "type": "string", "format": "date-time" } }, "required": ["id", "orgId", "domain", "createdAt"] }, "GrantCrawlDomainRequestDto": { "type": "object", "properties": { "domain": { "type": "string", "description": "The exact host to authorize for crawling by this organization. A full URL is accepted and reduced to its host.", "example": "intranet.customer.de" } }, "required": ["domain"] }, "CreateThreadDto": { "type": "object", "properties": { "modelId": { "type": "string", "description": "The id of the model", "example": "123e4567-e89b-12d3-a456-426614174000", "format": "uuid" }, "isAnonymous": { "type": "boolean", "description": "Enable anonymous mode for this thread", "example": false, "default": false }, "workspaceId": { "type": "string", "description": "File the new thread under this workspace", "example": "123e4567-e89b-12d3-a456-426614174000", "format": "uuid" } } }, "UserMessageResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier for the message", "example": "123e4567-e89b-12d3-a456-426614174000" }, "threadId": { "type": "string", "description": "Thread ID this message belongs to", "example": "123e4567-e89b-12d3-a456-426614174000" }, "createdAt": { "type": "string", "description": "Creation timestamp", "example": "2024-01-01T12:00:00.000Z" }, "role": { "type": "string", "description": "Role of the message sender", "example": "user", "enum": ["user"] }, "content": { "type": "array", "description": "Array of content items for user messages (text and/or images)", "items": { "oneOf": [ { "$ref": "#/components/schemas/TextMessageContentResponseDto" }, { "$ref": "#/components/schemas/ImageMessageContentResponseDto" } ] } } }, "required": ["id", "threadId", "createdAt", "role", "content"] }, "SystemMessageResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier for the message", "example": "123e4567-e89b-12d3-a456-426614174000" }, "threadId": { "type": "string", "description": "Thread ID this message belongs to", "example": "123e4567-e89b-12d3-a456-426614174000" }, "createdAt": { "type": "string", "description": "Creation timestamp", "example": "2024-01-01T12:00:00.000Z" }, "role": { "type": "string", "description": "Role of the message sender", "example": "system", "enum": ["system"] }, "content": { "type": "array", "description": "Array of text content items for system messages", "items": { "$ref": "#/components/schemas/TextMessageContentResponseDto" } } }, "required": ["id", "threadId", "createdAt", "role", "content"] }, "AssistantMessageResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier for the message", "example": "123e4567-e89b-12d3-a456-426614174000" }, "threadId": { "type": "string", "description": "Thread ID this message belongs to", "example": "123e4567-e89b-12d3-a456-426614174000" }, "createdAt": { "type": "string", "description": "Creation timestamp", "example": "2024-01-01T12:00:00.000Z" }, "role": { "type": "string", "description": "Role of the message sender", "example": "assistant", "enum": ["assistant"] }, "content": { "type": "array", "description": "Array of content items for assistant messages (text or tool use)", "items": { "oneOf": [ { "$ref": "#/components/schemas/TextMessageContentResponseDto" }, { "$ref": "#/components/schemas/ToolUseMessageContentResponseDto" }, { "$ref": "#/components/schemas/ThinkingMessageContentResponseDto" } ] } } }, "required": ["id", "threadId", "createdAt", "role", "content"] }, "ToolResultMessageResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier for the message", "example": "123e4567-e89b-12d3-a456-426614174000" }, "threadId": { "type": "string", "description": "Thread ID this message belongs to", "example": "123e4567-e89b-12d3-a456-426614174000" }, "createdAt": { "type": "string", "description": "Creation timestamp", "example": "2024-01-01T12:00:00.000Z" }, "role": { "type": "string", "description": "Role of the message sender", "example": "tool", "enum": ["tool"] }, "content": { "type": "array", "description": "Array of tool result content items for tool messages", "items": { "$ref": "#/components/schemas/ToolResultMessageContentResponseDto" } } }, "required": ["id", "threadId", "createdAt", "role", "content"] }, "TextMessageContentResponseDto": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the message content", "example": "text", "enum": ["text", "tool_use", "tool_result", "thinking", "image"] }, "text": { "type": "string", "description": "The text content of the message", "example": "Hello, how can I help you today?" }, "isSkillInstruction": { "type": "boolean", "description": "Whether this text content contains skill instructions", "example": false } }, "required": ["type", "text"] }, "ToolUseIntegrationDto": { "type": "object", "properties": { "id": { "type": "string", "description": "Integration ID", "example": "550e8400-e29b-41d4-a716-446655440000" }, "name": { "type": "string", "description": "Integration name", "example": "Weather Service" }, "logoUrl": { "type": "string", "description": "Integration logo URL", "example": "https://marketplace.ayunis.com/logos/weather.png", "nullable": true } }, "required": ["id", "name"] }, "ToolUseStreamDto": { "type": "object", "properties": { "status": { "type": "string", "description": "Transient lifecycle state of a streamed tool call", "enum": ["streaming", "invalid"], "example": "streaming" }, "argumentsJson": { "type": "string", "description": "Accumulated raw JSON arguments received from the model", "example": "{\"location\":\"New York\"}" } }, "required": ["status", "argumentsJson"] }, "ToolUseMessageContentResponseDto": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the message content", "example": "text", "enum": ["text", "tool_use", "tool_result", "thinking", "image"] }, "id": { "type": "string", "description": "Unique identifier for the tool call", "example": "call_abc123" }, "name": { "type": "string", "description": "Name of the tool being used", "example": "get_weather" }, "params": { "type": "object", "description": "Parameters passed to the tool", "example": { "location": "New York", "unit": "celsius" } }, "integration": { "description": "Integration metadata if this tool belongs to a marketplace integration", "allOf": [ { "$ref": "#/components/schemas/ToolUseIntegrationDto" } ] }, "stream": { "description": "Presentation-only stream state; absent from finalized valid tool calls", "allOf": [ { "$ref": "#/components/schemas/ToolUseStreamDto" } ] } }, "required": ["type", "id", "name", "params"] }, "ToolResultMessageContentResponseDto": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the message content", "example": "text", "enum": ["text", "tool_use", "tool_result", "thinking", "image"] }, "toolId": { "type": "string", "description": "Identifier of the tool call this result belongs to", "example": "call_abc123" }, "toolName": { "type": "string", "description": "Name of the tool that generated this result", "example": "get_weather" }, "result": { "type": "string", "description": "The result returned by the tool", "example": "The current temperature in New York is 22°C with partly cloudy skies." } }, "required": ["type", "toolId", "toolName", "result"] }, "ThinkingMessageContentResponseDto": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the message content", "example": "text", "enum": ["text", "tool_use", "tool_result", "thinking", "image"] }, "thinking": { "type": "string", "description": "The thinking content of the message", "example": "I am thinking about the best way to help you." } }, "required": ["type", "thinking"] }, "ImageMessageContentResponseDto": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the message content", "example": "text", "enum": ["text", "tool_use", "tool_result", "thinking", "image"] }, "index": { "type": "number", "description": "Zero-based index of the image within the message; download via GET /threads/:threadId/messages/:messageId/images/:index", "example": 0 }, "altText": { "type": "string", "description": "Optional alternative text for the image", "example": "Screenshot of the reported issue" } }, "required": ["type", "index"] }, "ModelResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "The ID of the model", "example": "123e4567-e89b-12d3-a456-426614174000" }, "name": { "type": "string", "description": "The name of the model", "example": "gpt-4o" }, "provider": { "type": "string", "description": "The provider of the model", "example": "mistral", "enum": [ "openai", "anthropic", "bedrock", "mistral", "ollama", "synaforce", "ayunis", "otc", "azure", "gemini", "stackit", "scaleway" ] }, "displayName": { "type": "string", "description": "The display name of the model", "example": "Mistral" }, "canStream": { "type": "boolean", "description": "Whether the model can stream", "example": true }, "isReasoning": { "type": "boolean", "description": "Whether the model can reason", "example": true } }, "required": [ "id", "name", "provider", "displayName", "canStream", "isReasoning" ] }, "SourceResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier for the source" }, "threadId": { "type": "string", "description": "Thread ID this source belongs to" }, "name": { "type": "string", "description": "Name of the source" }, "type": { "type": "string", "description": "Type of source", "enum": ["text", "data"] }, "createdBy": { "type": "string", "description": "Creator of the source", "enum": ["user", "llm", "system"] }, "status": { "type": "string", "description": "Processing status of the source", "enum": ["processing", "ready", "failed"] }, "processingError": { "type": "string", "description": "Error message if processing failed" }, "createdAt": { "type": "string", "description": "Creation timestamp" }, "updatedAt": { "type": "string", "description": "Last update timestamp" } }, "required": [ "id", "threadId", "name", "type", "createdBy", "status", "createdAt", "updatedAt" ] }, "FileSourceResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier for the source" }, "threadId": { "type": "string", "description": "Thread ID this source belongs to" }, "name": { "type": "string", "description": "Name of the source" }, "type": { "type": "string", "description": "Type of source", "enum": ["text", "data"] }, "createdBy": { "type": "string", "description": "Creator of the source", "enum": ["user", "llm", "system"] }, "status": { "type": "string", "description": "Processing status of the source", "enum": ["processing", "ready", "failed"] }, "processingError": { "type": "string", "description": "Error message if processing failed" }, "createdAt": { "type": "string", "description": "Creation timestamp" }, "updatedAt": { "type": "string", "description": "Last update timestamp" }, "textType": { "type": "string", "description": "Type of text", "enum": ["file", "web"] }, "fileType": { "type": "string", "description": "Type of file", "enum": ["pdf", "docx", "pptx", "txt", "eml", "audio"] } }, "required": [ "id", "threadId", "name", "type", "createdBy", "status", "createdAt", "updatedAt", "textType", "fileType" ] }, "UrlSourceResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier for the source" }, "threadId": { "type": "string", "description": "Thread ID this source belongs to" }, "name": { "type": "string", "description": "Name of the source" }, "type": { "type": "string", "description": "Type of source", "enum": ["text", "data"] }, "createdBy": { "type": "string", "description": "Creator of the source", "enum": ["user", "llm", "system"] }, "status": { "type": "string", "description": "Processing status of the source", "enum": ["processing", "ready", "failed"] }, "processingError": { "type": "string", "description": "Error message if processing failed" }, "createdAt": { "type": "string", "description": "Creation timestamp" }, "updatedAt": { "type": "string", "description": "Last update timestamp" }, "textType": { "type": "string", "description": "Type of text", "enum": ["file", "web"] }, "url": { "type": "string", "description": "URL of the source" } }, "required": [ "id", "threadId", "name", "type", "createdBy", "status", "createdAt", "updatedAt", "textType", "url" ] }, "CSVDataSourceResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier for the source" }, "threadId": { "type": "string", "description": "Thread ID this source belongs to" }, "name": { "type": "string", "description": "Name of the source" }, "type": { "type": "string", "description": "Type of source", "enum": ["text", "data"] }, "createdBy": { "type": "string", "description": "Creator of the source", "enum": ["user", "llm", "system"] }, "status": { "type": "string", "description": "Processing status of the source", "enum": ["processing", "ready", "failed"] }, "processingError": { "type": "string", "description": "Error message if processing failed" }, "createdAt": { "type": "string", "description": "Creation timestamp" }, "updatedAt": { "type": "string", "description": "Last update timestamp" }, "dataType": { "type": "string", "description": "Type of data", "enum": ["csv"] }, "data": { "type": "object", "description": "CSV data with headers and rows", "additionalProperties": false, "properties": { "headers": { "type": "array", "items": { "type": "string" }, "description": "Column headers" }, "rows": { "type": "array", "items": { "type": "array", "items": { "type": "string" } }, "description": "Data rows" } } } }, "required": [ "id", "threadId", "name", "type", "createdBy", "status", "createdAt", "updatedAt", "dataType", "data" ] }, "KnowledgeBaseSummaryResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier for the knowledge base", "example": "123e4567-e89b-12d3-a456-426614174000" }, "name": { "type": "string", "description": "Name of the knowledge base", "example": "Municipal Zoning Guidelines" } }, "required": ["id", "name"] }, "PiiCategory": { "type": "string", "enum": [ "person_name", "organization", "location", "email_address", "phone_number", "url_or_ip", "date_time", "financial_account", "government_id", "nationality_religion_politics", "other" ], "description": "PII category of the masked value" }, "PiiMaskResponseDto": { "type": "object", "properties": { "token": { "type": "string", "description": "The placeholder token as it appears in message text, e.g. {{pii:PERSON_NAME_1}}", "example": "{{pii:PERSON_NAME_1}}" }, "value": { "type": "string", "description": "The original value the token stands in for", "example": "Max Mustermann" }, "category": { "description": "PII category of the masked value", "example": "person_name", "allOf": [ { "$ref": "#/components/schemas/PiiCategory" } ] } }, "required": ["token", "value", "category"] }, "McpIntegrationSummaryResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier for the MCP integration", "example": "123e4567-e89b-12d3-a456-426614174000" }, "name": { "type": "string", "description": "Name of the MCP integration", "example": "OParl Council Data" }, "logoUrl": { "type": "string", "description": "Logo URL for marketplace integrations", "nullable": true, "example": "https://marketplace.ayunis.de/logos/oparl.png" } }, "required": ["id", "name"] }, "GetThreadResponseDto": { "type": "object", "properties": { "createdAt": { "type": "string", "description": "Creation timestamp", "example": "2024-01-01T12:00:00.000Z" }, "updatedAt": { "type": "string", "description": "Last update timestamp", "example": "2024-01-01T12:30:00.000Z" }, "isAnonymous": { "type": "boolean", "description": "Whether the thread is in anonymous mode (PII redaction enabled)", "example": false }, "workspaceId": { "type": "string", "description": "The workspace this thread is filed under, if any", "example": "123e4567-e89b-12d3-a456-426614174000", "nullable": true }, "id": { "type": "string", "description": "Unique identifier for the thread", "example": "123e4567-e89b-12d3-a456-426614174000" }, "userId": { "type": "string", "description": "User ID who owns this thread", "example": "123e4567-e89b-12d3-a456-426614174000" }, "permittedModelId": { "type": "string", "description": "Permitted model ID", "example": "123e4567-e89b-12d3-a456-426614174000" }, "title": { "type": "string", "description": "Title of the thread", "example": "Discussion about AI models" }, "messages": { "type": "array", "description": "Array of messages in the thread (role-specific types)", "items": { "oneOf": [ { "$ref": "#/components/schemas/UserMessageResponseDto" }, { "$ref": "#/components/schemas/SystemMessageResponseDto" }, { "$ref": "#/components/schemas/AssistantMessageResponseDto" }, { "$ref": "#/components/schemas/ToolResultMessageResponseDto" } ] } }, "sources": { "type": "array", "description": "Array of sources in the thread", "items": { "$ref": "#/components/schemas/SourceResponseDto" } }, "isLongChat": { "type": "boolean", "description": "Whether the thread has exceeded the token threshold for optimal performance", "example": false }, "knowledgeBases": { "description": "Knowledge bases attached to this thread", "type": "array", "items": { "$ref": "#/components/schemas/KnowledgeBaseSummaryResponseDto" } }, "piiMasks": { "description": "PII mask dictionary for anonymous threads — resolves {{pii:...}} tokens in message text to their original values. Empty for non-anonymous threads.", "type": "array", "items": { "$ref": "#/components/schemas/PiiMaskResponseDto" } }, "mcpIntegrations": { "description": "MCP integrations attached to this thread", "type": "array", "items": { "$ref": "#/components/schemas/McpIntegrationSummaryResponseDto" } } }, "required": [ "createdAt", "updatedAt", "isAnonymous", "workspaceId", "id", "userId", "permittedModelId", "messages", "sources", "isLongChat", "knowledgeBases", "piiMasks", "mcpIntegrations" ] }, "GetThreadsResponseDtoItem": { "type": "object", "properties": { "createdAt": { "type": "string", "description": "Creation timestamp", "example": "2024-01-01T12:00:00.000Z" }, "updatedAt": { "type": "string", "description": "Last update timestamp", "example": "2024-01-01T12:30:00.000Z" }, "isAnonymous": { "type": "boolean", "description": "Whether the thread is in anonymous mode (PII redaction enabled)", "example": false }, "workspaceId": { "type": "string", "description": "The workspace this thread is filed under, if any", "example": "123e4567-e89b-12d3-a456-426614174000", "nullable": true }, "id": { "type": "string", "description": "Unique identifier for the thread", "example": "123e4567-e89b-12d3-a456-426614174000" }, "title": { "type": "string", "description": "Title of the thread", "example": "Discussion about AI models" } }, "required": [ "createdAt", "updatedAt", "isAnonymous", "workspaceId", "id" ] }, "GetThreadsResponseDto": { "type": "object", "properties": { "data": { "description": "Array of threads for the current page", "type": "array", "items": { "$ref": "#/components/schemas/GetThreadsResponseDtoItem" } }, "pagination": { "description": "Pagination metadata", "allOf": [ { "$ref": "#/components/schemas/PaginationDto" } ] } }, "required": ["data", "pagination"] }, "UpdateThreadTitleDto": { "type": "object", "properties": { "title": { "type": "string", "description": "The new title for the thread", "example": "My conversation about AI", "minLength": 1, "maxLength": 200 } }, "required": ["title"] }, "AssignThreadWorkspaceDto": { "type": "object", "properties": { "workspaceId": { "type": "string", "description": "The workspace to file this thread under. Send null to remove it from its workspace.", "example": "123e4567-e89b-12d3-a456-426614174000", "format": "uuid", "nullable": true } }, "required": ["workspaceId"] }, "GeneratedImageUrlResponseDto": { "type": "object", "properties": { "url": { "type": "string", "description": "Presigned URL to access the generated image" }, "expiresAt": { "type": "string", "description": "ISO 8601 timestamp when the URL expires", "example": "2026-04-10T12:00:00.000Z" } }, "required": ["url", "expiresAt"] }, "CreateKnowledgeBaseDto": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the knowledge base", "example": "Stadtratsprotokolle 2025", "minLength": 1, "maxLength": 255 }, "description": { "type": "string", "description": "An optional description of the knowledge base", "example": "Sammlung aller Stadtratsprotokolle aus dem Jahr 2025", "maxLength": 2000 } }, "required": ["name"] }, "KnowledgeBaseResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "The unique identifier of the knowledge base", "example": "123e4567-e89b-12d3-a456-426614174000", "format": "uuid" }, "name": { "type": "string", "description": "The name of the knowledge base", "example": "Stadtratsprotokolle 2025" }, "description": { "type": "string", "description": "The description of the knowledge base", "example": "Sammlung aller Stadtratsprotokolle aus dem Jahr 2025" }, "createdAt": { "type": "string", "description": "The date and time when the knowledge base was created", "example": "2025-01-15T10:00:00.000Z", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date and time when the knowledge base was last updated", "example": "2025-01-15T10:00:00.000Z", "format": "date-time" }, "isShared": { "type": "boolean", "description": "Whether the knowledge base is shared with the current user (not owned). Only present when relevant (e.g., listing user knowledge bases).", "example": false } }, "required": ["id", "name", "description", "createdAt", "updatedAt"] }, "KnowledgeBaseListResponseDto": { "type": "object", "properties": { "data": { "description": "The list of knowledge bases", "type": "array", "items": { "$ref": "#/components/schemas/KnowledgeBaseResponseDto" } } }, "required": ["data"] }, "UpdateKnowledgeBaseDto": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the knowledge base", "example": "Stadtratsprotokolle 2025", "minLength": 1, "maxLength": 255 }, "description": { "type": "string", "description": "The description of the knowledge base", "example": "Sammlung aller Stadtratsprotokolle aus dem Jahr 2025", "maxLength": 2000 } } }, "KnowledgeBaseDocumentResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "The unique identifier of the document", "example": "123e4567-e89b-12d3-a456-426614174000", "format": "uuid" }, "name": { "type": "string", "description": "The name of the document", "example": "Protokoll_Stadtrat_2025-03.pdf" }, "type": { "type": "string", "description": "The type of the source", "enum": ["text", "data"], "example": "text" }, "createdBy": { "type": "string", "description": "Who created the source", "enum": ["user", "llm", "system"], "example": "user" }, "createdAt": { "type": "string", "description": "The date and time when the document was added", "example": "2025-01-15T10:00:00.000Z", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date and time when the document was last updated", "example": "2025-01-15T10:00:00.000Z", "format": "date-time" }, "status": { "type": "string", "description": "The processing status of the document", "enum": ["processing", "ready", "failed"], "example": "ready" }, "processingError": { "type": "string", "description": "Error message if processing failed (only present when status is failed)", "example": "OCR extraction timed out" }, "textType": { "type": "string", "description": "The text source subtype (e.g. file, web)", "enum": ["file", "web"], "example": "web" }, "url": { "type": "string", "description": "The URL of the source (only for web sources)", "example": "https://example.com/page" } }, "required": [ "id", "name", "type", "createdBy", "createdAt", "updatedAt", "status" ] }, "KnowledgeBaseDocumentListResponseDto": { "type": "object", "properties": { "data": { "description": "The list of documents in the knowledge base", "type": "array", "items": { "$ref": "#/components/schemas/KnowledgeBaseDocumentResponseDto" } } }, "required": ["data"] }, "AddUrlToKnowledgeBaseDto": { "type": "object", "properties": { "url": { "type": "string", "description": "The URL to crawl and add to the knowledge base", "example": "https://example.com/page" }, "maxDepth": { "type": "number", "description": "How many links deep to follow from the URL when crawling (0 = just this page, 1 = + linked pages, 2 = + their links). Only same-domain links are followed. Defaults to 0.", "minimum": 0, "maximum": 2, "default": 0, "example": 1 } }, "required": ["url"] }, "CreateSkillShareDto": { "type": "object", "properties": { "entityType": { "type": "string", "description": "Type of entity being shared", "enum": ["prompt", "skill", "knowledge_base"] }, "skillId": { "type": "string", "description": "ID of the skill to share", "format": "uuid" }, "teamId": { "type": "string", "description": "ID of the team to share with (if not provided, shares with entire organization)", "format": "uuid" } }, "required": ["entityType", "skillId"] }, "ShareResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier of the share", "format": "uuid" }, "entityType": { "type": "string", "description": "Type of entity being shared", "enum": ["prompt", "skill", "knowledge_base"] }, "entityId": { "type": "string", "description": "ID of the entity being shared", "format": "uuid" }, "scopeType": { "type": "string", "description": "Type of share scope (organization, user, or team)", "enum": ["org", "team"] }, "ownerId": { "type": "string", "description": "ID of the user who created the share", "format": "uuid" }, "teamId": { "type": "string", "description": "ID of the team (only present for team-scoped shares)", "format": "uuid" }, "teamName": { "type": "string", "description": "Name of the team (only present for team-scoped shares)" }, "createdAt": { "format": "date-time", "type": "string", "description": "When the share was created" }, "updatedAt": { "format": "date-time", "type": "string", "description": "When the share was last updated" } }, "required": [ "id", "entityType", "entityId", "scopeType", "ownerId", "createdAt", "updatedAt" ] }, "CreateKnowledgeBaseShareDto": { "type": "object", "properties": { "entityType": { "type": "string", "description": "Type of entity being shared", "enum": ["prompt", "skill", "knowledge_base"] }, "knowledgeBaseId": { "type": "string", "description": "ID of the knowledge base to share", "format": "uuid" }, "teamId": { "type": "string", "description": "ID of the team to share with (if not provided, shares with entire organization)", "format": "uuid" } }, "required": ["entityType", "knowledgeBaseId"] }, "InstallSkillFromMarketplaceDto": { "type": "object", "properties": { "identifier": { "type": "string", "description": "The unique identifier (slug) of the marketplace skill", "example": "meeting-summarizer" } }, "required": ["identifier"] }, "SkillResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "The unique identifier of the skill", "example": "123e4567-e89b-12d3-a456-426614174000", "format": "uuid" }, "name": { "type": "string", "description": "The name of the skill", "example": "Legal Research" }, "shortDescription": { "type": "string", "description": "A short description of the skill", "example": "Research legal topics, find relevant case law, and draft legal documents." }, "instructions": { "type": "string", "description": "Detailed instructions for the skill", "example": "You are a legal research assistant. When activated, search through the attached legal databases..." }, "marketplaceIdentifier": { "type": "string", "description": "The marketplace identifier if this skill was installed from the marketplace", "example": "meeting-summarizer", "nullable": true }, "isActive": { "type": "boolean", "description": "Whether the skill is active and available for use in chats", "example": true }, "userId": { "type": "string", "description": "The unique identifier of the user who owns this skill", "example": "123e4567-e89b-12d3-a456-426614174000", "format": "uuid" }, "createdAt": { "type": "string", "description": "The date and time when the skill was created", "example": "2023-12-01T10:00:00.000Z", "format": "date-time" }, "updatedAt": { "type": "string", "description": "The date and time when the skill was last updated", "example": "2023-12-01T10:00:00.000Z", "format": "date-time" }, "isShared": { "type": "boolean", "description": "Whether the skill is shared with the current user (not owned)", "example": false }, "isPinned": { "type": "boolean", "description": "Whether the skill is pinned for quick access in chat", "example": false }, "creatorName": { "type": "string", "description": "Display name of the user who shared this skill with the current user. Non-null only for shared skills whose creator can be resolved within the caller’s organisation; otherwise null.", "example": "Florian Obermeier", "nullable": true } }, "required": [ "id", "name", "shortDescription", "instructions", "marketplaceIdentifier", "isActive", "userId", "createdAt", "updatedAt", "isShared", "isPinned", "creatorName" ] }, "CreateSkillDto": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the skill (must be unique per user). No leading/trailing whitespace, no consecutive spaces, no control characters. Max 100 characters.", "example": "Legal Research", "minLength": 1, "maxLength": 100 }, "shortDescription": { "type": "string", "description": "A short description of the skill (shown in system prompt for LLM to decide activation)", "example": "Research legal topics, find relevant case law, and draft legal documents." }, "instructions": { "type": "string", "description": "Detailed instructions for the skill (injected when the skill is activated)", "example": "You are a legal research assistant. When activated, search through the attached legal databases..." }, "isActive": { "type": "boolean", "description": "Whether the skill is active (defaults to true)", "example": true } }, "required": ["name", "shortDescription", "instructions"] }, "UpdateSkillDto": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the skill (must be unique per user). No leading/trailing whitespace, no consecutive spaces, no control characters. Max 100 characters.", "example": "Legal Research", "minLength": 1, "maxLength": 100 }, "shortDescription": { "type": "string", "description": "A short description of the skill (shown in system prompt for LLM to decide activation)", "example": "Research legal topics, find relevant case law, and draft legal documents." }, "instructions": { "type": "string", "description": "Detailed instructions for the skill (injected when the skill is activated)", "example": "You are a legal research assistant. When activated, search through the attached legal databases..." } }, "required": ["name", "shortDescription", "instructions"] }, "SkillSourceResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "The unique identifier of the source", "example": "123e4567-e89b-12d3-a456-426614174000", "format": "uuid" }, "name": { "type": "string", "description": "The name of the source", "example": "Legal Database 2024" }, "type": { "type": "string", "description": "The type of source", "example": "file" }, "status": { "type": "string", "description": "Processing status of the source", "enum": ["processing", "ready", "failed"], "example": "ready" }, "processingError": { "type": "string", "description": "Error message if processing failed", "example": "OCR extraction timed out" }, "createdAt": { "type": "string", "description": "The date and time when the source was created", "example": "2025-01-15T10:00:00.000Z", "format": "date-time" } }, "required": ["id", "name", "type", "status", "createdAt"] }, "McpIntegrationResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier of the integration", "example": "123e4567-e89b-12d3-a456-426614174000" }, "name": { "type": "string", "description": "Name of the integration", "example": "Production Test Integration" }, "type": { "type": "string", "description": "Type of integration", "enum": ["predefined", "custom", "marketplace"], "example": "predefined" }, "slug": { "type": "string", "description": "Predefined integration slug (only for predefined integrations)", "example": "TEST" }, "serverUrl": { "type": "string", "description": "Custom server URL (only for custom integrations)", "example": "https://my-server.com/mcp" }, "enabled": { "type": "boolean", "description": "Whether the integration is enabled", "example": true }, "organizationId": { "type": "string", "description": "Organization that owns this integration", "example": "123e4567-e89b-12d3-a456-426614174001" }, "authMethod": { "type": "string", "description": "Authentication method used", "enum": ["NO_AUTH", "BEARER_TOKEN", "CUSTOM_HEADER", "OAUTH"], "example": "BEARER_TOKEN" }, "authHeaderName": { "type": "string", "description": "Custom auth header name", "example": "Authorization" }, "hasCredentials": { "type": "boolean", "description": "Whether credentials are configured (never exposes actual credentials)", "example": true }, "connectionStatus": { "type": "string", "description": "Connection status of the integration", "enum": ["connected", "disconnected", "error", "unknown"], "example": "connected" }, "lastConnectionError": { "type": "string", "description": "Last error message if connection failed", "example": "Failed to reach server: Connection timeout" }, "lastConnectionCheck": { "format": "date-time", "type": "string", "description": "Timestamp of the last connection check", "example": "2025-10-28T14:30:00.000Z" }, "createdAt": { "format": "date-time", "type": "string", "description": "Timestamp when the integration was created", "example": "2025-10-28T10:00:00.000Z" }, "updatedAt": { "format": "date-time", "type": "string", "description": "Timestamp when the integration was last updated", "example": "2025-10-28T12:30:00.000Z" }, "returnsPii": { "type": "boolean", "description": "Whether tools from this integration may return PII data that should be anonymized in anonymous mode", "example": true }, "marketplaceIdentifier": { "type": "string", "description": "Marketplace integration identifier (only for marketplace integrations)", "example": "oparl-council-data" }, "configSchema": { "type": "object", "description": "Configuration schema for marketplace and schema-configured custom integrations" }, "oauthClientConfigured": { "type": "boolean", "description": "Whether a static OAuth client has been configured" }, "hasUserFields": { "type": "boolean", "description": "Whether this integration has user-level config fields", "example": false }, "userAuthorizationRequired": { "type": "boolean", "description": "Whether this integration requires each individual user to provide their own credentials before they can use it (has required user-level fields).", "example": true }, "userAuthorized": { "type": "boolean", "description": "Whether the current user has satisfied the per-user authorization requirement. Only populated on per-user endpoints (e.g. the available integrations list); undefined elsewhere.", "example": false }, "orgConfigValues": { "type": "object", "description": "Current org-level config values for schema-configured integrations. Non-secret fields contain plaintext values. Secret fields are masked with \"••••••\".", "example": { "endpointUrl": "https://example.com/api", "apiToken": "••••••" } }, "logoUrl": { "type": "string", "description": "Logo URL for marketplace integrations", "nullable": true, "example": "https://marketplace.ayunis.com/logos/oparl.png" }, "description": { "type": "string", "description": "Human-readable description of the integration (populated from marketplace shortDescription or predefined config description)", "example": "Access municipal council data via OParl" } }, "required": [ "id", "name", "type", "enabled", "organizationId", "hasCredentials", "createdAt", "updatedAt", "returnsPii" ] }, "McpOAuthAuthorizationUrlDto": { "type": "object", "properties": { "authorizationUrl": { "type": "string", "format": "uri" } }, "required": ["authorizationUrl"] }, "CompleteMcpOAuthDto": { "type": "object", "properties": { "state": { "type": "string" }, "code": { "type": "string" }, "iss": { "type": "string" }, "error": { "type": "string" } }, "required": ["state"] }, "McpOAuthCompleteResponseDto": { "type": "object", "properties": { "integrationId": { "type": "string", "format": "uuid" } }, "required": ["integrationId"] }, "ConfigValueDto": { "type": "object", "properties": { "name": { "type": "string", "description": "The name/type of the credential field", "enum": ["token", "clientId", "clientSecret"], "example": "token" }, "value": { "type": "string", "description": "The value for this credential field (will be encrypted)", "example": "sk_test_123abc" } }, "required": ["name", "value"] }, "CreatePredefinedIntegrationDto": { "type": "object", "properties": { "slug": { "type": "string", "description": "The predefined integration slug", "example": "TEST", "enum": ["TEST", "LOCABOO", "LEGAL_CODES"] }, "configValues": { "description": "List of config values for credential fields", "example": [ { "name": "token", "value": "sk_test_123abc" } ], "type": "array", "items": { "$ref": "#/components/schemas/ConfigValueDto" } }, "returnsPii": { "type": "boolean", "description": "Whether tools from this integration may return PII data that should be anonymized in anonymous mode. Defaults to true for safety.", "example": true, "default": true } }, "required": ["slug", "configValues"] }, "CustomMcpConfigFieldDto": { "type": "object", "properties": { "key": { "type": "string", "example": "personalToken" }, "label": { "type": "string", "example": "Personal access token" }, "type": { "type": "string", "enum": ["text", "url", "secret"], "example": "secret" }, "headerName": { "type": "string", "example": "Authorization" }, "prefix": { "type": "string", "example": "Bearer " }, "required": { "type": "boolean", "example": true }, "help": { "type": "string", "example": "Create a token in your profile." } }, "required": ["key", "label", "type", "headerName", "required"] }, "CustomMcpOAuthConfigDto": { "type": "object", "properties": { "clientRegistration": { "type": "string", "enum": ["automatic", "static"], "example": "automatic" }, "scopes": { "example": ["documents:read"], "type": "array", "items": { "type": "string" } } }, "required": ["clientRegistration"] }, "CustomMcpConfigSchemaDto": { "type": "object", "properties": { "authType": { "type": "string", "enum": ["CUSTOM", "OAUTH"], "example": "CUSTOM" }, "orgFields": { "type": "array", "items": { "$ref": "#/components/schemas/CustomMcpConfigFieldDto" } }, "userFields": { "type": "array", "items": { "$ref": "#/components/schemas/CustomMcpConfigFieldDto" } }, "oauth": { "$ref": "#/components/schemas/CustomMcpOAuthConfigDto" } }, "required": ["authType", "orgFields", "userFields"] }, "McpOAuthClientDto": { "type": "object", "properties": { "clientId": { "type": "string", "example": "ayunis-core-client" }, "clientSecret": { "type": "string", "example": "client-secret" } }, "required": ["clientId"] }, "CreateCustomIntegrationDto": { "type": "object", "properties": { "name": { "type": "string", "example": "My Custom MCP Server" }, "serverUrl": { "type": "string", "example": "https://my-mcp-server.example.com/mcp" }, "configSchema": { "$ref": "#/components/schemas/CustomMcpConfigSchemaDto" }, "oauthClient": { "$ref": "#/components/schemas/McpOAuthClientDto" }, "orgConfigValues": { "type": "object", "additionalProperties": { "type": "string" }, "example": { "tenantId": "council-42" } }, "returnsPii": { "type": "boolean", "example": true, "default": true } }, "required": ["name", "serverUrl", "configSchema", "orgConfigValues"] }, "CredentialFieldDto": { "type": "object", "properties": { "label": { "type": "string", "description": "User-friendly label for the credential field", "example": "Locaboo 3 API Token" }, "type": { "type": "string", "description": "Input type (text or password)", "enum": ["token", "clientId", "clientSecret"], "example": "token" }, "required": { "type": "boolean", "description": "Whether this field is required", "example": true }, "help": { "type": "string", "description": "Help text to guide users", "example": "Your Locaboo 3 API token will be used to authenticate with Locaboo 4" } }, "required": ["label", "type", "required"] }, "PredefinedConfigResponseDto": { "type": "object", "properties": { "slug": { "type": "string", "description": "Unique slug identifier for the predefined integration", "example": "LOCABOO" }, "displayName": { "type": "string", "description": "Display name for the integration", "example": "Locaboo 4" }, "description": { "type": "string", "description": "Description of what this integration provides", "example": "Connect to Locaboo 4 booking system" }, "authType": { "type": "string", "description": "Authentication method for this integration", "enum": ["NO_AUTH", "BEARER_TOKEN", "API_KEY", "OAUTH"], "example": "BEARER_TOKEN" }, "authHeaderName": { "type": "string", "description": "HTTP header name for authentication (if applicable)", "example": "Authorization" }, "credentialFields": { "description": "Credential fields required for this integration", "type": "array", "items": { "$ref": "#/components/schemas/CredentialFieldDto" } } }, "required": ["slug", "displayName", "description", "authType"] }, "UpdateMcpIntegrationDto": { "type": "object", "properties": { "name": { "type": "string", "description": "The new name for the integration", "example": "Updated Integration Name", "minLength": 1, "maxLength": 255 }, "credentials": { "type": "string", "description": "Authentication credentials (will be encrypted). Provide to rotate the stored secret/token.", "example": "new-secret-value-123" }, "authHeaderName": { "type": "string", "description": "Custom auth header name. Only used in combination with CUSTOM_HEADER integrations.", "example": "X-API-Key" }, "returnsPii": { "type": "boolean", "description": "Whether tools from this integration may return PII data that should be anonymized in anonymous mode.", "example": true }, "orgConfigValues": { "type": "object", "description": "Organization-level config values for schema-configured integrations. For secret fields, omit or send empty string to keep the existing value.", "example": { "endpointUrl": "https://example.com/api" } }, "oauthClient": { "$ref": "#/components/schemas/McpOAuthClientDto" } } }, "InstallMarketplaceIntegrationDto": { "type": "object", "properties": { "identifier": { "type": "string", "description": "Marketplace integration identifier", "example": "oparl-council-data" }, "orgConfigValues": { "type": "object", "description": "Organization-level configuration values (key-value pairs matching config schema orgFields)", "example": { "oparlEndpointUrl": "https://rim.ekom21.de/oparl/v1" }, "additionalProperties": { "type": "string" } }, "returnsPii": { "type": "boolean", "description": "Whether tools from this integration may return PII data that should be anonymized in anonymous mode", "example": false }, "oauthClient": { "$ref": "#/components/schemas/McpOAuthClientDto" } }, "required": ["identifier", "orgConfigValues"] }, "UserConfigResponseDto": { "type": "object", "properties": { "hasConfig": { "type": "boolean", "description": "Whether the user has configured values for this integration", "example": true }, "configValues": { "type": "object", "description": "Configuration values with secret values masked (keys present, values replaced with \"••••••\")", "example": { "personalToken": "••••••" }, "additionalProperties": { "type": "string" } } }, "required": ["hasConfig", "configValues"] }, "SetUserConfigDto": { "type": "object", "properties": { "configValues": { "type": "object", "description": "User-level configuration values (key-value pairs matching config schema userFields)", "example": { "personalToken": "my-personal-access-token" }, "additionalProperties": { "type": "string" } } }, "required": ["configValues"] }, "ValidationResponseDto": { "type": "object", "properties": { "valid": { "type": "boolean", "description": "Whether the integration validation succeeded", "example": true }, "capabilities": { "type": "object", "description": "Discovered capabilities from the MCP server", "example": { "tools": 5, "resources": 3, "prompts": 2 } }, "error": { "type": "string", "description": "Error message if validation failed", "example": "Connection timeout" } }, "required": ["valid", "capabilities"] }, "McpOAuthClientMetadataDto": { "type": "object", "properties": { "client_id": { "type": "string", "format": "uri" }, "client_name": { "type": "string" }, "client_uri": { "type": "string", "format": "uri" }, "redirect_uris": { "type": "array", "items": { "type": "string", "format": "uri" } }, "grant_types": { "type": "array", "items": { "type": "string", "enum": ["authorization_code", "refresh_token"] } }, "response_types": { "type": "array", "items": { "type": "string", "enum": ["code"] } }, "token_endpoint_auth_method": { "type": "string", "enum": ["none"] }, "application_type": { "type": "string", "enum": ["web"] } }, "required": [ "client_id", "client_name", "client_uri", "redirect_uris", "grant_types", "response_types", "token_endpoint_auth_method", "application_type" ] }, "MarketplaceConfigResponseDto": { "type": "object", "properties": { "enabled": { "type": "boolean", "description": "Whether the marketplace feature is enabled", "example": true }, "url": { "type": "string", "description": "URL of the marketplace service, exposed so the frontend can link to it. Null when the feature is disabled.", "nullable": true, "example": "https://marketplace.example.com" } }, "required": ["enabled"] }, "MarketplaceSkillResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "Skill UUID" }, "identifier": { "type": "string", "description": "Unique identifier (slug)" }, "name": { "type": "string", "description": "Display name" }, "shortDescription": { "type": "string", "description": "Short description for marketplace display" }, "aiDescription": { "type": "string", "description": "Description shown to LLM to decide activation" }, "instructions": { "type": "string", "description": "Detailed instructions injected into the conversation when the skill is activated" }, "skillCategoryId": { "type": "string", "description": "Skill category ID", "nullable": true }, "iconUrl": { "type": "string", "description": "Icon URL", "nullable": true }, "featured": { "type": "boolean", "description": "Whether the skill is featured" }, "published": { "type": "boolean", "description": "Whether the skill is published" }, "preInstalled": { "type": "boolean", "description": "Whether the skill is pre-installed" }, "createdAt": { "type": "string", "description": "Creation timestamp" }, "updatedAt": { "type": "string", "description": "Last update timestamp" } }, "required": [ "id", "identifier", "name", "shortDescription", "aiDescription", "instructions", "featured", "published", "preInstalled", "createdAt", "updatedAt" ] }, "MarketplaceIntegrationConfigFieldDto": { "type": "object", "properties": { "key": { "type": "string", "description": "Unique identifier within the schema" }, "label": { "type": "string", "description": "Display label for the frontend form" }, "type": { "type": "string", "description": "Field type", "enum": ["text", "url", "secret"] }, "headerName": { "type": "string", "description": "HTTP header name this field maps to; if absent, field is internal config", "nullable": true }, "prefix": { "type": "string", "description": "Optional prefix prepended to the value before sending", "nullable": true }, "required": { "type": "boolean", "description": "Whether the field must be provided" }, "help": { "type": "string", "description": "Optional help text for the frontend form", "nullable": true }, "value": { "type": "string", "description": "Fixed value from marketplace; if set, field is not shown in forms", "nullable": true } }, "required": ["key", "label", "type", "required"] }, "MarketplaceIntegrationConfigSchemaDto": { "type": "object", "properties": { "authType": { "type": "string", "description": "Auth type for documentation/UI purposes" }, "orgFields": { "description": "Fields configured by org admin at install time", "type": "array", "items": { "$ref": "#/components/schemas/MarketplaceIntegrationConfigFieldDto" } }, "userFields": { "description": "Fields configured by individual users", "type": "array", "items": { "$ref": "#/components/schemas/MarketplaceIntegrationConfigFieldDto" } } }, "required": ["authType", "orgFields", "userFields"] }, "MarketplaceIntegrationResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "Integration UUID" }, "identifier": { "type": "string", "description": "Unique identifier (slug)" }, "name": { "type": "string", "description": "Display name" }, "shortDescription": { "type": "string", "description": "Short description for marketplace display" }, "description": { "type": "string", "description": "Full description" }, "iconName": { "type": "string", "description": "Lucide icon name", "nullable": true }, "logoUrl": { "type": "string", "description": "Absolute URL to the integration logo image", "nullable": true }, "integrationCategoryId": { "type": "string", "description": "Category UUID from the marketplace", "nullable": true }, "serverUrl": { "type": "string", "description": "MCP server URL" }, "configSchema": { "description": "Configuration schema (authType, orgFields, userFields, oauth)", "allOf": [ { "$ref": "#/components/schemas/MarketplaceIntegrationConfigSchemaDto" } ] }, "featured": { "type": "boolean", "description": "Whether the integration is featured" }, "published": { "type": "boolean", "description": "Whether the integration is published" }, "preInstalled": { "type": "boolean", "description": "Whether the integration is pre-installed" }, "legalTextUrl": { "type": "string", "description": "URL to the legal text page the installer must confirm", "nullable": true }, "legalTextVersion": { "type": "string", "description": "Version of the legal text", "nullable": true }, "createdAt": { "type": "string", "description": "Creation timestamp" }, "updatedAt": { "type": "string", "description": "Last update timestamp" } }, "required": [ "id", "identifier", "name", "shortDescription", "description", "serverUrl", "configSchema", "featured", "published", "preInstalled", "createdAt", "updatedAt" ] }, "CreateWorkspaceDto": { "type": "object", "properties": { "name": { "type": "string", "description": "Name of the workspace", "example": "Bürgeranfragen" }, "description": { "type": "string", "description": "What the workspace is for", "example": "Anfragen von Bürgerinnen und Bürgern bündeln" }, "icon": { "type": "string", "description": "Key of the workspace icon from the client icon catalogue", "example": "landmark" }, "color": { "type": "string", "description": "Palette key or #rrggbb literal for the workspace colour", "example": "#6b5bd6" } }, "required": ["name"] }, "WorkspaceResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier of the workspace", "example": "123e4567-e89b-12d3-a456-426614174000" }, "name": { "type": "string", "description": "Name of the workspace", "example": "Bürgeranfragen" }, "description": { "type": "string", "description": "What the workspace is for", "example": "Anfragen von Bürgerinnen und Bürgern bündeln", "nullable": true }, "instruction": { "type": "string", "description": "Instructions that apply to every chat in the workspace", "example": "Answer with the tone and policies of the building department.", "nullable": true }, "icon": { "type": "string", "description": "Key of the workspace icon from the client icon catalogue", "example": "landmark" }, "color": { "type": "string", "description": "Palette key or #rrggbb literal for the workspace colour", "example": "#6b5bd6" }, "createdAt": { "type": "string", "description": "When the workspace was created", "example": "2026-08-11T10:00:00.000Z" }, "updatedAt": { "type": "string", "description": "When the workspace was last updated", "example": "2026-08-11T10:30:00.000Z" }, "chatCount": { "type": "number", "description": "Number of chats filed under the workspace (list responses only)", "example": 3 }, "lastActivityAt": { "type": "string", "description": "Later of the last edit and the most recent chat activity (list responses only)", "example": "2026-08-11T10:30:00.000Z" } }, "required": [ "id", "name", "description", "instruction", "icon", "color", "createdAt", "updatedAt" ] }, "WorkspaceListResponseDto": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/WorkspaceResponseDto" } }, "pagination": { "$ref": "#/components/schemas/PaginationDto" } }, "required": ["data", "pagination"] }, "UpdateWorkspaceDto": { "type": "object", "properties": { "name": { "type": "string", "description": "Name of the workspace", "example": "Bürgeranfragen" }, "description": { "type": "string", "description": "What the workspace is for. Send null to clear it.", "example": "Anfragen von Bürgerinnen und Bürgern bündeln", "nullable": true }, "icon": { "type": "string", "description": "Key of the workspace icon from the client icon catalogue", "example": "landmark" }, "color": { "type": "string", "description": "Palette key or #rrggbb literal for the workspace colour", "example": "#6b5bd6" } } }, "WorkspaceSkillResponseDto": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "shortDescription": { "type": "string" } }, "required": ["id", "name", "shortDescription"] }, "WorkspaceKnowledgeBaseResponseDto": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string", "nullable": true }, "documentCount": { "type": "number" } }, "required": ["id", "name", "description", "documentCount"] }, "WorkspaceDocumentResponseDto": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "type": { "type": "string", "enum": ["text", "data"] }, "createdBy": { "type": "string", "enum": ["user", "llm", "system"] }, "status": { "type": "string", "enum": ["processing", "ready", "failed"] }, "processingError": { "type": "string", "nullable": true }, "textType": { "type": "string", "enum": ["file", "web"] }, "url": { "type": "string" }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" } }, "required": [ "id", "name", "type", "createdBy", "status", "processingError", "createdAt", "updatedAt" ] }, "WorkspaceContextResponseDto": { "type": "object", "properties": { "instruction": { "type": "string", "nullable": true }, "skills": { "type": "array", "items": { "$ref": "#/components/schemas/WorkspaceSkillResponseDto" } }, "knowledgeBases": { "type": "array", "items": { "$ref": "#/components/schemas/WorkspaceKnowledgeBaseResponseDto" } }, "documents": { "type": "array", "items": { "$ref": "#/components/schemas/WorkspaceDocumentResponseDto" } } }, "required": ["instruction", "skills", "knowledgeBases", "documents"] }, "WorkspaceSkillCandidateResponseDto": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "shortDescription": { "type": "string" }, "isAttached": { "type": "boolean" } }, "required": ["id", "name", "shortDescription", "isAttached"] }, "WorkspaceSkillCandidateListResponseDto": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/WorkspaceSkillCandidateResponseDto" } }, "pagination": { "$ref": "#/components/schemas/PaginationDto" } }, "required": ["data", "pagination"] }, "WorkspaceKnowledgeBaseCandidateResponseDto": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "description": { "type": "string", "nullable": true }, "documentCount": { "type": "number" }, "isAttached": { "type": "boolean" } }, "required": ["id", "name", "description", "documentCount", "isAttached"] }, "WorkspaceKnowledgeBaseCandidateListResponseDto": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/WorkspaceKnowledgeBaseCandidateResponseDto" } }, "pagination": { "$ref": "#/components/schemas/PaginationDto" } }, "required": ["data", "pagination"] }, "WorkspaceSkillListResponseDto": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/WorkspaceSkillResponseDto" } }, "pagination": { "$ref": "#/components/schemas/PaginationDto" } }, "required": ["data", "pagination"] }, "WorkspaceKnowledgeBaseListResponseDto": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/WorkspaceKnowledgeBaseResponseDto" } }, "pagination": { "$ref": "#/components/schemas/PaginationDto" } }, "required": ["data", "pagination"] }, "WorkspaceDocumentListResponseDto": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/WorkspaceDocumentResponseDto" } }, "pagination": { "$ref": "#/components/schemas/PaginationDto" } }, "required": ["data", "pagination"] }, "UpdateWorkspaceInstructionDto": { "type": "object", "properties": { "instruction": { "type": "string", "description": "Instructions that apply to every chat in the workspace", "nullable": true, "maxLength": 10000 } }, "required": ["instruction"] }, "WorkspaceFavoriteResponseDto": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "position": { "type": "number", "minimum": 0 }, "referenceId": { "type": "string", "format": "uuid" }, "referenceType": { "type": "string", "enum": ["workspace"] }, "name": { "type": "string" }, "icon": { "type": "string" }, "color": { "type": "string" } }, "required": [ "id", "position", "referenceId", "referenceType", "name", "icon", "color" ] }, "ThreadFavoriteResponseDto": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "position": { "type": "number", "minimum": 0 }, "referenceId": { "type": "string", "format": "uuid" }, "referenceType": { "type": "string", "enum": ["thread"] }, "name": { "type": "string", "nullable": true }, "workspaceId": { "type": "string", "format": "uuid", "nullable": true } }, "required": [ "id", "position", "referenceId", "referenceType", "name", "workspaceId" ] }, "ToggleFavoriteDto": { "type": "object", "properties": { "referenceType": { "type": "string", "enum": ["workspace", "thread"] }, "referenceId": { "type": "string", "format": "uuid" } }, "required": ["referenceType", "referenceId"] }, "ReorderFavoritesDto": { "type": "object", "properties": { "favoriteIds": { "type": "array", "items": { "type": "string", "format": "uuid" } } }, "required": ["favoriteIds"] }, "PiiWhitelistEntryDto": { "type": "object", "properties": { "category": { "description": "PII category exempt from anonymization", "example": "email_address", "allOf": [ { "$ref": "#/components/schemas/PiiCategory" } ] }, "pattern": { "type": "string", "description": "Optional regex; when set, only values fully matching it (case-insensitive) are exempt. Null exempts the whole category.", "example": ".*@muster-stadt\\.de", "nullable": true, "maxLength": 200 } }, "required": ["category", "pattern"] }, "PiiWhitelistResponseDto": { "type": "object", "properties": { "entries": { "description": "Current whitelist entries for the org", "type": "array", "items": { "$ref": "#/components/schemas/PiiWhitelistEntryDto" } } }, "required": ["entries"] }, "UpdatePiiWhitelistRequestDto": { "type": "object", "properties": { "entries": { "description": "Full replacement whitelist; an empty array removes all entries", "maxItems": 50, "type": "array", "items": { "$ref": "#/components/schemas/PiiWhitelistEntryDto" } } }, "required": ["entries"] }, "GlobalPiiWhitelistWordDto": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "category": { "allOf": [ { "$ref": "#/components/schemas/PiiCategory" } ] }, "word": { "type": "string", "description": "The word exempted from anonymization" }, "createdByEmail": { "type": "string", "nullable": true, "description": "Email of the super admin who added the word" }, "createdAt": { "format": "date-time", "type": "string" } }, "required": ["id", "category", "word", "createdByEmail", "createdAt"] }, "AddGlobalPiiWhitelistWordRequestDto": { "type": "object", "properties": { "category": { "allOf": [ { "$ref": "#/components/schemas/PiiCategory" } ] }, "word": { "type": "string", "description": "Plain word to exempt from anonymization (no patterns)", "maxLength": 200 } }, "required": ["category", "word"] }, "CreateSkillTemplateDto": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the skill template. No leading/trailing whitespace, no consecutive spaces, no control characters. Max 100 characters.", "example": "Legal Guidelines", "minLength": 1, "maxLength": 100 }, "shortDescription": { "type": "string", "description": "A short description of the skill template", "example": "Legal compliance instructions for all responses" }, "instructions": { "type": "string", "description": "The instructions for the skill template", "example": "Always follow legal guidelines when responding to user queries." }, "distributionMode": { "type": "string", "description": "The distribution mode of the skill template", "enum": ["always_on", "pre_created_copy"], "example": "always_on" }, "isActive": { "type": "boolean", "description": "Whether the skill template is active (defaults to false)", "example": false }, "defaultActive": { "type": "boolean", "description": "Whether copied skills should be active by default (only for pre_created_copy mode, defaults to false)", "example": false }, "defaultPinned": { "type": "boolean", "description": "Whether copied skills should be pinned by default (only for pre_created_copy mode, defaults to false)", "example": false } }, "required": [ "name", "shortDescription", "instructions", "distributionMode" ] }, "SkillTemplateResponseDto": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "description": "The unique identifier of the skill template", "example": "123e4567-e89b-12d3-a456-426614174000" }, "name": { "type": "string", "description": "The name of the skill template", "example": "Legal Guidelines" }, "shortDescription": { "type": "string", "description": "A short description of the skill template", "example": "Legal compliance instructions for all responses" }, "instructions": { "type": "string", "description": "The instructions for the skill template", "example": "Always follow legal guidelines when responding to user queries." }, "distributionMode": { "type": "string", "enum": ["always_on", "pre_created_copy"], "description": "The distribution mode of the skill template", "example": "always_on" }, "isActive": { "type": "boolean", "description": "Whether the skill template is active", "example": false }, "defaultActive": { "type": "boolean", "nullable": true, "description": "Whether copied skills are active by default (null for always_on templates)", "example": null }, "defaultPinned": { "type": "boolean", "nullable": true, "description": "Whether copied skills are pinned by default (null for always_on templates)", "example": null }, "createdAt": { "type": "string", "format": "date-time", "description": "The date the skill template was created" }, "updatedAt": { "type": "string", "format": "date-time", "description": "The date the skill template was last updated" } }, "required": [ "id", "name", "shortDescription", "instructions", "distributionMode", "isActive", "defaultActive", "defaultPinned", "createdAt", "updatedAt" ] }, "UpdateSkillTemplateDto": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the skill template. No leading/trailing whitespace, no consecutive spaces, no control characters. Max 100 characters.", "example": "Legal Guidelines", "minLength": 1, "maxLength": 100 }, "shortDescription": { "type": "string", "description": "A short description of the skill template", "example": "Legal compliance instructions for all responses" }, "instructions": { "type": "string", "description": "The instructions for the skill template", "example": "Always follow legal guidelines when responding to user queries." }, "distributionMode": { "type": "string", "description": "The distribution mode of the skill template", "enum": ["always_on", "pre_created_copy"], "example": "always_on" }, "isActive": { "type": "boolean", "description": "Whether the skill template is active", "example": true }, "defaultActive": { "type": "boolean", "description": "Whether copied skills should be active by default (only for pre_created_copy mode)", "example": false }, "defaultPinned": { "type": "boolean", "description": "Whether copied skills should be pinned by default (only for pre_created_copy mode)", "example": false } } }, "CreateArtifactDto": { "type": "object", "properties": { "title": { "type": "string", "description": "Title of the document", "example": "Meeting Notes Q1 2026" }, "content": { "type": "string", "description": "HTML content of the document", "example": "
Meeting notes content...
" }, "threadId": { "type": "string", "description": "The thread this artifact belongs to", "example": "123e4567-e89b-12d3-a456-426614174000", "format": "uuid" }, "authorType": { "type": "string", "description": "Who authored this version", "enum": ["USER", "ASSISTANT"], "example": "ASSISTANT" }, "letterheadId": { "type": "string", "description": "Optional letterhead to apply to this artifact", "example": "123e4567-e89b-12d3-a456-426614174000", "format": "uuid" } }, "required": ["title", "content", "threadId", "authorType"] }, "ArtifactVersionResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier of the version", "example": "123e4567-e89b-12d3-a456-426614174000" }, "artifactId": { "type": "string", "description": "The artifact this version belongs to", "example": "123e4567-e89b-12d3-a456-426614174000" }, "versionNumber": { "type": "number", "description": "Sequential version number", "example": 1 }, "content": { "type": "string", "description": "HTML content of this version", "example": "Document content...
" }, "authorType": { "type": "string", "description": "Who authored this version", "enum": ["USER", "ASSISTANT"], "example": "ASSISTANT" }, "authorId": { "type": "object", "description": "ID of the author (user ID if authored by user, null if AI)", "example": "123e4567-e89b-12d3-a456-426614174000", "nullable": true }, "createdAt": { "type": "string", "description": "When this version was created", "example": "2026-01-15T10:30:00.000Z" } }, "required": [ "id", "artifactId", "versionNumber", "content", "authorType", "createdAt" ] }, "ArtifactResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier of the artifact", "example": "123e4567-e89b-12d3-a456-426614174000" }, "type": { "type": "string", "description": "The kind of artifact — document (HTML) or diagram (mermaid)", "enum": ["document", "diagram", "spreadsheet"], "example": "document" }, "threadId": { "type": "string", "description": "The thread this artifact belongs to", "example": "123e4567-e89b-12d3-a456-426614174000" }, "userId": { "type": "string", "description": "The user who owns this artifact", "example": "123e4567-e89b-12d3-a456-426614174000" }, "title": { "type": "string", "description": "Title of the document", "example": "Meeting Notes Q1 2026" }, "letterheadId": { "type": "string", "description": "The letterhead applied to this artifact", "format": "uuid", "example": "123e4567-e89b-12d3-a456-426614174000", "nullable": true }, "currentVersionNumber": { "type": "number", "description": "Current version number", "example": 3 }, "versions": { "description": "All versions of this artifact (included when fetching by ID)", "type": "array", "items": { "$ref": "#/components/schemas/ArtifactVersionResponseDto" } }, "createdAt": { "type": "string", "description": "When the artifact was created", "example": "2026-01-15T10:00:00.000Z" }, "updatedAt": { "type": "string", "description": "When the artifact was last updated", "example": "2026-01-15T10:30:00.000Z" } }, "required": [ "id", "type", "threadId", "userId", "title", "currentVersionNumber", "createdAt", "updatedAt" ] }, "UpdateArtifactDto": { "type": "object", "properties": { "content": { "type": "string", "description": "Updated HTML content of the document. When omitted, no new version is created.", "example": "Updated meeting notes...
" }, "authorType": { "type": "string", "description": "Who authored this version. Required when content is provided.", "enum": ["USER", "ASSISTANT"], "example": "USER" }, "letterheadId": { "type": "string", "description": "Optional letterhead to apply to this artifact (null to remove)", "example": "123e4567-e89b-12d3-a456-426614174000", "format": "uuid", "nullable": true } } }, "ArtifactListResponseDto": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/ArtifactResponseDto" } }, "pagination": { "$ref": "#/components/schemas/PaginationDto" } }, "required": ["data", "pagination"] }, "RevertArtifactDto": { "type": "object", "properties": { "versionNumber": { "type": "number", "description": "The version number to revert to", "example": 1 } }, "required": ["versionNumber"] }, "CreateLetterheadDto": { "type": "object", "properties": { "name": { "type": "string", "description": "Name of the letterhead", "example": "Stadtverwaltung Musterstadt" }, "description": { "type": "string", "description": "Description of the letterhead (used by AI for context)", "example": "Offizielles Briefpapier der Stadtverwaltung" }, "firstPageMargins": { "type": "string", "description": "JSON string of { top, bottom, left, right } margins in mm" }, "continuationPageMargins": { "type": "string", "description": "JSON string of { top, bottom, left, right } margins in mm" } }, "required": ["name", "firstPageMargins", "continuationPageMargins"] }, "PageMarginsDto": { "type": "object", "properties": { "top": { "type": "number", "description": "Top margin in mm", "example": 55 }, "bottom": { "type": "number", "description": "Bottom margin in mm", "example": 20 }, "left": { "type": "number", "description": "Left margin in mm", "example": 25 }, "right": { "type": "number", "description": "Right margin in mm", "example": 15 } }, "required": ["top", "bottom", "left", "right"] }, "LetterheadResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier of the letterhead", "example": "123e4567-e89b-12d3-a456-426614174000" }, "name": { "type": "string", "description": "Name of the letterhead", "example": "Stadtverwaltung Musterstadt" }, "description": { "type": "string", "description": "Description of the letterhead", "example": "Offizielles Briefpapier der Stadtverwaltung", "nullable": true }, "firstPageMargins": { "description": "Margins for the first page in mm", "allOf": [ { "$ref": "#/components/schemas/PageMarginsDto" } ] }, "continuationPageMargins": { "description": "Margins for continuation pages in mm", "allOf": [ { "$ref": "#/components/schemas/PageMarginsDto" } ] }, "hasContinuationPage": { "type": "boolean", "description": "Whether a continuation page PDF is configured" }, "createdAt": { "type": "string", "description": "When the letterhead was created", "example": "2026-01-15T10:00:00.000Z" }, "updatedAt": { "type": "string", "description": "When the letterhead was last updated", "example": "2026-01-15T10:30:00.000Z" } }, "required": [ "id", "name", "firstPageMargins", "continuationPageMargins", "hasContinuationPage", "createdAt", "updatedAt" ] }, "UpdateLetterheadDto": { "type": "object", "properties": { "name": { "type": "string", "description": "Name of the letterhead", "example": "Stadtverwaltung Musterstadt — Neues Design" }, "description": { "type": "string", "description": "Description of the letterhead", "example": "Überarbeitetes Briefpapier 2026" }, "firstPageMargins": { "type": "string", "description": "JSON string of { top, bottom, left, right } margins in mm" }, "continuationPageMargins": { "type": "string", "description": "JSON string of { top, bottom, left, right } margins in mm" }, "removeContinuationPage": { "type": "string", "description": "Set to \"true\" to remove the continuation page PDF. Ignored if a new continuationPagePdf file is uploaded." } } }, "UsageConfigResponseDto": { "type": "object", "properties": { "isSelfHosted": { "type": "boolean", "description": "Whether the deployment is self-hosted. Determines feature availability.", "example": true } }, "required": ["isSelfHosted"] }, "CreditUsageResponseDto": { "type": "object", "properties": { "monthlyCredits": { "type": "number", "description": "Monthly credit budget from the usage-based subscription. Null if the org does not have a usage-based subscription.", "example": 10000, "nullable": true }, "creditsUsed": { "type": "number", "description": "Total credits consumed in the current calendar month.", "example": 4250.5 }, "creditsRemaining": { "type": "number", "description": "Credits remaining this month (monthlyCredits - creditsUsed). Null if the org does not have a usage-based subscription.", "example": 5749.5, "nullable": true } }, "required": ["monthlyCredits", "creditsUsed", "creditsRemaining"] }, "UserUsageDto": { "type": "object", "properties": { "userId": { "type": "string", "description": "User ID" }, "userName": { "type": "string", "description": "User name" }, "userEmail": { "type": "string", "description": "User email" }, "credits": { "type": "number", "description": "Total credits consumed by this user" }, "requests": { "type": "number", "description": "Total requests for this user" }, "lastActivity": { "type": "string", "format": "date-time", "description": "Last activity date (null if no activity)", "nullable": true }, "isActive": { "type": "boolean", "description": "Whether the user is considered active" } }, "required": [ "userId", "userName", "userEmail", "credits", "requests", "lastActivity", "isActive" ] }, "UserUsageResponseDto": { "type": "object", "properties": { "data": { "description": "User usage statistics", "type": "array", "items": { "$ref": "#/components/schemas/UserUsageDto" } }, "pagination": { "description": "Pagination metadata", "allOf": [ { "$ref": "#/components/schemas/PaginationDto" } ] }, "totalCredits": { "type": "number", "description": "Total credits consumed across all users in the filtered period" } }, "required": ["data", "pagination", "totalCredits"] }, "UsageStatsResponseDto": { "type": "object", "properties": { "totalCredits": { "type": "number", "description": "Total credits consumed across all users and models in the specified period", "example": 1250.5 }, "totalRequests": { "type": "number", "description": "Total number of API requests made in the specified period", "example": 3450 }, "activeUsers": { "type": "number", "description": "Number of users who made requests within the active user threshold (last 30 days)", "example": 42 }, "totalUsers": { "type": "number", "description": "Total number of unique users who made requests in the specified period", "example": 67 }, "topModels": { "description": "List of the most frequently used model names, ordered by usage", "example": ["gpt-4", "claude-3-sonnet", "gpt-3.5-turbo"], "type": "array", "items": { "type": "string" } } }, "required": [ "totalCredits", "totalRequests", "activeUsers", "totalUsers", "topModels" ] }, "ModelDistributionDto": { "type": "object", "properties": { "modelId": { "type": "string", "description": "Model ID" }, "modelName": { "type": "string", "description": "Model name" }, "displayName": { "type": "string", "description": "Model display name" }, "provider": { "type": "string", "enum": [ "openai", "anthropic", "bedrock", "mistral", "ollama", "synaforce", "ayunis", "otc", "azure", "gemini", "stackit", "scaleway" ], "description": "Model provider" }, "credits": { "type": "number", "description": "Total credits for this model" }, "requests": { "type": "number", "description": "Total requests for this model" }, "percentage": { "type": "number", "description": "Percentage of total usage" } }, "required": [ "modelId", "modelName", "displayName", "provider", "credits", "requests", "percentage" ] }, "ModelDistributionResponseDto": { "type": "object", "properties": { "models": { "description": "Model distribution statistics", "type": "array", "items": { "$ref": "#/components/schemas/ModelDistributionDto" } } }, "required": ["models"] }, "ProviderValuesDto": { "type": "object", "properties": { "openai": { "type": "number", "description": "Credits for OpenAI" }, "anthropic": { "type": "number", "description": "Credits for Anthropic" }, "mistral": { "type": "number", "description": "Credits for Mistral" }, "ollama": { "type": "number", "description": "Credits for Ollama" }, "synaforce": { "type": "number", "description": "Credits for Synaforce" }, "ayunis": { "type": "number", "description": "Credits for Ayunis (internal)" } } }, "ProviderTimeSeriesRowDto": { "type": "object", "properties": { "date": { "type": "string", "description": "Date of the data point", "format": "date-time" }, "values": { "description": "Credits per provider for this date", "allOf": [ { "$ref": "#/components/schemas/ProviderValuesDto" } ] } }, "required": ["date", "values"] }, "ProviderUsageChartResponseDto": { "type": "object", "properties": { "timeSeries": { "description": "Aligned time series rows by date with provider credit values", "type": "array", "items": { "$ref": "#/components/schemas/ProviderTimeSeriesRowDto" } } }, "required": ["timeSeries"] }, "TimeSeriesPointDto": { "type": "object", "properties": { "date": { "format": "date-time", "type": "string", "description": "Date of the data point" }, "credits": { "type": "number", "description": "Number of credits at this point" }, "requests": { "type": "number", "description": "Number of requests at this point" } }, "required": ["date", "credits", "requests"] }, "ProviderUsageDto": { "type": "object", "properties": { "provider": { "type": "string", "enum": [ "openai", "anthropic", "bedrock", "mistral", "ollama", "synaforce", "ayunis", "otc", "azure", "gemini", "stackit", "scaleway" ], "description": "Model provider" }, "credits": { "type": "number", "description": "Total credits for this provider" }, "requests": { "type": "number", "description": "Total requests for this provider" }, "percentage": { "type": "number", "description": "Percentage of total usage" }, "timeSeriesData": { "description": "Time series data for this provider", "type": "array", "items": { "$ref": "#/components/schemas/TimeSeriesPointDto" } } }, "required": [ "provider", "credits", "requests", "percentage", "timeSeriesData" ] }, "ProviderUsageResponseDto": { "type": "object", "properties": { "providers": { "description": "Provider usage statistics", "type": "array", "items": { "$ref": "#/components/schemas/ProviderUsageDto" } } }, "required": ["providers"] }, "CreditsPerEuroResponseDto": { "type": "object", "properties": { "creditsPerEuro": { "type": "number", "description": "Number of credits per euro of token cost", "example": 1000 } }, "required": ["creditsPerEuro"] }, "SetCreditsPerEuroRequestDto": { "type": "object", "properties": { "creditsPerEuro": { "type": "number", "description": "Number of credits per euro of token cost. Must be positive.", "example": 1000 } }, "required": ["creditsPerEuro"] }, "FairUseTierLimitDto": { "type": "object", "properties": { "limit": { "type": "number", "description": "Maximum number of messages allowed within the window", "example": 200 }, "windowMs": { "type": "number", "description": "Sliding window duration in milliseconds", "example": 10800000 } }, "required": ["limit", "windowMs"] }, "FairUseLimitsResponseDto": { "type": "object", "properties": { "zero": { "description": "Fair-use limit configured for zero-tier (unrestricted) models. Stored for UI symmetry only — runtime quota enforcement skips ZERO-tier models entirely, so this value is never consulted.", "allOf": [ { "$ref": "#/components/schemas/FairUseTierLimitDto" } ] }, "low": { "description": "Fair-use limit for low-tier (cheap) language models", "allOf": [ { "$ref": "#/components/schemas/FairUseTierLimitDto" } ] }, "medium": { "description": "Fair-use limit for medium-tier language models", "allOf": [ { "$ref": "#/components/schemas/FairUseTierLimitDto" } ] }, "high": { "description": "Fair-use limit for high-tier (expensive) language models", "allOf": [ { "$ref": "#/components/schemas/FairUseTierLimitDto" } ] }, "images": { "description": "Fair-use limit for image generation. Single global bucket (no tiering).", "allOf": [ { "$ref": "#/components/schemas/FairUseTierLimitDto" } ] } }, "required": ["zero", "low", "medium", "high", "images"] }, "SetFairUseLimitRequestDto": { "type": "object", "properties": { "tier": { "type": "string", "description": "Model tier whose fair-use limit is being updated", "enum": ["zero", "low", "medium", "high"], "example": "medium" }, "limit": { "type": "number", "description": "Maximum number of messages allowed within the sliding window. Must be a positive integer.", "example": 200, "minimum": 1 }, "windowMs": { "type": "number", "description": "Sliding window duration in milliseconds. Must be a positive integer.", "example": 10800000, "minimum": 1 } }, "required": ["tier", "limit", "windowMs"] }, "SetImageFairUseLimitRequestDto": { "type": "object", "properties": { "limit": { "type": "number", "description": "Maximum number of images allowed within the sliding window. Must be a positive integer.", "example": 50, "minimum": 1 }, "windowMs": { "type": "number", "description": "Sliding window duration in milliseconds. Must be a positive integer.", "example": 86400000, "minimum": 1 } }, "required": ["limit", "windowMs"] }, "SetAppAlertRequestDto": { "type": "object", "properties": { "enabled": { "type": "boolean", "description": "Whether to show the app-wide alert banner", "example": true }, "message": { "type": "string", "description": "The alert banner text. Required (non-empty) when enabled is true.", "example": "The system is currently experiencing degraded performance.", "maxLength": 1000 } }, "required": ["enabled", "message"] }, "AppAlertResponseDto": { "type": "object", "properties": { "enabled": { "type": "boolean", "description": "Whether the app-wide alert banner is currently shown", "example": true }, "message": { "type": "string", "description": "The alert banner text shown to all users", "example": "The system is currently experiencing degraded performance." } }, "required": ["enabled", "message"] }, "MessageContentResponseDto": { "type": "object", "properties": { "type": { "type": "string", "description": "Type of the message content", "example": "text", "enum": ["text", "tool_use", "tool_result", "thinking", "image"] } }, "required": ["type"] }, "RunSessionResponseDto": { "type": "object", "properties": { "type": { "type": "string", "description": "Response type identifier", "example": "session", "enum": ["session"] }, "success": { "type": "boolean", "description": "Indicates successful session establishment", "example": true }, "streaming": { "type": "boolean", "description": "Indicates if the session is streaming", "example": true }, "threadId": { "type": "string", "description": "Thread ID for the session", "example": "123e4567-e89b-12d3-a456-426614174000" }, "timestamp": { "type": "string", "description": "Session establishment timestamp", "example": "2024-01-01T12:00:00.000Z" } }, "required": ["type", "threadId", "timestamp"] }, "RunMessageResponseDto": { "type": "object", "properties": { "type": { "type": "string", "description": "Response type identifier", "example": "message", "enum": ["message"] }, "message": { "description": "The message data", "oneOf": [ { "$ref": "#/components/schemas/UserMessageResponseDto" }, { "$ref": "#/components/schemas/AssistantMessageResponseDto" }, { "$ref": "#/components/schemas/ToolResultMessageResponseDto" }, { "$ref": "#/components/schemas/SystemMessageResponseDto" } ] }, "threadId": { "type": "string", "description": "Thread ID for the message", "example": "123e4567-e89b-12d3-a456-426614174000" }, "timestamp": { "type": "string", "description": "Message timestamp", "example": "2024-01-01T12:00:00.000Z" } }, "required": ["type", "message", "threadId", "timestamp"] }, "RunErrorResponseDto": { "type": "object", "properties": { "type": { "type": "string", "description": "Response type identifier", "example": "error", "enum": ["error"] }, "message": { "type": "string", "description": "Error message", "example": "An error occurred while processing your request" }, "threadId": { "type": "string", "description": "Thread ID where the error occurred", "example": "123e4567-e89b-12d3-a456-426614174000" }, "timestamp": { "type": "string", "description": "Error timestamp", "example": "2024-01-01T12:00:00.000Z" }, "code": { "type": "string", "description": "Optional error code for categorization", "example": "EXECUTION_ERROR" }, "details": { "type": "object", "description": "Optional additional error details", "example": { "originalError": "Network timeout" } } }, "required": ["type", "message", "threadId", "timestamp"] }, "RunThreadResponseDto": { "type": "object", "properties": { "type": { "type": "string", "description": "Response type identifier", "example": "thread", "enum": ["thread"] }, "threadId": { "type": "string", "description": "Thread ID that was updated", "example": "123e4567-e89b-12d3-a456-426614174000" }, "updateType": { "type": "string", "description": "Type of thread update", "example": "title_updated", "enum": ["title_updated"] }, "title": { "type": "string", "description": "Updated thread title", "example": "Discussion about AI and machine learning" }, "timestamp": { "type": "string", "description": "Thread update timestamp", "example": "2024-01-01T12:00:00.000Z" } }, "required": ["type", "threadId", "updateType", "title", "timestamp"] }, "RunMasksResponseDto": { "type": "object", "properties": { "type": { "type": "string", "description": "Response type identifier", "example": "masks", "enum": ["masks"] }, "threadId": { "type": "string", "description": "Thread ID the mask dictionary belongs to", "example": "123e4567-e89b-12d3-a456-426614174000" }, "masks": { "description": "Full PII mask dictionary of the thread (idempotent to re-apply)", "type": "array", "items": { "$ref": "#/components/schemas/PiiMaskResponseDto" } }, "timestamp": { "type": "string", "description": "Event timestamp", "example": "2024-01-01T12:00:00.000Z" } }, "required": ["type", "threadId", "masks", "timestamp"] }, "TextInput": { "type": "object", "properties": { "type": { "type": "string", "description": "The type of input", "enum": ["text"], "example": "text" }, "text": { "type": "string", "description": "The text content for the inference", "example": "What is the weather forecast for New York tomorrow?" } }, "required": ["type", "text"] }, "ToolResultInput": { "type": "object", "properties": { "type": { "type": "string", "description": "The type of input", "enum": ["tool_result"], "example": "tool_result" }, "toolId": { "type": "string", "description": "The ID of the tool that produced this result", "example": "550e8400-e29b-41d4-a716-446655440000" }, "toolName": { "type": "string", "description": "The name of the tool that produced this result", "example": "weather_tool" }, "result": { "type": "string", "description": "The result data from the tool execution", "example": "{\"location\":\"New York\",\"forecast\":\"Partly cloudy with a high of 75°F and a low of 60°F\",\"precipitation\":\"20%\"}" } }, "required": ["type", "toolId", "toolName", "result"] }, "SendMessageDto": { "type": "object", "properties": { "threadId": { "type": "string", "description": "The thread to use for the inference.", "example": "550e8400-e29b-12d3-a456-426614174000" }, "text": { "type": "string", "description": "Text content of the user message (for user input)", "example": "What do you see in this image?" }, "imageAltTexts": { "type": "array", "description": "JSON array of alt texts matching the order of uploaded images", "items": { "type": "string" } }, "toolResult": { "description": "Tool result input (for tool_result type only)", "oneOf": [ { "$ref": "#/components/schemas/ToolResultInput" } ], "allOf": [ { "$ref": "#/components/schemas/ToolResultInput" } ] }, "skillId": { "type": "string", "description": "Skill ID to activate for this message — injects skill instructions and resources into the thread", "example": "550e8400-e29b-41d4-a716-446655440000" }, "streaming": { "type": "boolean", "description": "Enable streaming mode for real-time response updates", "example": true, "default": true } }, "required": ["threadId"] }, "SuperAdminTrialResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "Trial unique identifier", "format": "uuid", "example": "123e4567-e89b-12d3-a456-426614174000" }, "orgId": { "type": "string", "description": "Organization ID associated with this trial", "format": "uuid", "example": "123e4567-e89b-12d3-a456-426614174000" }, "messagesSent": { "type": "number", "description": "Number of messages sent in this trial", "example": 150, "minimum": 0 }, "maxMessages": { "type": "number", "description": "Maximum number of messages allowed in this trial", "example": 1000, "minimum": 1 }, "createdAt": { "format": "date-time", "type": "string", "description": "Date when the trial was created", "example": "2024-01-15T10:30:00Z" }, "updatedAt": { "format": "date-time", "type": "string", "description": "Date when the trial was last updated", "example": "2024-01-15T10:30:00Z" } }, "required": [ "id", "orgId", "messagesSent", "maxMessages", "createdAt", "updatedAt" ] }, "SuperAdminTrialResponseDtoNullable": { "type": "object", "properties": { "trial": { "description": "Trial", "allOf": [ { "$ref": "#/components/schemas/SuperAdminTrialResponseDto" } ] } } }, "CreateTrialRequestDto": { "type": "object", "properties": { "orgId": { "type": "string", "description": "Organization ID for which to create the trial", "format": "uuid", "example": "123e4567-e89b-12d3-a456-426614174000" }, "maxMessages": { "type": "number", "description": "Maximum number of messages allowed in the trial", "example": 1000, "minimum": 1 } }, "required": ["orgId", "maxMessages"] }, "UpdateTrialRequestDto": { "type": "object", "properties": { "maxMessages": { "type": "number", "description": "Maximum number of messages allowed in the trial", "example": 2000, "minimum": 1 }, "messagesSent": { "type": "number", "description": "Number of messages already sent (can be used to reset or adjust)", "example": 0, "minimum": 0 } } }, "UserCreditLimitItemDto": { "type": "object", "properties": { "userId": { "type": "string", "example": "550e8400-e29b-41d4-a716-446655440001" }, "name": { "type": "string", "example": "Jane Doe" }, "email": { "type": "string", "example": "jane.doe@example.com" }, "monthlyCredits": { "type": "number", "description": "Configured monthly credit limit", "example": 5000 }, "creditsUsed": { "type": "number", "description": "Credits consumed in the current calendar month", "example": 1240 } }, "required": ["userId", "name", "email", "monthlyCredits", "creditsUsed"] }, "TeamCreditLimitItemDto": { "type": "object", "properties": { "teamId": { "type": "string", "example": "550e8400-e29b-41d4-a716-446655440002" }, "name": { "type": "string", "example": "Engineering" }, "monthlyCredits": { "type": "number", "description": "Configured monthly credit limit", "example": 20000 }, "creditsUsed": { "type": "number", "description": "Credits consumed by all current team members in the current month", "example": 8300 } }, "required": ["teamId", "name", "monthlyCredits", "creditsUsed"] }, "SetCreditLimitDto": { "type": "object", "properties": { "monthlyCredits": { "type": "number", "description": "The monthly credit allowance. 0 freezes the target entirely; remove the limit to make the target unlimited within the org budget.", "example": 5000, "minimum": 0 } }, "required": ["monthlyCredits"] }, "UserCreditLimitResponseDto": { "type": "object", "properties": { "id": { "type": "string", "example": "550e8400-e29b-41d4-a716-446655440000" }, "monthlyCredits": { "type": "number", "example": 5000 }, "userId": { "type": "string", "example": "550e8400-e29b-41d4-a716-446655440001" } }, "required": ["id", "monthlyCredits", "userId"] }, "TeamCreditLimitResponseDto": { "type": "object", "properties": { "id": { "type": "string", "example": "550e8400-e29b-41d4-a716-446655440000" }, "monthlyCredits": { "type": "number", "example": 5000 }, "teamId": { "type": "string", "example": "550e8400-e29b-41d4-a716-446655440002" } }, "required": ["id", "monthlyCredits", "teamId"] }, "UserSystemPromptResponseDto": { "type": "object", "properties": { "systemPrompt": { "type": "string", "description": "The custom system prompt for the user, or null if not set", "example": "Always respond in bullet points. I work in the finance department.", "nullable": true } }, "required": ["systemPrompt"] }, "UpsertUserSystemPromptDto": { "type": "object", "properties": { "systemPrompt": { "type": "string", "description": "The custom system prompt for the user", "example": "Always respond in bullet points. I work in the finance department.", "maxLength": 10000 } }, "required": ["systemPrompt"] }, "GeneratePersonalizedSystemPromptDto": { "type": "object", "properties": { "preferredName": { "type": "string", "description": "The preferred name of the user", "example": "Maria", "maxLength": 200 }, "communicationStyle": { "type": "string", "description": "The preferred communication style", "example": "Locker & kurz", "maxLength": 500 }, "workContext": { "type": "string", "description": "The work context of the user", "example": "Bescheide im Sozialamt, Protokolle für den Gemeinderat", "maxLength": 1000 } }, "required": ["preferredName"] }, "GeneratePersonalizedSystemPromptResponseDto": { "type": "object", "properties": { "systemPrompt": { "type": "string", "description": "The generated personalized system prompt", "example": "Hallo Maria! Ich kommuniziere locker und kurz mit dir. Ich helfe dir bei allen Fragen rund um deine Arbeit im Sozialamt." }, "welcomeMessage": { "type": "string", "description": "A personalized welcome message for the user", "example": "Willkommen, Maria! Schön, dass du da bist. Wie kann ich dir heute helfen?" } }, "required": ["systemPrompt", "welcomeMessage"] }, "OrgSystemPromptResponseDto": { "type": "object", "properties": { "systemPrompt": { "type": "string", "description": "The organization-wide system prompt, or null if not set", "example": "All responses must comply with municipal communication guidelines.", "nullable": true } }, "required": ["systemPrompt"] }, "UpsertOrgSystemPromptDto": { "type": "object", "properties": { "systemPrompt": { "type": "string", "description": "The organization-wide system prompt", "example": "All responses must comply with municipal communication guidelines.", "maxLength": 10000 } }, "required": ["systemPrompt"] }, "OrgChatSettingsResponseDto": { "type": "object", "properties": { "internetSearchEnabled": { "type": "boolean", "description": "Whether internet access (web search and website content tools) is available to the AI assistant in chats", "example": true } }, "required": ["internetSearchEnabled"] }, "UpsertOrgChatSettingsDto": { "type": "object", "properties": { "internetSearchEnabled": { "type": "boolean", "description": "Whether internet access (web search and website content tools) is available to the AI assistant in chats", "example": true } }, "required": ["internetSearchEnabled"] }, "RetentionPolicyResponseDto": { "type": "object", "properties": { "retentionDays": { "type": "number", "description": "Configured retention window in days, or null when retention is disabled (data kept forever).", "nullable": true, "example": 90 }, "enabled": { "type": "boolean", "description": "Whether retention is currently enabled for the org.", "example": true }, "allowedRetentionDays": { "description": "Retention windows (in days) the admin may choose from. Lets the UI render the selector without hardcoding the allowlist.", "example": [30, 90, 180, 365, 730], "type": "array", "items": { "type": "number" } } }, "required": ["retentionDays", "enabled", "allowedRetentionDays"] }, "UpdateRetentionPolicyRequestDto": { "type": "object", "properties": { "retentionDays": { "type": "number", "description": "Days of inactivity after which conversation data is permanently deleted. Null disables retention (keep data forever). Must be one of the allowed windows.", "enum": [30, 90, 180, 365, 730], "nullable": true, "example": 90 } }, "required": ["retentionDays"] }, "CourseModuleResponseDto": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "description": "The unique identifier of the module" }, "chapterId": { "type": "string", "format": "uuid", "description": "The id of the chapter the module belongs to" }, "title": { "type": "string", "description": "The title of the module", "example": "Creating your first chat" }, "description": { "type": "string", "nullable": true, "description": "An optional description of the module", "example": "A short walkthrough of the chat interface." }, "loomUrl": { "type": "string", "description": "The Loom share or embed link of the module video", "example": "https://www.loom.com/share/abc123def456" }, "position": { "type": "integer", "description": "The position of the module within its chapter (0-based)", "example": 0 }, "createdAt": { "type": "string", "format": "date-time", "description": "The date the module was created" }, "updatedAt": { "type": "string", "format": "date-time", "description": "The date the module was last updated" } }, "required": [ "id", "chapterId", "title", "description", "loomUrl", "position", "createdAt", "updatedAt" ] }, "AcademyChapterResponseDto": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "description": "The unique identifier of the chapter" }, "title": { "type": "string", "description": "The title of the chapter", "example": "Getting Started" }, "description": { "type": "string", "description": "A description of what the chapter covers", "example": "Learn the basics of working with Ayunis Core." }, "position": { "type": "integer", "description": "The position of the chapter (0-based)", "example": 0 }, "quizEnabled": { "type": "boolean", "description": "Whether a quiz is activated for this chapter (shown at chapter end)", "example": false }, "passThreshold": { "type": "integer", "description": "Percentage of correct answers required to pass this chapter quiz", "example": 80 }, "courseModules": { "description": "The modules of the chapter, ordered by position", "type": "array", "items": { "$ref": "#/components/schemas/CourseModuleResponseDto" } }, "createdAt": { "type": "string", "format": "date-time", "description": "The date the chapter was created" }, "updatedAt": { "type": "string", "format": "date-time", "description": "The date the chapter was last updated" } }, "required": [ "id", "title", "description", "position", "quizEnabled", "passThreshold", "courseModules", "createdAt", "updatedAt" ] }, "QuizAnswerOptionForTakingResponseDto": { "type": "object", "properties": { "text": { "type": "string", "description": "The answer option text", "example": "A large language model" } }, "required": ["text"] }, "QuizQuestionForTakingResponseDto": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "description": "The unique identifier of the question" }, "text": { "type": "string", "description": "The question prompt", "example": "What is an LLM?" }, "options": { "description": "The answer options, without indicating the correct one", "type": "array", "items": { "$ref": "#/components/schemas/QuizAnswerOptionForTakingResponseDto" } } }, "required": ["id", "text", "options"] }, "SubmitQuizAnswerDto": { "type": "object", "properties": { "questionId": { "type": "string", "format": "uuid", "description": "The id of the answered question" }, "selectedOptionIndex": { "type": "integer", "description": "The 0-based index of the selected answer option", "example": 0 } }, "required": ["questionId", "selectedOptionIndex"] }, "SubmitQuizRequestDto": { "type": "object", "properties": { "answers": { "description": "One answer per drawn question", "type": "array", "items": { "$ref": "#/components/schemas/SubmitQuizAnswerDto" } } }, "required": ["answers"] }, "QuizResultResponseDto": { "type": "object", "properties": { "passed": { "type": "boolean", "description": "Whether the attempt met the chapter pass threshold" }, "correctCount": { "type": "integer", "description": "Number of questions answered correctly", "example": 8 }, "totalCount": { "type": "integer", "description": "Number of questions in the attempt", "example": 10 }, "requiredCount": { "type": "integer", "description": "Number of correct answers required to pass", "example": 8 }, "score": { "type": "integer", "description": "Score as a percentage of correct answers", "example": 80 }, "academyCompleted": { "type": "boolean", "description": "Whether passing this chapter completed the whole academy for the user" } }, "required": [ "passed", "correctCount", "totalCount", "requiredCount", "score", "academyCompleted" ] }, "ChapterProgressResponseDto": { "type": "object", "properties": { "chapterId": { "type": "string", "format": "uuid", "description": "The chapter this progress refers to" }, "passed": { "type": "boolean", "description": "Whether the learner has passed this chapter quiz" }, "passValid": { "type": "boolean", "description": "Whether the pass is recent enough to still count toward a completion. False once it has aged out of the certificate validity period." }, "lastScore": { "type": "integer", "description": "Score of the most recent attempt, as a percentage", "example": 80 }, "lastPassedAt": { "type": "string", "format": "date-time", "nullable": true, "description": "When the chapter was most recently passed, if ever" } }, "required": [ "chapterId", "passed", "passValid", "lastScore", "lastPassedAt" ] }, "AcademyProgressResponseDto": { "type": "object", "properties": { "chapters": { "description": "Per-chapter progress for the current user", "type": "array", "items": { "$ref": "#/components/schemas/ChapterProgressResponseDto" } }, "academyCompletedAt": { "type": "string", "format": "date-time", "nullable": true, "description": "When the user last completed the whole academy, or null if never" }, "academyCompletionExpiresAt": { "type": "string", "format": "date-time", "nullable": true, "description": "When the completion stops being valid, or null if the academy was never completed. Only enforced by orgs requiring annual recertification." } }, "required": [ "chapters", "academyCompletedAt", "academyCompletionExpiresAt" ] }, "QuizAnswerOptionResponseDto": { "type": "object", "properties": { "text": { "type": "string", "description": "The answer option text", "example": "A large language model" }, "isCorrect": { "type": "boolean", "description": "Whether this option is the correct answer", "example": true } }, "required": ["text", "isCorrect"] }, "QuizQuestionResponseDto": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "description": "The unique identifier of the quiz question" }, "chapterId": { "type": "string", "format": "uuid", "description": "The id of the chapter the question belongs to" }, "text": { "type": "string", "description": "The question prompt", "example": "What is an LLM?" }, "options": { "description": "The answer options with the correct one flagged", "type": "array", "items": { "$ref": "#/components/schemas/QuizAnswerOptionResponseDto" } }, "position": { "type": "integer", "description": "The position of the question within its chapter (0-based)", "example": 0 }, "createdAt": { "type": "string", "format": "date-time", "description": "The date the question was created" }, "updatedAt": { "type": "string", "format": "date-time", "description": "The date the question was last updated" } }, "required": [ "id", "chapterId", "text", "options", "position", "createdAt", "updatedAt" ] }, "SuperAdminAcademyChapterResponseDto": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid", "description": "The unique identifier of the chapter" }, "title": { "type": "string", "description": "The title of the chapter", "example": "Getting Started" }, "description": { "type": "string", "description": "A description of what the chapter covers", "example": "Learn the basics of working with Ayunis Core." }, "position": { "type": "integer", "description": "The position of the chapter (0-based)", "example": 0 }, "quizEnabled": { "type": "boolean", "description": "Whether a quiz is activated for this chapter (shown at chapter end)", "example": false }, "passThreshold": { "type": "integer", "description": "Percentage of correct answers required to pass this chapter quiz", "example": 80 }, "courseModules": { "description": "The modules of the chapter, ordered by position", "type": "array", "items": { "$ref": "#/components/schemas/CourseModuleResponseDto" } }, "createdAt": { "type": "string", "format": "date-time", "description": "The date the chapter was created" }, "updatedAt": { "type": "string", "format": "date-time", "description": "The date the chapter was last updated" }, "quizQuestions": { "description": "The quiz question pool of the chapter, ordered by position", "type": "array", "items": { "$ref": "#/components/schemas/QuizQuestionResponseDto" } } }, "required": [ "id", "title", "description", "position", "quizEnabled", "passThreshold", "courseModules", "createdAt", "updatedAt", "quizQuestions" ] }, "CreateChapterRequestDto": { "type": "object", "properties": { "title": { "type": "string", "description": "The title of the chapter", "example": "Getting Started", "maxLength": 255 }, "description": { "type": "string", "description": "A description of what the chapter covers", "example": "Learn the basics of working with Ayunis Core.", "maxLength": 2000 } }, "required": ["title", "description"] }, "ReorderChaptersRequestDto": { "type": "object", "properties": { "chapterIds": { "type": "array", "description": "All chapter ids in their new order. Must contain exactly the ids of all existing chapters.", "items": { "type": "string", "format": "uuid" } } }, "required": ["chapterIds"] }, "UpdateChapterRequestDto": { "type": "object", "properties": { "title": { "type": "string", "description": "The title of the chapter", "example": "Getting Started", "maxLength": 255 }, "description": { "type": "string", "description": "A description of what the chapter covers", "example": "Learn the basics of working with Ayunis Core.", "maxLength": 2000 }, "quizEnabled": { "type": "boolean", "description": "Whether a quiz is activated for this chapter", "example": false }, "passThreshold": { "type": "number", "description": "Percentage of correct answers required to pass this chapter quiz", "example": 80, "minimum": 1, "maximum": 100 } }, "required": ["title", "description"] }, "CreateCourseModuleRequestDto": { "type": "object", "properties": { "title": { "type": "string", "description": "The title of the module", "example": "Creating your first chat", "maxLength": 255 }, "description": { "type": "string", "description": "An optional description of the module", "example": "A short walkthrough of the chat interface.", "maxLength": 2000 }, "loomUrl": { "type": "string", "description": "The Loom share or embed link of the module video", "example": "https://www.loom.com/share/abc123def456", "maxLength": 500 } }, "required": ["title", "loomUrl"] }, "ReorderCourseModulesRequestDto": { "type": "object", "properties": { "courseModuleIds": { "type": "array", "description": "All module ids of the chapter in their new order. Must contain exactly the ids of all modules in the chapter.", "items": { "type": "string", "format": "uuid" } } }, "required": ["courseModuleIds"] }, "UpdateCourseModuleRequestDto": { "type": "object", "properties": { "title": { "type": "string", "description": "The title of the module", "example": "Creating your first chat", "maxLength": 255 }, "description": { "type": "string", "description": "An optional description of the module", "example": "A short walkthrough of the chat interface.", "maxLength": 2000 }, "loomUrl": { "type": "string", "description": "The Loom share or embed link of the module video", "example": "https://www.loom.com/share/abc123def456", "maxLength": 500 } }, "required": ["title", "loomUrl"] }, "QuizAnswerOptionRequestDto": { "type": "object", "properties": { "text": { "type": "string", "description": "The answer option text", "example": "A large language model", "maxLength": 500 }, "isCorrect": { "type": "boolean", "description": "Whether this option is the correct answer", "example": true } }, "required": ["text", "isCorrect"] }, "CreateQuizQuestionRequestDto": { "type": "object", "properties": { "text": { "type": "string", "description": "The question prompt", "example": "What is an LLM?", "maxLength": 2000 }, "options": { "description": "The answer options. Between 2 and 6 options with exactly one marked correct.", "minItems": 2, "maxItems": 6, "type": "array", "items": { "$ref": "#/components/schemas/QuizAnswerOptionRequestDto" } } }, "required": ["text", "options"] }, "UpdateQuizQuestionRequestDto": { "type": "object", "properties": { "text": { "type": "string", "description": "The question prompt", "example": "What is an LLM?", "maxLength": 2000 }, "options": { "description": "The answer options. Between 2 and 6 options with exactly one marked correct.", "minItems": 2, "maxItems": 6, "type": "array", "items": { "$ref": "#/components/schemas/QuizAnswerOptionRequestDto" } } }, "required": ["text", "options"] }, "ChatCompletionRequestDto": { "type": "object", "properties": {} }, "AddonType": { "type": "string", "enum": ["ayunis_core_academy"], "description": "The add-on this status entry refers to" }, "AddonStatusResponseDto": { "type": "object", "properties": { "type": { "description": "The add-on this status entry refers to", "allOf": [ { "$ref": "#/components/schemas/AddonType" } ] }, "active": { "type": "boolean", "description": "Whether the add-on is active for the organization" } }, "required": ["type", "active"] }, "LoginDto": { "type": "object", "properties": { "email": { "type": "string", "description": "Email address for authentication", "example": "user@example.com" }, "password": { "type": "string", "description": "Password for authentication", "example": "password123" } }, "required": ["email", "password"] }, "LoginResponseDto": { "type": "object", "properties": { "success": { "type": "boolean", "description": "Whether the credentials were accepted", "example": true }, "mfaRequired": { "type": "boolean", "description": "True when a second factor is required before a session is issued. Complete the login via /auth/mfa/verify (or /auth/mfa/setup when enrollmentRequired is true).", "example": false }, "enrollmentRequired": { "type": "boolean", "description": "True when the org requires two-factor auth and the user must enroll before receiving a session.", "example": false } }, "required": ["success", "mfaRequired", "enrollmentRequired"] }, "ErrorResponseDto": { "type": "object", "properties": { "message": { "type": "string", "description": "Error message", "example": "Authentication failed" } }, "required": ["message"] }, "RegisterDto": { "type": "object", "properties": { "email": { "type": "string", "description": "Email address for the user account", "example": "user@example.com" }, "password": { "type": "string", "description": "Password for the user account", "example": "password123" }, "orgName": { "type": "string", "description": "Organization name", "example": "My Organization" }, "userName": { "type": "string", "description": "User name", "example": "John Doe" }, "marketingAcceptance": { "type": "boolean", "description": "Marketing acceptance", "example": true }, "department": { "type": "string", "description": "Department within the municipality", "example": "hauptamt" } }, "required": [ "email", "password", "orgName", "userName", "marketingAcceptance" ] }, "SuccessResponseDto": { "type": "object", "properties": { "success": { "type": "boolean", "description": "Operation success status", "example": true } }, "required": ["success"] }, "MeResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "User id", "example": "123e4567-e89b-12d3-a456-426614174000" }, "orgId": { "type": "string", "description": "Organization id", "example": "123e4567-e89b-12d3-a456-426614174000" }, "email": { "type": "string", "description": "User email address", "example": "user@example.com" }, "role": { "type": "string", "description": "User role", "enum": ["admin", "manager", "user"], "example": "user" }, "systemRole": { "type": "string", "description": "User system role", "enum": ["customer", "super_admin"], "example": "super_admin" }, "name": { "type": "string", "description": "User name", "example": "John Doe" } }, "required": ["id", "orgId", "email", "role", "systemRole", "name"] }, "MfaCodeRequestDto": { "type": "object", "properties": { "code": { "type": "string", "description": "A 6-digit TOTP code from the authenticator app, or a single-use recovery code (XXXXX-XXXXX).", "example": "123456" } }, "required": ["code"] }, "MfaSetupResponseDto": { "type": "object", "properties": { "secret": { "type": "string", "description": "Base32 TOTP secret for manual entry in an authenticator app. Shown only during setup and never again." }, "otpauthUri": { "type": "string", "description": "otpauth:// URI encoded in the QR code." }, "qrCodeDataUri": { "type": "string", "description": "QR code for the otpauth URI as a PNG data URI." } }, "required": ["secret", "otpauthUri", "qrCodeDataUri"] }, "MfaLoginConfirmResponseDto": { "type": "object", "properties": { "success": { "type": "boolean", "description": "Operation success status", "example": true }, "recoveryCodes": { "description": "Single-use recovery codes issued on enrollment. Shown exactly once.", "type": "array", "items": { "type": "string" } } }, "required": ["success", "recoveryCodes"] }, "OnboardingResponseDto": { "type": "object", "properties": { "completedStepIds": { "description": "IDs of the onboarding steps the user has completed", "example": ["create-assistant", "start-chat"], "type": "array", "items": { "type": "string" } }, "hidden": { "type": "boolean", "description": "Whether the user has hidden the onboarding checklist", "example": false }, "welcomeVideoSeenAt": { "type": "string", "description": "When the user first dismissed the welcome video", "example": "2026-08-05T12:00:00.000Z", "format": "date-time", "nullable": true } }, "required": ["completedStepIds", "hidden", "welcomeVideoSeenAt"] }, "UpdateOnboardingDto": { "type": "object", "properties": { "completedStepIds": { "description": "IDs of the onboarding steps the user has completed", "example": ["create-assistant", "start-chat"], "type": "array", "items": { "type": "string" } }, "hidden": { "type": "boolean", "description": "Whether the user has hidden the onboarding checklist", "example": false } }, "required": ["completedStepIds", "hidden"] }, "IpAllowlistResponseDto": { "type": "object", "properties": { "cidrs": { "description": "List of allowed CIDR ranges", "example": ["203.0.113.0/24"], "type": "array", "items": { "type": "string" } } }, "required": ["cidrs"] }, "UpdateIpAllowlistRequestDto": { "type": "object", "properties": { "cidrs": { "description": "List of CIDR ranges to allow (e.g. \"192.168.1.0/24\")", "example": ["203.0.113.0/24"], "type": "array", "items": { "type": "string" } } }, "required": ["cidrs"] }, "CreateApiKeyDto": { "type": "object", "properties": { "name": { "type": "string", "description": "Human-readable name for the API key", "example": "CI bot", "maxLength": 100 }, "expiresAt": { "type": "string", "description": "Optional expiration date for the API key (ISO 8601). If omitted, the key never expires.", "example": "2026-12-31T23:59:59.000Z", "format": "date-time" } }, "required": ["name"] }, "ApiKeyResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier of the API key", "example": "550e8400-e29b-41d4-a716-446655440000", "format": "uuid" }, "name": { "type": "string", "description": "Human-readable name for the API key", "example": "CI bot" }, "prefixPreview": { "type": "string", "description": "Public preview of the API key — the literal prefix plus the first characters of the secret. The full secret is shown only once at creation time.", "example": "ayk_live_abc123def456..." }, "expiresAt": { "type": "string", "description": "Expiration date of the API key, or null if it never expires", "example": "2026-12-31T23:59:59.000Z", "format": "date-time", "nullable": true }, "revokedAt": { "type": "string", "description": "Revocation timestamp, or null if the key is still active. Revoked keys remain in the list as an audit trail.", "example": "2026-05-01T10:00:00.000Z", "format": "date-time", "nullable": true }, "createdByUserId": { "type": "string", "description": "ID of the user who created the key. May be null if that user has been deleted.", "example": "550e8400-e29b-41d4-a716-446655440001", "format": "uuid", "nullable": true }, "createdAt": { "type": "string", "description": "When the key was created", "example": "2026-04-27T10:30:00.000Z", "format": "date-time" } }, "required": [ "id", "name", "prefixPreview", "expiresAt", "revokedAt", "createdByUserId", "createdAt" ] }, "CreateApiKeyResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier of the API key", "example": "550e8400-e29b-41d4-a716-446655440000", "format": "uuid" }, "name": { "type": "string", "description": "Human-readable name for the API key", "example": "CI bot" }, "prefixPreview": { "type": "string", "description": "Public preview of the API key — the literal prefix plus the first characters of the secret. The full secret is shown only once at creation time.", "example": "ayk_live_abc123def456..." }, "expiresAt": { "type": "string", "description": "Expiration date of the API key, or null if it never expires", "example": "2026-12-31T23:59:59.000Z", "format": "date-time", "nullable": true }, "revokedAt": { "type": "string", "description": "Revocation timestamp, or null if the key is still active. Revoked keys remain in the list as an audit trail.", "example": "2026-05-01T10:00:00.000Z", "format": "date-time", "nullable": true }, "createdByUserId": { "type": "string", "description": "ID of the user who created the key. May be null if that user has been deleted.", "example": "550e8400-e29b-41d4-a716-446655440001", "format": "uuid", "nullable": true }, "createdAt": { "type": "string", "description": "When the key was created", "example": "2026-04-27T10:30:00.000Z", "format": "date-time" }, "secret": { "type": "string", "description": "The full plaintext API key. This is the only response that will ever contain it — store it securely and immediately. It cannot be retrieved later.", "example": "ayk_live_abc123def456ghi789..." } }, "required": [ "id", "name", "prefixPreview", "expiresAt", "revokedAt", "createdByUserId", "createdAt", "secret" ] }, "AcademyAccessMode": { "type": "string", "enum": ["unrestricted", "required_once", "required_annually"], "description": "The certificate requirement configured for the user's org" }, "AcademyAccessStatusResponseDto": { "type": "object", "properties": { "mode": { "description": "The certificate requirement configured for the user's org", "allOf": [ { "$ref": "#/components/schemas/AcademyAccessMode" } ] }, "required": { "type": "boolean", "description": "Whether the gate applies to this user at all. False for unrestricted orgs and for orgs without the academy add-on." }, "allowed": { "type": "boolean", "description": "Whether the user may currently use Ayunis Core chat" }, "completedAt": { "type": "string", "format": "date-time", "nullable": true, "description": "When the user last completed the academy. Null when the gate does not apply — read GET /academy/progress for the completion date in that case." }, "expiresAt": { "type": "string", "format": "date-time", "nullable": true, "description": "When the certificate stops being valid. Only populated when the org requires annual renewal." } }, "required": ["mode", "required", "allowed", "completedAt", "expiresAt"] }, "OrgAcademyAccessSettingsResponseDto": { "type": "object", "properties": { "mode": { "description": "The certificate requirement configured for the org", "allOf": [ { "$ref": "#/components/schemas/AcademyAccessMode" } ] } }, "required": ["mode"] }, "UpsertOrgAcademyAccessSettingsDto": { "type": "object", "properties": { "mode": { "description": "The certificate requirement to apply to the org", "allOf": [ { "$ref": "#/components/schemas/AcademyAccessMode" } ] } }, "required": ["mode"] }, "CertificateValidityStatus": { "type": "string", "enum": ["not_passed", "valid", "expiring_soon", "expired"] }, "OrgCertificateStatusResponseDto": { "type": "object", "properties": { "userId": { "type": "string", "format": "uuid" }, "name": { "type": "string", "example": "Anna Admin" }, "email": { "type": "string", "example": "anna@example.com" }, "completedAt": { "type": "string", "format": "date-time", "nullable": true, "description": "When the member last completed the academy, or null if they never have" }, "expiresAt": { "type": "string", "format": "date-time", "nullable": true, "description": "When the certificate stops being valid. Only populated when the org requires annual renewal." }, "status": { "allOf": [ { "$ref": "#/components/schemas/CertificateValidityStatus" } ] } }, "required": [ "userId", "name", "email", "completedAt", "expiresAt", "status" ] }, "PaginatedOrgCertificateStatusesResponseDto": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/OrgCertificateStatusResponseDto" } }, "pagination": { "$ref": "#/components/schemas/PaginationDto" } }, "required": ["data", "pagination"] }, "MfaStatusResponseDto": { "type": "object", "properties": { "enabled": { "type": "boolean", "description": "Whether the user has confirmed TOTP two-factor auth.", "example": true }, "confirmedAt": { "type": "string", "description": "When enrollment was confirmed, null when not enrolled.", "format": "date-time", "nullable": true }, "recoveryCodesRemaining": { "type": "number", "description": "Number of unused recovery codes.", "example": 10 } }, "required": ["enabled", "confirmedAt", "recoveryCodesRemaining"] }, "RecoveryCodesResponseDto": { "type": "object", "properties": { "recoveryCodes": { "description": "Single-use recovery codes. Shown exactly once — the user must store them before continuing.", "example": ["A1B2C-D3E4F", "G5H6J-K7M8N"], "type": "array", "items": { "type": "string" } } }, "required": ["recoveryCodes"] }, "OrgMfaRequirementResponseDto": { "type": "object", "properties": { "required": { "type": "boolean", "description": "Whether two-factor authentication is required for all users of the org. Enforced at each user’s next login.", "example": false } }, "required": ["required"] }, "UpdateOrgMfaRequirementRequestDto": { "type": "object", "properties": { "required": { "type": "boolean", "description": "Whether two-factor authentication is required for all users of the org. Takes effect at each user’s next login.", "example": true } }, "required": ["required"] }, "OrgSsoConnectionResponseDto": { "type": "object", "properties": { "id": { "type": "string", "format": "uuid" }, "orgId": { "type": "string", "format": "uuid" }, "emailDomain": { "type": "string", "example": "stadt.example" }, "domainVerifiedAt": { "format": "date-time", "type": "string" }, "zitadelOrgId": { "type": "string", "example": "385820595704561666", "nullable": true }, "enabled": { "type": "boolean" }, "jitProvisioningEnabled": { "type": "boolean" } }, "required": [ "id", "orgId", "emailDomain", "domainVerifiedAt", "zitadelOrgId", "enabled", "jitProvisioningEnabled" ] }, "OrgSsoConnectionResourceDto": { "type": "object", "properties": { "connection": { "nullable": true, "type": "object", "allOf": [ { "$ref": "#/components/schemas/OrgSsoConnectionResponseDto" } ] } }, "required": ["connection"] }, "ConfigureOrgSsoConnectionRequestDto": { "type": "object", "properties": { "emailDomain": { "type": "string", "example": "stadt.example" }, "zitadelOrgId": { "type": "string", "example": "385820595704561666", "maxLength": 255 }, "domainVerified": { "type": "boolean", "description": "Confirms the email domain was independently verified" } }, "required": ["emailDomain", "zitadelOrgId", "domainVerified"] }, "SetOrgSsoEnabledRequestDto": { "type": "object", "properties": { "enabled": { "type": "boolean" }, "confirmed": { "type": "boolean", "description": "Confirms the broker mapping was reviewed before enablement" }, "reviewedEmailDomain": { "type": "string", "example": "stadt.example" }, "reviewedZitadelOrgId": { "type": "string", "example": "385820595704561666" } }, "required": ["enabled"] }, "SetOrgSsoStateRequestDto": { "type": "object", "properties": { "enabled": { "type": "boolean" } }, "required": ["enabled"] }, "DiscoverSsoDto": { "type": "object", "properties": { "email": { "type": "string", "example": "staff@stadt.example" } }, "required": ["email"] }, "SsoDiscoveryResponseDto": { "type": "object", "properties": { "available": { "type": "boolean" }, "orgId": { "type": "string", "format": "uuid" } }, "required": ["available"] }, "SsoAuthorizationResponseDto": { "type": "object", "properties": { "authorizationUrl": { "type": "string", "example": "https://sso.ayunis.de/oauth/v2/authorize?client_id=core" } }, "required": ["authorizationUrl"] }, "SsoLogoutResponseDto": { "type": "object", "properties": { "success": { "type": "boolean", "example": true }, "brokerLogoutUrl": { "type": "string", "nullable": true, "description": "Broker logout URL for the user agent, or null for Core-only logout" } }, "required": ["success", "brokerLogoutUrl"] }, "SsoBackchannelLogoutRequestDto": { "type": "object", "properties": { "logout_token": { "type": "string", "description": "Signed OpenID Connect logout token" } }, "required": ["logout_token"] } } } }