openapi: 3.0.0 info: title: Dust Conversations API version: 1.0.2 description: Create and drive multi-turn conversations with Dust agents — post messages, stream events, manage content fragments, gather feedback, and resolve mentions. contact: name: Dust Support url: https://docs.dust.tt license: name: MIT url: https://github.com/dust-tt/dust/blob/main/LICENSE servers: - url: https://dust.tt description: Dust.tt API (us-central1) - url: https://eu.dust.tt description: Dust.tt API (europe-west1) tags: - name: Conversations description: Conversations - name: Feedbacks description: Message feedbacks - name: Mentions description: Mentions paths: /api/v1/w/{wId}/assistant/conversations/{cId}/cancel: post: tags: - Conversations summary: Cancel Message Generation in a Conversation parameters: - name: wId in: path required: true schema: type: string description: Workspace ID - name: cId in: path required: true schema: type: string description: Conversation ID security: - BearerAuth: [] requestBody: required: true content: application/json: schema: type: object required: - messageIds properties: messageIds: type: array description: List of message IDs to cancel generation for items: type: string responses: '200': description: Message generation successfully canceled content: application/json: schema: type: object properties: success: type: boolean description: Indicates if the cancellation was successful '400': description: Invalid request (invalid query parameters or request body) '405': description: Method not supported /api/v1/w/{wId}/assistant/conversations/{cId}/content_fragments: post: summary: Create a Content Fragment description: Create a new content fragment in the workspace identified by {wId}. tags: - Conversations parameters: - in: path name: wId required: true description: ID of the workspace schema: type: string - in: path name: cId required: true description: ID of the conversation schema: type: string security: - BearerAuth: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/ContentFragment' responses: '200': description: Content fragment created successfully. content: application/json: schema: $ref: '#/components/schemas/ContentFragment' '400': description: Bad Request. Missing or invalid parameters. '401': description: Unauthorized. Invalid or missing authentication token. '500': description: Internal Server Error. /api/v1/w/{wId}/assistant/conversations/{cId}/events: get: summary: Get the Events for a Conversation description: Get the events for a conversation in the workspace identified by {wId}. tags: - Conversations parameters: - in: path name: wId required: true description: ID of the workspace schema: type: string - in: path name: cId required: true description: ID of the conversation schema: type: string - in: query name: lastEventId required: false description: ID of the last event schema: type: string security: - BearerAuth: [] responses: '200': description: Events for the conversation, view the "Events" page from this documentation for more information. '400': description: Bad Request. Missing or invalid parameters. '401': description: Unauthorized. Invalid or missing authentication token. '404': description: Conversation not found. '405': description: Method not supported. Only GET is expected. '500': description: Internal Server Error. /api/v1/w/{wId}/assistant/conversations/{cId}/feedbacks: get: summary: Get Feedbacks for a Conversation description: 'Retrieves all feedback entries for a specific conversation. Requires authentication and read:conversation scope. ' tags: - Feedbacks parameters: - name: wId in: path description: Workspace ID required: true schema: type: string - name: cId in: path description: Conversation ID required: true schema: type: string security: - BearerAuth: [] responses: '200': description: List of feedback entries for the conversation content: application/json: schema: type: object properties: feedbacks: type: array items: type: object properties: messageId: type: string description: ID of the message that received feedback agentMessageId: type: number description: ID of the agent message userId: type: number description: ID of the user who gave feedback thumbDirection: type: string enum: - up - down description: Direction of the thumb feedback content: type: string nullable: true description: Optional feedback content/comment createdAt: type: number description: Timestamp when feedback was created agentConfigurationId: type: string description: ID of the agent configuration agentConfigurationVersion: type: number description: Version of the agent configuration isConversationShared: type: boolean description: Whether the conversation was shared '400': description: Invalid request parameters '401': description: Unauthorized '403': description: Forbidden '404': description: Conversation not found '500': description: Internal server error /api/v1/w/{wId}/assistant/conversations/{cId}/files/{rel}: get: tags: - Conversations summary: Download a Conversation-Scoped File by Path description: 'Download a file from a conversation''s file system by its scoped path. The path must be conversation-scoped, i.e. start with `conversation/` (as surfaced by agent file system tools). The file content is streamed directly from the conversation mount. ' parameters: - name: wId in: path required: true description: ID of the workspace schema: type: string - name: cId in: path required: true description: ID of the conversation schema: type: string - name: rel in: path required: true description: 'Conversation-scoped file path, e.g. `conversation/foo.pdf` or `conversation/subdir/foo.pdf`. The `conversation/` prefix is required; any other scope prefix is rejected. Path traversal segments (`..`) are rejected. ' schema: type: string security: - BearerAuth: [] responses: '200': description: File content streamed directly. content: application/octet-stream: schema: type: string format: binary '400': description: Missing or invalid path parameters (e.g. missing or wrong scope prefix). '403': description: Resolved path is outside the conversation scope. '404': description: Conversation or file not found. '405': description: Method not supported. /api/v1/w/{wId}/assistant/conversations/{cId}: get: summary: Get a Conversation description: Get a conversation in the workspace identified by {wId}. Supports optional pagination of message content via limit and lastValue query parameters. tags: - Conversations security: - BearerAuth: [] parameters: - in: path name: wId required: true description: ID of the workspace schema: type: string - in: path name: cId required: true description: ID of the conversation schema: type: string - in: query name: limit required: false description: Maximum number of messages to return. When omitted, all messages are returned. schema: type: integer - in: query name: lastValue required: false description: Cursor value (message rank) from a previous response to fetch the next page of messages. schema: type: string responses: '200': description: Conversation retrieved successfully. content: application/json: schema: $ref: '#/components/schemas/Conversation' '400': description: Bad Request. Missing or invalid parameters. '401': description: Unauthorized. Invalid or missing authentication token. '404': description: Conversation not found. '405': description: Method not supported. Only GET is expected. '500': description: Internal Server Error. patch: summary: Update Conversation Read Status description: Mark a conversation as read or unread in the workspace identified by {wId}. tags: - Conversations security: - BearerAuth: [] parameters: - in: path name: wId required: true description: ID of the workspace schema: type: string - in: path name: cId required: true description: ID of the conversation schema: type: string requestBody: required: true content: application/json: schema: type: object properties: read: type: boolean responses: '200': description: Conversation marked as read successfully. content: application/json: schema: type: object properties: success: type: boolean '400': description: Bad Request. Invalid or missing parameters. '401': description: Unauthorized. Invalid or missing authentication token. '404': description: Conversation not found. '405': description: Method not supported. Only GET or PATCH is expected. '500': description: Internal Server Error. /api/v1/w/{wId}/assistant/conversations/{cId}/mentions/suggestions: get: summary: Get Mention Suggestions for a Conversation description: Get suggestions for mentions (agents and users) based on a query string, scoped to a specific conversation. tags: - Mentions parameters: - in: path name: wId required: true description: ID of the workspace schema: type: string - in: path name: cId required: true description: ID of the conversation schema: type: string - in: query name: query required: true description: Search query string to filter suggestions schema: type: string - in: query name: select required: false description: Array of mention types to include. Can be "agents", "users", or both. If not provided, defaults to agents and users. schema: type: array items: type: string enum: - agents - users - in: query name: current required: false description: Whether to include the current user in the suggestions. schema: type: boolean security: - BearerAuth: [] responses: '200': description: List of mention suggestions content: application/json: schema: type: object properties: suggestions: type: array items: $ref: '#/components/schemas/RichMention' '400': description: Bad Request. Missing or invalid parameters. '401': description: Unauthorized. Invalid or missing authentication token. '404': description: Conversation not found. '405': description: Method not supported. Only GET is expected. '500': description: Internal Server Error. /api/v1/w/{wId}/assistant/conversations/{cId}/messages/{mId}/answer-question: post: summary: Answer a User Question in a Conversation Message description: Submits an answer to a question asked by an agent in a specific message tags: - Conversations parameters: - in: path name: wId required: true schema: type: string description: Workspace ID - in: path name: cId required: true schema: type: string description: Conversation ID - in: path name: mId required: true schema: type: string description: Message ID requestBody: required: true content: application/json: schema: type: object required: - actionId - answer properties: actionId: type: string description: ID of the action to answer answer: type: object required: - selectedOptions properties: selectedOptions: type: array items: type: integer description: Indices of selected options customResponse: type: string description: Optional free-text response responses: '200': description: Answer submitted successfully content: application/json: schema: type: object properties: success: type: boolean '400': description: Invalid request body or action not blocked '403': description: User not authorized to answer this question '404': description: Conversation, message, or action not found '405': description: Method not allowed '500': description: Internal server error security: - BearerAuth: [] /api/v1/w/{wId}/assistant/conversations/{cId}/messages/{mId}/edit: post: tags: - Conversations summary: Edit an Existing Message in a Conversation parameters: - name: wId in: path required: true schema: type: string description: Workspace ID - name: cId in: path required: true schema: type: string description: Conversation ID - name: mId in: path required: true schema: type: string description: Message ID to edit security: - BearerAuth: [] requestBody: required: true content: application/json: schema: type: object required: - content - mentions properties: content: type: string description: New content for the message mentions: type: array description: List of agent mentions in the message items: type: object required: - configurationId properties: configurationId: type: string description: ID of the mentioned agent configuration responses: '200': description: Message successfully edited content: application/json: schema: type: object properties: message: type: object description: The edited user message agentMessages: type: array description: Optional array of agent messages generated in response '400': description: Invalid request (message not found or not a user message) '405': description: Method not supported /api/v1/w/{wId}/assistant/conversations/{cId}/messages/{mId}/events: get: summary: Get Events for a Message description: Get events for a message in the workspace identified by {wId}. tags: - Conversations parameters: - in: path name: wId required: true description: ID of the workspace schema: type: string - in: path name: cId required: true description: ID of the conversation schema: type: string - in: path name: mId required: true description: ID of the message schema: type: string - in: query name: lastEventId description: ID of the last event received schema: type: string security: - BearerAuth: [] responses: '200': description: The events content: application/json: schema: type: object properties: events: type: array items: type: object properties: id: type: string description: ID of the event type: type: string description: Type of the event data: $ref: '#/components/schemas/Message' '400': description: Bad Request '401': description: Unauthorized '404': description: Not Found '500': description: Internal Server Error /api/v1/w/{wId}/assistant/conversations/{cId}/messages/{mId}/feedbacks: post: summary: Submit Feedback for a Specific Message in a Conversation description: 'Submit user feedback (thumbs up/down) for a specific message in a conversation. Requires authentication and update:conversation scope. ' tags: - Feedbacks parameters: - name: wId in: path description: Workspace ID required: true schema: type: string - name: cId in: path description: Conversation ID required: true schema: type: string - name: mId in: path description: Message ID required: true schema: type: string security: - BearerAuth: [] requestBody: required: true content: application/json: schema: type: object required: - thumbDirection properties: thumbDirection: type: string enum: - up - down description: Direction of the thumb feedback feedbackContent: type: string description: Optional feedback text content isConversationShared: type: boolean description: Whether the conversation is shared responses: '200': description: Feedback submitted successfully content: application/json: schema: type: object properties: success: type: boolean '400': description: Invalid request parameters or body '401': description: Unauthorized '404': description: Conversation or message not found delete: summary: Delete Feedback for a Specific Message description: 'Delete user feedback for a specific message in a conversation. Requires authentication and update:conversation scope. ' tags: - Feedbacks parameters: - name: wId in: path description: Workspace ID required: true schema: type: string - name: cId in: path description: Conversation ID required: true schema: type: string - name: mId in: path description: Message ID required: true schema: type: string security: - BearerAuth: [] responses: '200': description: Feedback deleted successfully content: application/json: schema: type: object properties: success: type: boolean '400': description: Invalid request parameters '401': description: Unauthorized '404': description: Conversation, message or feedback not found /api/v1/w/{wId}/assistant/conversations/{cId}/messages/{mId}/validate-action: post: summary: Validate an Action in a Conversation Message description: Approves or rejects an action taken in a specific message in a conversation tags: - Conversations parameters: - in: path name: wId required: true schema: type: string description: Workspace ID - in: path name: cId required: true schema: type: string description: Conversation ID - in: path name: mId required: true schema: type: string description: Message ID requestBody: required: true content: application/json: schema: type: object required: - actionId - approved properties: actionId: type: string description: ID of the action to validate approved: type: boolean description: Whether the action is approved or rejected responses: '200': description: Action validation successful content: application/json: schema: type: object properties: success: type: boolean '400': description: Invalid request body '404': description: Conversation, message, or workspace not found '405': description: Method not allowed '500': description: Internal server error security: - BearerAuth: [] /api/v1/w/{wId}/assistant/conversations/{cId}/messages: post: summary: Create a Message description: Create a message in the workspace identified by {wId} in the conversation identified by {cId}. tags: - Conversations parameters: - in: path name: wId required: true description: ID of the workspace schema: type: string - in: path name: cId required: true description: ID of the conversation schema: type: string security: - BearerAuth: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/Message' responses: '200': description: Message created successfully. content: application/json: schema: $ref: '#/components/schemas/Message' '400': description: Bad Request. Missing or invalid parameters. '401': description: Unauthorized. Invalid or missing authentication token. '403': description: Forbidden. Workspace or usage limits exceeded, or access denied. '429': description: Rate limit exceeded. '500': description: Internal Server Error. /api/v1/w/{wId}/assistant/conversations: post: summary: Create a New Conversation description: Create a new conversation in the workspace identified by {wId}. tags: - Conversations parameters: - in: path name: wId required: true description: ID of the workspace schema: type: string security: - BearerAuth: [] requestBody: required: true content: application/json: schema: type: object required: - message properties: message: $ref: '#/components/schemas/Message' contentFragments: type: array items: $ref: '#/components/schemas/ContentFragment' description: The list of content fragments to attach to this conversation (optional) title: type: string description: The title of the conversation example: My conversation skipToolsValidation: type: boolean description: Whether to skip the tools validation of the agent messages triggered by this user message (optional, defaults to false) example: false blocking: type: boolean description: Whether to wait for the agent to generate the initial message. If true the query will wait for the agent's answer. If false (default), the API will return a conversation ID directly and you will need to use streaming events to get the messages. example: true spaceId: type: string description: The sId of the space (project) in which to create the conversation (optional). If not provided, the conversation is created outside projects example: space_abc123 responses: '200': description: Conversation created successfully. content: application/json: schema: $ref: '#/components/schemas/Conversation' '400': description: Bad Request '401': description: Unauthorized '429': description: Rate limit exceeded. '500': description: Internal Server Error /api/v1/w/{wId}/assistant/mentions/parse: post: summary: Parse Mentions in Markdown Text description: 'Parses pasted text containing @ mentions and converts them to the proper mention format. Matches @agentName or @userName patterns against available agents and users. ' tags: - Mentions parameters: - in: path name: wId required: true description: ID of the workspace schema: type: string security: - BearerAuth: [] requestBody: required: true content: application/json: schema: type: object required: - markdown properties: markdown: type: string description: Markdown text containing @ mentions to parse example: Hello @JohnDoe, can you help with @MyAgent? responses: '200': description: Parsed markdown with mentions converted to proper format content: application/json: schema: type: object properties: markdown: type: string description: Processed markdown text with mentions converted to serialized format '400': description: Bad Request. Missing or invalid request body. '401': description: Unauthorized. Invalid or missing authentication token. '405': description: Method not supported. Only POST is expected. '500': description: Internal Server Error. /api/v1/w/{wId}/assistant/mentions/suggestions: get: summary: Get Mention Suggestions description: Get suggestions for mentions (agents and users) based on a query string. tags: - Mentions parameters: - in: path name: wId required: true description: ID of the workspace schema: type: string - in: query name: query required: true description: Search query string to filter suggestions schema: type: string - in: query name: select required: false description: Array of mention types to include. Can be "agents", "users", or both. If not provided, defaults to agents and users. schema: type: array items: type: string enum: - agents - users - in: query name: current required: false description: Whether to include the current user in the suggestions. schema: type: boolean security: - BearerAuth: [] responses: '200': description: List of mention suggestions content: application/json: schema: type: object properties: suggestions: type: array items: $ref: '#/components/schemas/RichMention' '400': description: Bad Request. Missing or invalid parameters. '401': description: Unauthorized. Invalid or missing authentication token. '405': description: Method not supported. Only GET is expected. '500': description: Internal Server Error. /api/v1/w/{wId}/files: post: tags: - Conversations summary: Create a File Upload URL parameters: - name: wId in: path required: true description: ID of the workspace schema: type: string security: - BearerAuth: [] requestBody: required: true content: application/json: schema: type: object required: - contentType - fileName - fileSize - useCase - useCaseMetadata properties: contentType: type: string description: MIME type of the file fileName: type: string description: Name of the file fileSize: type: integer description: Size of the file in bytes useCase: type: string description: Intended use case for the file, use "conversation" useCaseMetadata: type: string description: (optional) Metadata for the use case, for conversation useCase should be dictionary with conversationId stringified responses: '200': description: File upload URL created successfully content: application/json: schema: type: object properties: file: type: object properties: sId: type: string description: Unique string identifier for the file uploadUrl: type: string description: Upload URL for the file '400': description: Invalid request or unsupported file type '401': description: Unauthorized '429': description: Rate limit exceeded components: schemas: AgentConfiguration: type: object properties: id: type: integer example: 12345 sId: type: string description: Unique string identifier for the agent configuration example: 7f3a9c2b1e version: type: integer example: 2 versionCreatedAt: type: string nullable: true description: Timestamp of when the version was created example: '2023-06-15T14:30:00Z' versionAuthorId: type: string nullable: true description: ID of the user who created this version example: 0ec9852c2f name: type: string description: Name of the agent configuration example: Customer Support Agent description: type: string description: Description of the agent configuration example: An AI agent designed to handle customer support inquiries instructions: type: string nullable: true description: Instructions for the agent example: Always greet the customer politely and try to resolve their issue efficiently. pictureUrl: type: string description: URL of the agent's picture example: https://example.com/agent-images/support-agent.png status: type: string description: Current status of the agent configuration example: active scope: type: string description: Scope of the agent configuration example: workspace userFavorite: type: boolean description: Status of the user favorite for this configuration example: true model: type: object properties: providerId: type: string description: ID of the model provider example: openai modelId: type: string description: ID of the specific model example: gpt-4 temperature: type: number example: 0.7 actions: type: array example: [] maxStepsPerRun: type: integer example: 10 templateId: type: string nullable: true description: ID of the template used for this configuration example: b4e2f1a9c7 ContentFragment: type: object required: - title properties: title: type: string description: The title of the content fragment example: My content fragment content: type: string description: The content of the content fragment (optional if `fileId` is set) example: This is my content fragment extracted text contentType: type: string description: The content type of the content fragment (optional if `fileId` is set) example: text/plain url: type: string description: The URL of the content fragment example: https://example.com/content fileId: type: string description: The id of the previously uploaded file (optional if `content` and `contentType` are set) example: fil_123456 path: type: string nullable: true description: Path of this file inside the sandbox conversation mount. example: conversation/report.csv skipFileProcessing: type: boolean description: Whether upload-time file processing was skipped. nodeId: type: string description: The id of the content node (optional if `content` and `contentType` are set) example: node_123456 nodeDataSourceViewId: type: string description: The id of the data source view (optional if `content` and `contentType` are set) example: dsv_123456 context: $ref: '#/components/schemas/Context' Context: type: object required: - username - timezone properties: username: type: string description: Username in the current context example: johndoe123 timezone: type: string description: User's timezone example: America/New_York fullName: type: string description: User's full name in the current context example: John Doe email: type: string description: User's email in the current context example: john.doe@example.com profilePictureUrl: type: string description: URL of the user's profile picture example: https://example.com/profiles/johndoe123.jpg agenticMessageData: type: object properties: type: type: string enum: - run_agent - agent_handover description: Type of the agentic message originMessageId: type: string description: ID of the origin message example: 2b8e4f6a0c Conversation: type: object properties: conversation: type: object properties: id: type: integer example: 67890 created: type: integer example: 1625097600 sId: type: string description: Unique string identifier for the conversation example: 3d8f6a2c1b owner: $ref: '#/components/schemas/Workspace' title: type: string description: Title of the conversation example: 'Customer Inquiry #1234' visibility: type: string description: Visibility setting of the conversation example: private content: type: array items: type: array items: type: object properties: id: type: integer example: 1 sId: type: string description: Unique string identifier for the message example: 9e7d5c3a1f type: type: string description: Type of the message example: human visibility: type: string description: Visibility setting of the message example: visible version: type: integer example: 1 created: type: integer example: 1625097700 user: $ref: '#/components/schemas/User' mentions: type: array items: $ref: '#/components/schemas/Mention' content: type: string description: Content of the message example: Hello, I need help with my order. context: $ref: '#/components/schemas/Context' agentMessageId: type: integer example: 1 parentMessageId: type: string description: ID of the parent message example: 2b8e4f6a0c status: type: string description: Status of the message example: completed actions: type: array example: [] chainOfThought: type: string nullable: true description: Chain of thought for the message example: The user is asking about their order. I should first greet them and then ask for their order number. rawContents: type: array items: type: object properties: step: type: integer example: 1 content: type: string description: Content for each step example: Hello! I'd be happy to help you with your order. Could you please provide your order number? error: type: string nullable: true description: Error message, if any example: null configuration: $ref: '#/components/schemas/AgentConfiguration' Mention: type: object properties: configurationId: type: string description: ID of the mentioned agent configuration example: 7f3a9c2b1e Message: type: object required: - content - mentions properties: content: type: string description: The content of the message. Should not be empty. example: This is my message mentions: type: array description: Empty array is accepted but won't trigger any agent. items: $ref: '#/components/schemas/Mention' context: $ref: '#/components/schemas/Context' RichMention: type: object description: A rich mention suggestion containing detailed information about an agent or user required: - id - type - label - pictureUrl - description properties: id: type: string description: Unique identifier for the mention (agent sId or user sId) example: 7f3a9c2b1e type: type: string enum: - agent - user description: Type of the mention example: agent label: type: string description: Display label for the mention example: My Assistant pictureUrl: type: string description: URL of the profile picture example: https://example.com/avatar.png description: type: string description: Description of the mention (agent description or user email) example: A helpful AI assistant userFavorite: type: boolean nullable: true description: Whether the agent is marked as a favorite by the user (only for agent mentions) example: true User: type: object properties: sId: type: string description: Unique string identifier for the user example: 0ec9852c2f id: type: integer example: 12345 createdAt: type: integer example: 1625097600 username: type: string description: User's chosen username example: johndoe email: type: string description: User's email address example: john.doe@example.com firstName: type: string description: User's first name example: John lastName: type: string description: User's last name example: Doe fullName: type: string description: User's full name example: John Doe provider: type: string description: Authentication provider used by the user example: google image: type: string description: URL of the user's profile image example: https://example.com/profile/johndoe.jpg Workspace: type: object required: - regionalModelsOnly properties: id: type: integer example: 67890 sId: type: string description: Unique string identifier for the workspace example: dQFf9l5FQY name: type: string description: Name of the workspace example: My Awesome Workspace role: type: string description: User's role in the workspace example: admin segmentation: type: string nullable: true description: Segmentation information for the workspace example: enterprise flags: type: array items: type: string description: Feature flags enabled for the workspace example: - advanced_analytics - beta_features ssoEnforced: type: boolean example: true regionalModelsOnly: type: boolean description: When true, only models whose regionalAvailability includes the workspace's region are usable. example: false whiteListedProviders: type: array items: type: string description: List of allowed authentication providers example: - google - github defaultEmbeddingProvider: type: string nullable: true description: Default provider for embeddings in the workspace example: openai securitySchemes: BearerAuth: type: http scheme: bearer description: Your DUST API key is a Bearer token.