> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dust.tt/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a new conversation

> Create a new conversation in the workspace identified by {wId}.



## OpenAPI

````yaml /docs/developer-platform/dust-api-documentation/openapi.json post /api/v1/w/{wId}/assistant/conversations
openapi: 3.0.0
info:
  title: DUST API Documentation
  version: 1.0.2
  description: The OpenAPI specification for the Dust.tt API
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: https://dust.tt
    description: Dust.tt API (us-central1)
  - url: https://eu.dust.tt
    description: Dust.tt API (europe-west1)
security: []
tags:
  - name: Agents
    description: Agent configurations
  - name: Apps
    description: Dust apps
  - name: Conversations
    description: Conversations
  - name: DatasourceViews
    description: Data source views
  - name: Datasources
    description: Data sources
  - name: Feedbacks
    description: Message feedbacks
  - name: MCP
    description: MCP servers
  - name: Mentions
    description: Mentions
  - name: Search
    description: Search
  - name: Tools
    description: Tools
  - name: Triggers
    description: Triggers
  - name: Skills
    description: Skills
  - name: Spaces
    description: Spaces
  - name: Workspace
    description: Workspace
  - name: Private User
    description: Private API - User
  - name: Private Authentication
    description: Private API - Authentication (WorkOS)
  - name: Private Agents
    description: Private API - Agent configurations
  - name: Private Conversations
    description: Private API - Conversations
  - name: Private Messages
    description: Private API - Messages
  - name: Private Events
    description: Private API - SSE event streams
  - name: Private Files
    description: Private API - File uploads
  - name: Private Mentions
    description: Private API - Mention suggestions
  - name: Private Spaces
    description: Private API - Spaces and data source views
  - name: Private Extension
    description: Private API - Extension configuration
  - name: Private Workspace
    description: Private API - Workspace settings
paths:
  /api/v1/w/{wId}/assistant/conversations:
    post:
      tags:
        - Conversations
      summary: Create a new conversation
      description: Create a new conversation in the workspace identified by {wId}.
      parameters:
        - in: path
          name: wId
          required: true
          description: ID of the workspace
          schema:
            type: string
      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
      security:
        - BearerAuth: []
components:
  schemas:
    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'
    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
        skipDataSourceIndexing:
          type: boolean
          description: Whether data source indexing was skipped for this file.
        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'
    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
                      items:
                        type: object
                        properties:
                          generatedFiles:
                            type: array
                            description: >
                              Files generated by this action. Path-backed files
                              have `fileId: null`

                              and can be downloaded through the conversation
                              files endpoint using

                              `filePath`.
                            items:
                              type: object
                              properties:
                                fileId:
                                  type: string
                                  nullable: true
                                  description: >-
                                    Dust file id for DB-backed files, or null
                                    for path-backed files.
                                filePath:
                                  type: string
                                  description: >-
                                    Canonical scoped path for path-backed files,
                                    as surfaced by agent file system tools.
                                title:
                                  type: string
                                contentType:
                                  type: string
                                snippet:
                                  type: string
                                  nullable: true
                                hidden:
                                  type: boolean
                                isInProjectContext:
                                  type: boolean
                    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
    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
    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
    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
    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
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Your DUST API key is a Bearer token.

````