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

> 更新一个对话

# Update Conversation



## OpenAPI

````yaml put /v1/conversations/{conversation_id}
openapi: 3.1.0
info:
  title: spectra-server
  description: The API for Spectra Backend.
  version: 0.1.0
servers:
  - url: https://api-spectra.duplik.cn
security: []
paths:
  /v1/conversations/{conversation_id}:
    put:
      tags:
        - Conversations
      summary: Update Conversation
      operationId: update_conversation_v1_conversations__conversation_id__put
      parameters:
        - name: conversation_id
          in: path
          required: true
          schema:
            type: string
            title: Conversation Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConversationUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConversationDetailRead'
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad Request
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Server Error
      security:
        - HTTPBearer: []
components:
  schemas:
    ConversationUpdate:
      properties:
        agent_id:
          anyOf:
            - type: string
              maxLength: 20
            - type: 'null'
          title: Agent Id
          description: Agent ID
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
        file_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: File Ids
          description: User attachment files
        config:
          anyOf:
            - $ref: >-
                #/components/schemas/src__libs__modules__conversation__schemas__ConversationConfig
            - type: 'null'
        status:
          anyOf:
            - type: integer
            - type: 'null'
          title: Status
        third_user_id:
          anyOf:
            - type: string
              maxLength: 32
            - type: 'null'
          title: Third User Id
          description: third_user_id
      type: object
      title: ConversationUpdate
      description: Conversation update model
    ConversationDetailRead:
      properties:
        created_at:
          anyOf:
            - type: integer
            - type: 'null'
          title: Created At
        updated_at:
          anyOf:
            - type: integer
            - type: 'null'
          title: Updated At
        org_id:
          type: string
          title: Org Id
        user_id:
          type: string
          title: User Id
        agent_id:
          anyOf:
            - type: string
              maxLength: 20
            - type: 'null'
          title: Agent Id
          description: Agent ID
        title:
          type: string
          maxLength: 128
          title: Title
          description: Conversation title
          default: ''
        file_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: File Ids
          description: User attachment files
        config:
          anyOf:
            - $ref: >-
                #/components/schemas/src__libs__modules__conversation__schemas__ConversationConfig
            - type: 'null'
          description: Conversation config
        status:
          type: integer
          title: Status
          description: Conversation status
          default: 1
        third_user_id:
          anyOf:
            - type: string
              maxLength: 32
            - type: 'null'
          title: Third User Id
          description: third_user_id
        conversation_id:
          type: string
          title: Conversation Id
        agent:
          anyOf:
            - $ref: '#/components/schemas/SimpleAgentRead'
            - type: 'null'
          description: Agent information
        user_files:
          items:
            $ref: '#/components/schemas/SimpleFile'
          type: array
          title: User Files
          description: User uploaded files
          default: []
      type: object
      required:
        - created_at
        - updated_at
        - org_id
        - user_id
        - conversation_id
      title: ConversationDetailRead
      description: Conversation detail read model
    ErrorResponse:
      properties:
        code:
          type: integer
          title: Code
        message:
          type: string
          title: Message
      type: object
      required:
        - code
        - message
      title: ErrorResponse
    src__libs__modules__conversation__schemas__ConversationConfig:
      properties:
        enable_websearch:
          type: boolean
          title: Enable Websearch
          description: Enable web search
          default: false
      type: object
      title: ConversationConfig
      description: Conversation configuration
    SimpleAgentRead:
      properties:
        agent_id:
          type: string
          maxLength: 20
          title: Agent Id
          description: Agent ID
        name:
          type: string
          maxLength: 256
          title: Name
          description: Agent name
        mode:
          type: string
          title: Mode
          description: Agent mode
        icon:
          type: string
          maxLength: 1024
          title: Icon
          description: Agent icon URL
      type: object
      required:
        - agent_id
        - name
        - mode
        - icon
      title: SimpleAgentRead
      description: Simple agent read model with minimal fields
    SimpleFile:
      properties:
        file_id:
          anyOf:
            - type: string
            - type: 'null'
          title: File Id
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        location:
          anyOf:
            - type: string
            - type: 'null'
          title: Location
        path:
          anyOf:
            - type: string
            - type: 'null'
          title: Path
        type:
          anyOf:
            - type: string
            - type: 'null'
          title: Type
        size:
          anyOf:
            - type: integer
            - type: 'null'
          title: Size
      type: object
      title: SimpleFile
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````