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

# Create New Conversation

> Creates a new conversation with customizable research mode, system prompt, and space association. Supports follow-up threads and MCP tool configuration.



## OpenAPI

````yaml api-reference/openapi.json post /api/v1/integration/conversations
openapi: 3.1.0
info:
  title: Thesis.io APIs
  description: >-
    Thesis.io provides comprehensive AI-powered research and conversation APIs
    for DeFi analysis and blockchain research. Create conversations with
    customizable research modes including chat, deep research, and specialized
    DeFi tools for real-time market analysis. Join existing conversations via
    streaming endpoints to participate in collaborative research sessions with
    advanced AI agents.
  version: 0.32.1
servers:
  - url: https://app-be.thesis.io
    description: Production Thesis APIs
security:
  - APIKeyAuth: []
  - {}
paths:
  /api/v1/integration/conversations:
    post:
      tags:
        - conversations
        - conversations
      summary: Create New Conversation
      description: >-
        Creates a new conversation with customizable research mode, system
        prompt, and space association. Supports follow-up threads and MCP tool
        configuration.
      operationId: integration_new_conversation_api_v1_integration_conversations_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateNewConversationIntegrationRequest'
        required: true
      responses:
        '200':
          description: Conversation created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConversationCreateResponse'
        '400':
          description: Invalid request data or missing required fields
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConversationErrorResponse'
        '401':
          description: Authentication token missing or invalid
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/openhands__server__routes__integration__conversation__FastAPIUnauthorizedErrorResponse
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FastAPIResourceNotFoundErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FastAPIErrorResponse'
      x-codeSamples:
        - lang: bash
          label: Create new conversation
          source: >-
            curl -X POST
            'https://app-be.thesis.io/api/v1/integration/conversations' \
              -H 'Authorization: Bearer YOUR_SPACE_API_TOKEN' \
              -H 'Content-Type: application/json' \
              -d '{
                "initial_user_msg": "Whats the new DeFi meta recently that I can ape in?",
                "research_mode": "deep_research",
                "system_prompt": "You are a DeFi gigachad who is always ahead of the new DeFi meta."
              }'
        - lang: python
          label: Create new conversation
          source: |-
            import requests

            url = 'https://app-be.thesis.io/api/v1/integration/conversations'
            headers = {
                'Authorization': 'Bearer YOUR_SPACE_API_TOKEN',
                'Content-Type': 'application/json'
            }
            data = {
                'initial_user_msg': 'Whats the new DeFi meta recently that I can ape in?',
                'research_mode': 'deep_research',
                'system_prompt': 'You are a DeFi gigachad who is always ahead of the new DeFi meta.'
            }

            response = requests.post(url, headers=headers, json=data)
            print(response.json())
        - lang: typescript
          label: Create new conversation
          source: >-
            const response = await
            fetch('https://app-be.thesis.io/api/v1/integration/conversations', {
              method: 'POST',
              headers: {
                'Authorization': 'Bearer YOUR_SPACE_API_TOKEN',
                'Content-Type': 'application/json'
              },
              body: JSON.stringify({
                initial_user_msg: 'What\'s the new DeFi meta recently that I can ape in?',
                research_mode: 'deep_research',
                space_id: 123,
                system_prompt: 'You are a DeFi gigachad who\'s always ahead of the new DeFi meta.'
              })
            });


            const data = await response.json();

            console.log(data);
components:
  schemas:
    CreateNewConversationIntegrationRequest:
      properties:
        initial_user_msg:
          anyOf:
            - type: string
            - type: 'null'
          title: Initial User Msg
          description: Initial message to start the conversation
          example: What's the new DeFi meta recently that I can ape in?
        research_mode:
          anyOf:
            - $ref: '#/components/schemas/ResearchMode'
            - type: 'null'
          description: Research mode for the conversation
          example: deep_research
        space_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Space Id
          description: Your space ID. You can find it via your created space
          example: 123
        space_section_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Space Section Id
          description: Your space section ID. You can find it via your created space
          example: 456
        thread_follow_up:
          anyOf:
            - type: integer
            - type: 'null'
          title: Thread Follow Up
          description: Thread ID for follow-up conversations
          example: 789
        followup_discover_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Followup Discover Id
          description: Discovery ID for follow-up research
          example: discover_abc123
        mcp_disable:
          anyOf:
            - additionalProperties:
                type: boolean
              type: object
            - type: 'null'
          title: Mcp Disable
          description: MCP tools to disable for this conversation
        system_prompt:
          anyOf:
            - type: string
            - type: 'null'
          title: System Prompt
          description: Custom system prompt to guide the AI behavior
          example: You are a DeFi gigachad who's always ahead of the new DeFi meta.
      type: object
      title: CreateNewConversationIntegrationRequest
    ConversationCreateResponse:
      properties:
        status:
          type: string
          title: Status
          description: Response status, always 'ok' for successful creation
          example: ok
        conversation_id:
          type: string
          title: Conversation Id
          description: Unique identifier for the created conversation
          example: conv_abc123def456
      type: object
      required:
        - status
        - conversation_id
      title: ConversationCreateResponse
    ConversationErrorResponse:
      properties:
        status:
          type: string
          title: Status
          description: Error status, always 'error' for failures
          example: error
        message:
          type: string
          title: Message
          description: Human-readable error message
          example: Invalid request data or missing required fields
        msg_id:
          type: string
          title: Msg Id
          description: Machine-readable error code for categorization
          example: INVALID_REQUEST_DATA
      type: object
      required:
        - status
        - message
        - msg_id
      title: ConversationErrorResponse
    openhands__server__routes__integration__conversation__FastAPIUnauthorizedErrorResponse:
      properties:
        detail:
          type: string
          title: Detail
          description: Error details from FastAPI
          example: Unauthorized or invalid token
      type: object
      required:
        - detail
      title: FastAPIUnauthorizedErrorResponse
    FastAPIResourceNotFoundErrorResponse:
      properties:
        detail:
          type: string
          title: Detail
          description: Error details from FastAPI
          example: Resource not found
      type: object
      required:
        - detail
      title: FastAPIResourceNotFoundErrorResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    FastAPIErrorResponse:
      properties:
        detail:
          type: string
          title: Detail
          description: Error details from FastAPI
          example: Internal server error
      type: object
      required:
        - detail
      title: FastAPIErrorResponse
    ResearchMode:
      type: string
      enum:
        - chat
        - deep_research
        - follow_up
      title: ResearchMode
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Enter your API token in the format: Bearer <your_token_here>'

````