openapi: 3.2.0 info: title: Sweep Ai Agents API description: This is a publicly available Sweep API. version: '0.1' contact: {} servers: - url: https://api.sweep.io description: Sweep production API — the host this document was harvested from (GET /api-json); /health responds here tags: - name: Ai Agents paths: /ai-agents: get: operationId: AiAgentsController_getAgents parameters: [] responses: '200': description: '' content: application/json: schema: type: array items: type: object security: - bearer: [] tags: - Ai Agents post: operationId: AiAgentsController_createAgent parameters: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/CreateAgentDto' responses: '201': description: '' content: application/json: schema: $ref: '#/components/schemas/AiAgent' security: - bearer: [] tags: - Ai Agents /ai-agents/{agentId}/name: patch: operationId: AiAgentsController_renameAgent parameters: - name: agentId required: true in: path schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/EditAgentNameDto' responses: '200': description: '' security: - bearer: [] tags: - Ai Agents /ai-agents/{agentId}/user-instructions: patch: operationId: AiAgentsController_editAgentUserInstructions parameters: - name: agentId required: true in: path schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/EditAgentUserInstructionsDto' responses: '200': description: '' security: - bearer: [] tags: - Ai Agents /ai-agents/{agentId}/system-instructions: patch: operationId: AiAgentsController_editAgentSystemInstructions parameters: - name: agentId required: true in: path schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/EditAgentSystemInstructionsDto' responses: '200': description: '' security: - bearer: [] tags: - Ai Agents /ai-agents/{agentId}/configurations: patch: operationId: AiAgentsController_patchAgentConfigurations parameters: - name: agentId required: true in: path schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PatchAgentConfigurationsDto' responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/AiAgent' security: - bearer: [] tags: - Ai Agents /ai-agents/{agentId}: delete: operationId: AiAgentsController_deleteAgent parameters: - name: agentId required: true in: path schema: type: string responses: '200': description: '' security: - bearer: [] tags: - Ai Agents /ai-agents/{agentId}/files/upload-url: post: operationId: AiAgentsController_generateFileUploadUrl parameters: - name: agentId required: true in: path schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/GenerateFileUploadUrlDto' responses: '201': description: '' security: - bearer: [] tags: - Ai Agents /ai-agents/{agentId}/files/confirm-upload: post: operationId: AiAgentsController_confirmFileUpload parameters: - name: agentId required: true in: path schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ConfirmFileUploadDto' responses: '201': description: '' content: application/json: schema: type: object security: - bearer: [] tags: - Ai Agents /ai-agents/{agentId}/files/{fileId}: delete: operationId: AiAgentsController_deleteAgentFile parameters: - name: agentId required: true in: path schema: type: string - name: fileId required: true in: path schema: type: string responses: '200': description: '' security: - bearer: [] tags: - Ai Agents /ai-agents/{agentId}/files/{fileId}/download-url: get: operationId: AiAgentsController_generateFileDownloadUrl parameters: - name: agentId required: true in: path schema: type: string - name: fileId required: true in: path schema: type: string responses: '200': description: '' content: application/json: schema: type: object security: - bearer: [] tags: - Ai Agents /ai-agents/{agentId}/files/{fileId}/preview: get: operationId: AiAgentsController_generateFilePreview parameters: - name: agentId required: true in: path schema: type: string - name: fileId required: true in: path schema: type: string responses: '200': description: '' content: application/json: schema: type: object security: - bearer: [] tags: - Ai Agents /ai-agents/{agentId}/chats/{chatId}/add-to-agent: post: operationId: AiAgentsController_addChatToAgentFiles parameters: - name: agentId required: true in: path schema: type: string - name: chatId required: true in: path schema: type: string responses: '201': description: '' content: application/json: schema: type: object security: - bearer: [] tags: - Ai Agents /ai-agents/{agentId}/chats: post: operationId: AiAgentsController_createChat parameters: - name: agentId required: true in: path schema: type: string - name: pythonExperimental required: true in: query schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ChatMessageDto' responses: '201': description: '' content: application/json: schema: type: object security: - bearer: [] tags: - Ai Agents get: operationId: AiAgentsController_getAiChats parameters: - name: agentId required: true in: path schema: type: string responses: '200': description: '' content: application/json: schema: type: array items: type: object security: - bearer: [] tags: - Ai Agents /ai-agents/chats/{chatId}: patch: operationId: AiAgentsController_sendMessage parameters: - name: chatId required: true in: path schema: type: string - name: pythonExperimental required: true in: query schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ChatMessageDto' responses: '200': description: '' content: application/json: schema: type: object security: - bearer: [] tags: - Ai Agents get: operationId: AiAgentsController_getChat parameters: - name: chatId required: true in: path schema: type: string responses: '200': description: '' content: application/json: schema: type: object security: - bearer: [] tags: - Ai Agents delete: operationId: AiAgentsController_deleteChat parameters: - name: chatId required: true in: path schema: type: string responses: '200': description: '' content: application/json: schema: type: boolean security: - bearer: [] tags: - Ai Agents /ai-agents/stream/{id}: delete: operationId: AiAgentsController_cancelStream parameters: - name: id required: true in: path schema: type: string - name: useRedis required: true in: query schema: type: string - name: chatId required: true in: query schema: type: string responses: '200': description: '' security: - bearer: [] tags: - Ai Agents get: operationId: AiAgentsController_streamChatResponse parameters: - name: id required: true in: path schema: type: string - name: useRedis required: true in: query schema: type: string - name: chatId required: true in: query schema: type: string responses: '200': description: '' content: application/json: schema: type: object security: - bearer: [] tags: - Ai Agents /ai-agents/{agentId}/chats/{chatId}/mcp-tool-approval: post: operationId: AiAgentsController_handleMcpToolApproval parameters: - name: agentId required: true in: path schema: type: string - name: chatId required: true in: path schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/McpToolApprovalDto' responses: '201': description: '' security: - bearer: [] tags: - Ai Agents /ai-agents/chats/{chatId}/name: patch: operationId: AiAgentsController_rename parameters: - name: chatId required: true in: path schema: type: string responses: '200': description: '' content: application/json: schema: type: boolean security: - bearer: [] tags: - Ai Agents /ai-agents/chats/{chatId}/favorite: patch: operationId: AiAgentsController_setIsFavorite parameters: - name: chatId required: true in: path schema: type: string responses: '200': description: '' content: application/json: schema: type: boolean security: - bearer: [] tags: - Ai Agents /ai-agents/monitoring/{agentId}/metadata-elements: get: operationId: AiAgentsController_getMonitoringMetadataElements parameters: - name: agentId required: true in: path schema: type: string responses: '200': description: '' content: application/json: schema: type: array items: type: object security: - bearer: [] tags: - Ai Agents /ai-agents/monitoring/{agentId}/issues: get: operationId: AiAgentsController_getMonitoringV2PotentialIssues parameters: - name: agentId required: true in: path schema: type: string responses: '200': description: '' content: application/json: schema: type: object security: - bearer: [] tags: - Ai Agents /ai-agents/monitoring/{agentId}/issues/{issueId}: patch: operationId: AiAgentsController_setMonitoringIssueStatus parameters: - name: agentId required: true in: path schema: type: string - name: issueId required: true in: path schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/UpdateIssueDto' responses: '200': description: '' security: - bearer: [] tags: - Ai Agents /ai-agents/{agentId}/folders: post: operationId: AiAgentsController_createFolder parameters: - name: agentId required: true in: path schema: type: string responses: '201': description: '' content: application/json: schema: type: object security: - bearer: [] tags: - Ai Agents get: operationId: AiAgentsController_getFolders parameters: - name: agentId required: true in: path schema: type: string responses: '200': description: '' content: application/json: schema: type: array items: type: object security: - bearer: [] tags: - Ai Agents /ai-agents/{agentId}/folders/{folderId}/name: patch: operationId: AiAgentsController_renameFolder parameters: - name: agentId required: true in: path schema: type: string - name: folderId required: true in: path schema: type: string responses: '200': description: '' content: application/json: schema: type: boolean security: - bearer: [] tags: - Ai Agents /ai-agents/{agentId}/folders/{folderId}: delete: operationId: AiAgentsController_deleteFolder parameters: - name: agentId required: true in: path schema: type: string - name: folderId required: true in: path schema: type: string - name: deleteChats required: true in: query schema: type: boolean responses: '200': description: '' content: application/json: schema: type: boolean security: - bearer: [] tags: - Ai Agents /ai-agents/{agentId}/chats/{chatId}/folder: patch: operationId: AiAgentsController_setChatFolder parameters: - name: agentId required: true in: path schema: type: string - name: chatId required: true in: path schema: type: string responses: '200': description: '' content: application/json: schema: type: boolean security: - bearer: [] tags: - Ai Agents /ai-agents/chats: get: operationId: AiAgentsController_getAiChatsDeprecated parameters: - name: agentId required: true in: query schema: type: string responses: '200': description: '' content: application/json: schema: type: array items: type: object security: - bearer: [] tags: - Ai Agents /ai-agents/{agentId}/chats/sfdc: get: operationId: AiAgentsController_getSupportSalesforceChats parameters: - name: agentId required: true in: path schema: type: string responses: '200': description: '' content: application/json: schema: type: array items: type: object security: - bearer: [] tags: - Ai Agents /ai-agents/chats/search: get: operationId: AiAgentsController_searchDeprecated parameters: - name: term required: true in: query schema: type: string responses: '200': description: '' content: application/json: schema: type: array items: $ref: '#/components/schemas/AiChat' security: - bearer: [] tags: - Ai Agents /ai-agents/{agentId}/chats/search: get: operationId: AiAgentsController_search parameters: - name: term required: true in: query schema: type: string - name: agentId required: true in: path schema: type: string responses: '200': description: '' content: application/json: schema: type: array items: $ref: '#/components/schemas/AiChat' security: - bearer: [] tags: - Ai Agents /ai-agents/chats/{chatId}/messages/{messageIndex}: delete: operationId: AiAgentsController_deleteChatMessagePair parameters: - name: chatId required: true in: path schema: type: string - name: messageIndex required: true in: path schema: type: number requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/DeleteAiChatMessagePairDto' responses: '200': description: '' security: - bearer: [] tags: - Ai Agents /ai-agents/chats/{chatId}/feedback/{runId}: post: operationId: AiAgentsController_submitFeedback parameters: - name: chatId required: true in: path schema: type: string - name: runId required: true in: path schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SubmitFeedbackDto' responses: '201': description: '' security: - bearer: [] tags: - Ai Agents /ai-agents/{agentId}/best-practices: post: operationId: AiAgentsController_addBestPracticesToAgent parameters: - name: agentId required: true in: path schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ManageBestPracticesDto' responses: '201': description: '' security: - bearer: [] tags: - Ai Agents delete: operationId: AiAgentsController_removeBestPracticesFromAgent parameters: - name: agentId required: true in: path schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ManageBestPracticesDto' responses: '200': description: '' security: - bearer: [] tags: - Ai Agents /ai-agents/{agentId}/artifacts: get: operationId: AiAgentsController_getArtifacts parameters: - name: agentId required: true in: path schema: type: string responses: '200': description: '' content: application/json: schema: type: array items: type: object security: - bearer: [] tags: - Ai Agents /ai-agents/artifacts/by-artifact-id/{artifactId}/versions: get: operationId: AiAgentsController_getArtifactVersionsSummaries parameters: - name: artifactId required: true in: path schema: type: string responses: '200': description: '' content: application/json: schema: type: array items: type: object security: - bearer: [] tags: - Ai Agents /ai-agents/artifacts/shared/{id}: get: operationId: AiAgentsController_getSharedArtifact parameters: - name: id required: true in: path schema: type: string responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/AiArtifact' security: - bearer: [] summary: 'Resolve a company-share link. `:id` may be a logical artifactId (stable) or a legacy version UUID. Returns the currently shared version for that family, or the latest version when nothing is shared and the caller is the creator.' tags: - Ai Agents /ai-agents/artifacts/{versionId}: get: operationId: AiAgentsController_getArtifact parameters: - name: versionId required: true in: path schema: type: string responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/AiArtifact' security: - bearer: [] tags: - Ai Agents /ai-agents/artifacts/{id}/share: patch: operationId: AiAgentsController_shareArtifact parameters: - name: id required: true in: path schema: type: string responses: '200': description: '' security: - bearer: [] tags: - Ai Agents /ai-agents/artifacts/{id}/public: patch: operationId: AiAgentsController_setArtifactPublic parameters: - name: id required: true in: path schema: type: string responses: '200': description: '' security: - bearer: [] tags: - Ai Agents /ai-agents/artifacts/{id}/public-url-token: get: operationId: AiAgentsController_getArtifactPublicToken parameters: - name: id required: true in: path schema: type: string responses: '200': description: '' security: - bearer: [] tags: - Ai Agents /ai-agents/table-artifacts/{tableId}: get: operationId: AiAgentsController_getTableArtifact parameters: - name: tableId required: true in: path schema: type: string responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/AiTableArtifact' security: - bearer: [] tags: - Ai Agents /ai-agents/build-definitions/{buildDefinitionId}: get: operationId: AiAgentsController_getBuildDefinition parameters: - name: buildDefinitionId required: true in: path schema: type: string responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/AiBuildDefinition' security: - bearer: [] tags: - Ai Agents /ai-agents/process-mining/{funnelMapId}: post: operationId: AiAgentsController_processMiningSingleRequest parameters: - name: funnelMapId required: true in: path schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ProcessMiningAgentDto' responses: '201': description: '' security: - bearer: [] tags: - Ai Agents components: schemas: BestPractice: type: object properties: id: type: string name: type: string severity: type: object text: type: string isSystem: type: boolean applicableDomain: type: string enum: - MetadataMonitoring - BusinessProcess applicableResourceType: type: string accountId: type: string account: $ref: '#/components/schemas/Account' createdById: type: string createdBy: $ref: '#/components/schemas/User' updatedById: type: string updatedBy: $ref: '#/components/schemas/User' createdAt: format: date-time type: string updatedAt: format: date-time type: string required: - id - name - severity - text - isSystem - applicableDomain - applicableResourceType - accountId - account - createdById - createdBy - updatedById - updatedBy - createdAt - updatedAt SweepFieldReference: type: object properties: fieldIds: type: array items: type: string fieldSource: type: string required: - fieldIds FunnelDetailsDto: type: object properties: leadingObject: $ref: '#/components/schemas/LeadingObjectDto' stages: type: array items: $ref: '#/components/schemas/SweepStage' _firstStageId: type: string plugins: default: {} allOf: - $ref: '#/components/schemas/FunnelPluginsDto' funnelLinks: type: array items: $ref: '#/components/schemas/FunnelLinkDto' stageMetadata: type: array items: type: object required: - leadingObject - stages - plugins AiAgentBestPractice: type: object properties: aiAgentId: type: string bestPracticeId: type: string aiAgent: $ref: '#/components/schemas/AiAgent' bestPractice: $ref: '#/components/schemas/BestPractice' createdAt: format: date-time type: string required: - aiAgentId - bestPracticeId - aiAgent - bestPractice - createdAt SweepAssignmentRule: type: object properties: assignmentId: type: string ruleName: type: string assignedTo: type: string assignedToType: type: string criteriaLogic: type: string criteria: type: array items: type: object required: - assignmentId - ruleName - assignedTo - assignedToType - criteriaLogic - criteria IncludeConfigurationDto: type: object properties: name: type: string type: type: string required: - name - type User: type: object properties: id: type: string sub: type: string email: type: string account: $ref: '#/components/schemas/Account' preferences: type: object name: type: string emoji: type: string imageUrl: type: string jobTitle: type: string roleGroup: $ref: '#/components/schemas/RoleGroup' roleGroupId: type: string createdAt: format: date-time type: string updatedAt: format: date-time type: string deletedAt: format: date-time type: string lastSeen: format: date-time type: string required: - id - sub - email - account - preferences - name - emoji - imageUrl - jobTitle - roleGroup - roleGroupId - createdAt - updatedAt SweepExitCriteria: type: object properties: _exitCriteriaId: type: string _nextStageId: type: string isAutoMoveToNextStage: type: boolean guidance: type: string criteria: type: array items: type: object criteriaLogic: type: string required: - _exitCriteriaId - criteria - criteriaLogic AiProjectPrompt: type: object properties: id: type: string promptTitle: type: string promptText: type: string mode: type: string enum: - none - researchMode - buildMode - multiOrgMode - artifactMode isCompleted: type: boolean completedById: type: - string - 'null' completedAt: format: date-time type: - string - 'null' projectId: type: string project: $ref: '#/components/schemas/AiProject' required: - id - promptTitle - promptText - mode - isCompleted - completedById - completedAt - projectId - project FunnelLinkDto: type: object properties: _id: type: string _type: type: string enum: - salesforce - thirdParty - recordType - hubspot - metadataElement funnelId: type: string stageId: type: string required: - _id - _type - funnelId ProcessMiningAgentDto: type: object properties: message: $ref: '#/components/schemas/AiChatMessageDto' required: - message AiAgent: type: object properties: id: type: string name: type: string type: enum: - Documentation - Process Optimization - MonitoringV2 - Permissions - Support type: string contextComponents: type: object userInstructions: type: string systemInstructions: type: string projectId: type: - string - 'null' project: allOf: - $ref: '#/components/schemas/AiProject' orgId: type: string org: $ref: '#/components/schemas/Org' files: type: array items: $ref: '#/components/schemas/AiAgentFile' bestPractices: type: array items: $ref: '#/components/schemas/AiAgentBestPractice' metadataElements: type: array items: $ref: '#/components/schemas/AiAgentMetadataElement' createdAt: format: date-time type: string updatedAt: format: date-time type: string required: - id - name - type - contextComponents - userInstructions - systemInstructions - projectId - project - orgId - org - files - bestPractices - metadataElements - createdAt - updatedAt McpToolApprovalDto: type: object properties: decisions: type: array items: $ref: '#/components/schemas/McpToolApprovalDecisionDto' mcpConnectionIds: type: array items: type: string mode: type: string enum: - none - researchMode - buildMode - multiOrgMode - artifactMode enableArtifactsVersioning: type: boolean enableResearchRubric: type: boolean required: - decisions - mcpConnectionIds FunnelSnapshot: type: object properties: id: type: string ord: type: number createdById: type: string createdBy: $ref: '#/components/schemas/User' apiName: type: string accountId: type: string account: $ref: '#/components/schemas/Account' name: type: string funnelName: type: string description: type: string recordTypeName: type: string restoredFromSnapshot: type: number funnelDetails: $ref: '#/components/schemas/FunnelDetailsDto' deployments: type: array items: $ref: '#/components/schemas/FunnelDeployment' createdAt: format: date-time type: string required: - id - ord - createdById - createdBy - apiName - accountId - account - name - funnelName - description - recordTypeName - restoredFromSnapshot - funnelDetails - deployments - createdAt AiAgentFile: type: object properties: id: type: string name: type: string type: enum: - txt - json - xml - csv - tsv - log - env - md - config - pdf - docx - png - jpg - jpeg - webp - avif type: string agentId: type: string agent: $ref: '#/components/schemas/AiAgent' createdById: type: string createdBy: $ref: '#/components/schemas/User' createdAt: format: date-time type: string summary: type: string contentHash: type: - string - 'null' description: 'Null until the shared summary row exists. MySQL permits this because a composite foreign key with a null part is not checked.' fileCache: allOf: - $ref: '#/components/schemas/AiAgentFileCache' status: enum: - processing - completed - failed type: string required: - id - name - type - agentId - agent - createdById - createdBy - createdAt - summary - contentHash - fileCache - status FunnelPluginsDto: type: object properties: {} RoleGroup: type: object properties: id: type: string accountId: type: string account: $ref: '#/components/schemas/Account' type: type: string enum: - SYSTEM - USER_CREATED accountRoles: type: array items: $ref: '#/components/schemas/RoleGroupAccountRole' orgRoles: type: array items: $ref: '#/components/schemas/RoleGroupOrgRole' createdById: type: string createdBy: $ref: '#/components/schemas/User' createdAt: format: date-time type: string updatedById: type: string updatedBy: $ref: '#/components/schemas/User' updatedAt: format: date-time type: string name: type: string description: type: string required: - id - accountId - account - type - accountRoles - orgRoles - createdById - createdBy - createdAt - updatedById - updatedBy - updatedAt - name AiChatFolder: type: object properties: id: type: string name: type: string createdById: type: string createdBy: $ref: '#/components/schemas/User' agentId: type: string agent: $ref: '#/components/schemas/AiAgent' createdAt: format: date-time type: string updatedAt: format: date-time type: string required: - id - name - createdById - createdBy - agentId - agent - createdAt - updatedAt AiTableArtifact: type: object properties: id: type: string chatId: type: string chat: $ref: '#/components/schemas/AiChat' accountId: type: string account: $ref: '#/components/schemas/Account' createdById: type: string createdBy: $ref: '#/components/schemas/User' title: type: string markdown: type: string createdAt: format: date-time type: string updatedAt: format: date-time type: string required: - id - chatId - chat - accountId - account - createdById - createdBy - title - markdown - createdAt - updatedAt LeadingObjectDto: type: object properties: objectName: type: string fieldName: type: string _leadingFieldLabels: type: array items: type: string _leadingFieldId: type: string required: - objectName - fieldName - _leadingFieldId DeleteAiChatMessagePairDto: type: object properties: expectedUserCreatedAt: type: string expectedAssistantCreatedAt: type: string required: - expectedUserCreatedAt - expectedAssistantCreatedAt EditAgentSystemInstructionsDto: type: object properties: systemInstructions: type: string required: - systemInstructions McpToolApprovalDecisionDto: type: object properties: toolName: type: string serverType: type: string connectionId: type: string decision: type: string enum: - allow_once - always_allow - deny required: - toolName - serverType - connectionId - decision AiProjectSection: type: object properties: id: type: string name: type: string sortOrder: type: number type: enum: - prompts - artifacts - files type: string isDefault: type: boolean description: 'When true, this section is the auto-placement target for new artifacts produced by `processFinalResult()`. Only one default section per project (only applicable when `type = artifacts`). A default section can be renamed; it can be deleted only when empty. If deleted and new artifacts arrive, it is re-created automatically.' runMode: description: 'How "Run section" executes prompts. Only applicable when `type = prompts`. - `individual`: each prompt creates its own chat (default) - `queue`: one chat, prompts run as sequential messages' enum: - individual - queue type: string projectId: type: string project: $ref: '#/components/schemas/AiProject' items: type: array items: $ref: '#/components/schemas/AiProjectSectionItem' required: - id - name - sortOrder - type - isDefault - runMode - projectId - project - items AiProjectOriginTemplate: type: object properties: projectId: type: string project: $ref: '#/components/schemas/AiProject' originTemplateExternalId: type: string enum: - blank - cpq-agentforce-revenue-management - process-builder-to-flow - profiles-permission-set-groups-migration - visualforce-aura-lwc-modernization - field-cleanup-hygiene - salesforce-winter-27-release-prep - ai-security-risk-remediation - product-catalog-rationalization - agentforce-readiness required: - projectId - project - originTemplateExternalId AiAgentMetadataElement: type: object properties: aiAgentId: type: string name: type: string type: type: string aiAgent: $ref: '#/components/schemas/AiAgent' createdAt: format: date-time type: string required: - aiAgentId - name - type - aiAgent - createdAt AiArtifact: type: object properties: id: type: string artifactId: type: string chatId: type: string chat: $ref: '#/components/schemas/AiChat' accountId: type: string account: $ref: '#/components/schemas/Account' createdById: type: string createdBy: $ref: '#/components/schemas/User' title: type: string code: type: string version: type: number isShared: type: boolean isPublic: type: boolean toolResults: type: - object - 'null' createdAt: format: date-time type: string updatedAt: format: date-time type: string required: - id - artifactId - chatId - chat - accountId - account - createdById - createdBy - title - code - version - isShared - isPublic - toolResults - createdAt - updatedAt EditAgentUserInstructionsDto: type: object properties: userInstructions: type: string required: - userInstructions RoleGroupAccountRole: type: object properties: role: type: object roleGroupId: type: string roleGroup: $ref: '#/components/schemas/RoleGroup' required: - role - roleGroupId - roleGroup AiChatMessageDto: type: object properties: role: type: number enum: [] content: type: object replyTo: type: string createdAt: format: date-time type: string hidden: type: boolean required: - role - content - createdAt SubmitFeedbackDto: type: object properties: satisfaction: type: number minimum: 0 maximum: 1 required: - satisfaction ManageBestPracticesDto: type: object properties: bestPracticeIds: minItems: 1 type: array items: type: string format: uuid required: - bestPracticeIds PatchAgentConfigurationsDto: type: object properties: includeConfigurations: type: array items: $ref: '#/components/schemas/IncludeConfigurationDto' required: - includeConfigurations AiProject: type: object properties: id: type: string name: type: string description: type: - string - 'null' visibility: enum: - team - private type: string accountId: type: string account: $ref: '#/components/schemas/Account' createdById: type: string autonomyMode: enum: - guided - balanced - autonomous type: - string - 'null' originTemplateId: description: 'API-facing origin template id. Not a DB column — populated from `originTemplate.originTemplateExternalId` when that relation is loaded.' enum: - blank - cpq-agentforce-revenue-management - process-builder-to-flow - profiles-permission-set-groups-migration - visualforce-aura-lwc-modernization - field-cleanup-hygiene - salesforce-winter-27-release-prep - ai-security-risk-remediation - product-catalog-rationalization - agentforce-readiness type: - string - 'null' originTemplate: allOf: - $ref: '#/components/schemas/AiProjectOriginTemplate' agent: $ref: '#/components/schemas/AiAgent' sections: type: array items: $ref: '#/components/schemas/AiProjectSection' createdAt: format: date-time type: string updatedAt: format: date-time type: string required: - id - name - description - visibility - accountId - account - createdById - autonomyMode - agent - sections - createdAt - updatedAt FunnelDeployment: type: object properties: id: type: string crmOrgId: type: string crmOrg: $ref: '#/components/schemas/CrmOrg' snapshotId: type: string snapshot: $ref: '#/components/schemas/FunnelSnapshot' deployedById: type: string deployedBy: $ref: '#/components/schemas/User' deployedAt: format: date-time type: string status: type: object required: - id - crmOrgId - crmOrg - snapshotId - snapshot - deployedById - deployedBy - deployedAt - status ConfirmFileUploadDto: type: object properties: fileKey: type: string fileName: type: string fileType: type: string enum: - txt - json - xml - csv - tsv - log - env - md - config - pdf - docx - png - jpg - jpeg - webp - avif required: - fileKey - fileName - fileType CrmOrg: type: object properties: id: type: string org: $ref: '#/components/schemas/Org' name: type: string platform: type: string instanceUrl: type: string isSandbox: type: boolean isMain: type: boolean isDemo: type: boolean isConnected: type: object default: false createdById: type: string createdBy: $ref: '#/components/schemas/User' fetchStatus: enum: - fetching - initial_fetching - error - fetched - invalid_credentials type: string lastSuccessfulFetchTs: type: number disconnectedAt: format: date-time type: - string - 'null' createdAt: format: date-time type: string updatedAt: format: date-time type: string accountId: type: string connectedUser: type: string account: $ref: '#/components/schemas/Account' deployments: type: array items: $ref: '#/components/schemas/FunnelDeployment' optMonitoring: type: boolean graphVersion: type: - string - 'null' graphDbReleaseChannel: enum: - stable - beta - shadow type: - string - 'null' tier: enum: - T0 - T1 type: string required: - id - org - name - platform - instanceUrl - isSandbox - isMain - isDemo - isConnected - createdById - createdBy - fetchStatus - lastSuccessfulFetchTs - disconnectedAt - createdAt - updatedAt - accountId - connectedUser - account - deployments - optMonitoring - graphVersion - graphDbReleaseChannel - tier SupportContextDto: type: object properties: recordId: type: string objectName: type: string sfdcUserId: type: string Account: type: object properties: id: type: string name: type: string authZeroOrgId: type: string createdAt: format: date-time type: string updatedAt: format: date-time type: string deletedAt: format: date-time type: string onboardingStep: type: string enum: - ConnectOrg - Completed trialStartDate: format: date-time type: string trialEndDate: format: date-time type: string type: type: string enum: - Customer - POC - Inactive - SI - Free - Internal roleGroups: type: array items: $ref: '#/components/schemas/RoleGroup' users: type: array items: $ref: '#/components/schemas/User' disableAi: type: boolean isBuildModeEnabled: type: boolean lastSeen: format: date-time type: string allowedIpRanges: type: - array - 'null' items: type: string required: - id - name - authZeroOrgId - createdAt - updatedAt - deletedAt - onboardingStep - trialStartDate - trialEndDate - type - roleGroups - users - disableAi - isBuildModeEnabled - lastSeen - allowedIpRanges AiChat: type: object properties: id: type: string name: type: string aiChatDetails: type: object orgId: type: string org: $ref: '#/components/schemas/Org' accountId: type: string account: $ref: '#/components/schemas/Account' agentId: type: string agent: $ref: '#/components/schemas/AiAgent' createdAt: format: date-time type: string updatedAt: format: date-time type: string userId: type: - string - 'null' sfdcUserId: type: - string - 'null' isFavorite: type: boolean folderId: type: - string - 'null' folder: $ref: '#/components/schemas/AiChatFolder' chatContext: type: string chatSource: enum: - Sweep - Salesforce type: string required: - id - name - aiChatDetails - orgId - org - accountId - account - agentId - agent - createdAt - updatedAt - userId - sfdcUserId - isFavorite - folderId - folder - chatContext - chatSource Org: type: object properties: id: type: string accountId: type: string account: $ref: '#/components/schemas/Account' required: - id - accountId - account SweepStage: type: object properties: stageName: type: string _stageId: type: string stageDescription: type: string _branchIndex: type: number _stageColumnIndex: type: number exitCriteria: type: array items: $ref: '#/components/schemas/SweepExitCriteria' assignmentRules: type: array items: $ref: '#/components/schemas/SweepAssignmentRule' _team: type: string stageType: type: string enum: - regular - lost - nurturing preventBackwardStages: type: boolean funnelLinks: type: array items: $ref: '#/components/schemas/FunnelLinkDto' additionalFields: default: [] type: array items: $ref: '#/components/schemas/SweepFieldReference' required: - stageName - _stageId - stageDescription - exitCriteria - assignmentRules RoleGroupOrgRole: type: object properties: role: type: object crmOrgId: type: string crmOrg: $ref: '#/components/schemas/CrmOrg' roleGroupId: type: string roleGroup: $ref: '#/components/schemas/RoleGroup' required: - role - crmOrgId - crmOrg - roleGroupId - roleGroup GenerateFileUploadUrlDto: type: object properties: fileName: type: string fileType: type: string enum: - txt - json - xml - csv - tsv - log - env - md - config - pdf - docx - png - jpg - jpeg - webp - avif contentType: type: string required: - fileName - fileType - contentType UpdateIssueDto: type: object properties: status: type: object severity: type: object AiProjectSectionItem: type: object properties: id: type: string sortOrder: type: number sectionId: type: string section: $ref: '#/components/schemas/AiProjectSection' promptId: type: - string - 'null' prompt: allOf: - $ref: '#/components/schemas/AiProjectPrompt' artifactId: type: - string - 'null' artifact: allOf: - $ref: '#/components/schemas/AiArtifact' tableArtifactId: type: - string - 'null' tableArtifact: allOf: - $ref: '#/components/schemas/AiTableArtifact' fileId: type: - string - 'null' file: allOf: - $ref: '#/components/schemas/AiAgentFile' required: - id - sortOrder - sectionId - section - promptId - prompt - artifactId - artifact - tableArtifactId - tableArtifact - fileId - file ChatMessageDto: type: object properties: message: $ref: '#/components/schemas/AiChatMessageDto' mode: enum: - none - researchMode - buildMode - multiOrgMode - artifactMode type: string additionalOrgIds: type: array items: type: string format: uuid enableArtifactsVersioning: type: boolean enableUnifiedArtifactFilePath: type: boolean enableResearchRubric: type: boolean useRedis: type: boolean mcpConnectionIds: type: array items: type: string format: uuid chatName: type: string folderId: type: string format: uuid promptId: type: string format: uuid supportContext: $ref: '#/components/schemas/SupportContextDto' required: - message AiBuildDefinition: type: object properties: id: type: string chatId: type: string chat: $ref: '#/components/schemas/AiChat' text: type: string status: type: string enum: - draft - building - success - partial_success - failed createdAt: format: date-time type: string updatedAt: format: date-time type: string required: - id - chatId - chat - text - status - createdAt - updatedAt CreateAgentDto: type: object properties: name: type: string type: type: object contextComponents: type: object userInstructions: type: string systemInstructions: type: string bestPracticeIds: type: array items: type: string format: uuid metadataElements: type: array items: $ref: '#/components/schemas/IncludeConfigurationDto' required: - name - type - contextComponents AiAgentFileCache: type: object properties: contentHash: type: string name: type: string summary: type: string files: type: array items: $ref: '#/components/schemas/AiAgentFile' createdAt: format: date-time type: string updatedAt: format: date-time type: string required: - contentHash - name - summary - files - createdAt - updatedAt EditAgentNameDto: type: object properties: name: type: string required: - name securitySchemes: bearer: scheme: bearer bearerFormat: JWT type: http