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

# Rename Conversation

> **Available for**: Chatflow

Sets a conversation's name, or generates one from the conversation's first question.

**Standard API equivalent**: [Rename Conversation](/en/3.13.x/develop/api/conversations/rename-conversation). Differences:

- `user` is required.
- Error codes differ.



## OpenAPI

````yaml /en/3.13.x/develop/api/openapi_service.json post /v2/conversations/{conversation_id}/name
openapi: 3.0.1
info:
  title: Dify Service API
  description: >-
    REST API for Dify applications and knowledge bases. Application endpoints
    authenticate with an app API key; knowledge endpoints authenticate with a
    dataset API key.
  version: 1.0.0
servers:
  - url: https://{api_base_url}
    description: >-
      Base URL of the Dify Service API. Replace it with your deployment's API
      endpoint.
    variables:
      api_base_url:
        default: api.example.com/v1
        description: Host and path of the API base URL, without the `https://` prefix.
security:
  - ApiKeyAuth: []
tags:
  - name: Chat Messages
    description: Operations related to chat messages and interactions.
  - name: Files
    description: File upload and preview operations.
  - name: End Users
    description: Operations related to end user information.
  - name: Feedback
    description: User feedback operations.
  - name: Conversations
    description: Operations related to managing conversations.
  - name: Audio
    description: Text-to-Speech and Speech-to-Text operations.
  - name: Applications
    description: Operations to retrieve application settings and information.
  - name: Annotations
    description: Operations related to managing annotations for direct replies.
  - name: Human Input
    description: Endpoints for resuming paused workflows that require human input.
  - name: Workflow Runs
    description: Operations for executing and managing workflows.
  - name: Completion Messages
    description: Operations related to text generation and completion.
  - name: Knowledge Bases
    description: >-
      Operations for managing knowledge bases, including creation,
      configuration, and retrieval.
  - name: Documents
    description: >-
      Operations for creating, updating, and managing documents within a
      knowledge base.
  - name: Chunks
    description: Operations for managing document chunks and child chunks.
  - name: Metadata
    description: >-
      Operations for managing knowledge base metadata fields and document
      metadata values.
  - name: Tags
    description: Operations for managing knowledge base tags and tag bindings.
  - name: Models
    description: Operations for retrieving available models.
  - name: Knowledge Pipeline
    description: >-
      Operations for managing and running knowledge pipelines, including
      datasource plugins and pipeline execution.
  - name: Deployed Environments
    description: >-
      Endpoints served by deployed environments over the `v2` base URL. Deployed
      environments serve only the endpoints in this group; calling any other
      path there returns `404 not_found`. Authentication and errors differ from
      the standard Service API; each page here is authoritative for deployed
      environments.
paths:
  /v2/conversations/{conversation_id}/name:
    post:
      tags:
        - Deployed Environments
      summary: Rename Conversation
      description: >-
        **Available for**: Chatflow


        Sets a conversation's name, or generates one from the conversation's
        first question.


        **Standard API equivalent**: [Rename
        Conversation](/en/3.13.x/develop/api/conversations/rename-conversation).
        Differences:


        - `user` is required.

        - Error codes differ.
      operationId: renameDeployedConversation
      parameters:
        - name: conversation_id
          in: path
          required: true
          description: >-
            ID of the conversation to rename. Get conversation IDs from [List
            Conversations](/en/3.13.x/develop/api/deployed-environments/list-conversations).
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - user
              properties:
                user:
                  type: string
                  minLength: 1
                  maxLength: 255
                  description: >-
                    End-user identifier, defined by your app and unique within
                    it. Must match the `user` the conversation was created with.
                    See [End User
                    Identity](/en/3.13.x/develop/api/guides/end-user-identity).
                name:
                  type: string
                  maxLength: 255
                  description: >-
                    New conversation name. Required unless `auto_generate` is
                    `true`. Names are stored as at most 255 bytes. A longer name
                    in a multi-byte script is cut at a character boundary and
                    stored shorter, with no error.
                auto_generate:
                  type: boolean
                  default: false
                  description: >-
                    Automatically generate the conversation name from the
                    conversation's first question. When `true`, the `name` field
                    is ignored. A generated name is truncated the same way.
            examples:
              req:
                summary: Request Example
                value:
                  user: customer-001
                  name: Refund progress
                  auto_generate: false
      responses:
        '200':
          description: The updated conversation, with the name as stored.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: Conversation ID.
                  name:
                    type: string
                    description: Conversation name.
                  inputs:
                    type: object
                    description: >-
                      Input variables submitted when the conversation was
                      created.
                    additionalProperties: true
                  status:
                    type: string
                    description: Always `normal`.
                  introduction:
                    type: string
                    description: >-
                      The app's opening statement captured when the conversation
                      was created; an empty string when none is configured.
                  created_at:
                    type: integer
                    description: Creation time as a Unix timestamp in seconds.
                  updated_at:
                    type: integer
                    description: Last-update time as a Unix timestamp in seconds.
              examples:
                ok:
                  summary: Response Example
                  value:
                    id: 0f8fad5b-d9cb-469f-a165-70867728950e
                    name: Refund progress
                    inputs:
                      order_id: ORDER-1001
                    status: normal
                    introduction: Hello! I can help you check your orders.
                    created_at: 1787788800
                    updated_at: 1787788920
        '400':
          description: >-
            - `invalid_param`: a path or body value breaks its validation rule.
            The message names the rule the value broke, such as `value length
            must be at most 255 runes` for a `name` longer than 255 characters.

            - `invalid_param`: the resulting name is empty. The message is
            `invalid argument`. Two cases:
                - `auto_generate` is `false` and `name` is missing or empty.
                - `auto_generate` is `true` and the conversation's first question is empty.
            - `not_chat_app`: the API key belongs to an app that is not a
            Chatflow.

            - `app_unavailable`: the app can't serve API requests in this
            environment right now.
                - API access is turned off.
                - The app is not deployed here.
                - A deployment is still rolling out.
                - The environment is being deleted.

                Ask the app's owner to check its **Access Point** tab, or an administrator to check the environment in the Enterprise Dashboard, and retry once it serves again.
          content:
            application/json:
              examples:
                invalid_param:
                  summary: invalid_param
                  value:
                    code: invalid_param
                    message: >-
                      invalid RenameServiceAPIConversationRequest.Name: value
                      length must be at most 255 runes
                    status: 400
                invalid_param_empty_name:
                  summary: invalid_param (empty name)
                  value:
                    code: invalid_param
                    message: invalid argument
                    status: 400
                not_chat_app:
                  summary: not_chat_app
                  value:
                    status: 400
                    code: not_chat_app
                    message: Please check if your app mode matches the right API route.
                app_unavailable:
                  summary: app_unavailable
                  value:
                    status: 400
                    code: app_unavailable
                    message: App unavailable, please check your app configurations.
        '401':
          description: >-
            `unauthorized`: the API key is missing, malformed, unknown, or
            revoked.
          content:
            application/json:
              examples:
                unauthorized:
                  summary: unauthorized
                  value:
                    code: unauthorized
                    message: Access token is invalid
                    status: 401
        '404':
          description: >-
            - `not_found`: the conversation does not exist or does not belong to
            this `user`.

            - `not_found`: `auto_generate` is `true` but the conversation has no
            first message.
          content:
            application/json:
              examples:
                not_found:
                  summary: not_found
                  value:
                    status: 404
                    code: not_found
                    message: Conversation Not Exists.
                not_found_first_message:
                  summary: not_found (no first message)
                  value:
                    code: not_found
                    message: First Message Not Exists.
                    status: 404
        '500':
          description: >-
            `internal_server_error`: the platform could not complete the
            request; retry, and contact your administrator if it persists.
          content:
            application/json:
              examples:
                internal_server_error:
                  summary: internal_server_error
                  value:
                    code: internal_server_error
                    message: internal error
                    status: 500
      servers:
        - url: https://{deployed_api_base_url}
          description: >-
            Base URL shared by every deployed environment: the standard Service
            API address, with `/v2` in place of `/v1`.
          variables:
            deployed_api_base_url:
              default: api.example.com
              description: >-
                On the app's **Access Point** tab, copy the full URL from any
                deployed environment's **Backend Service API** card, then remove
                the `https://` prefix and the trailing `/v2`.
components:
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: API_KEY
      description: >-
        Every request authenticates with an API key: `Authorization: Bearer
        {API_KEY}`. App endpoints take an app API key; knowledge endpoints take
        a knowledge base API key ([Get
        Started](/en/3.13.x/develop/api/guides/get-started)).


        Keep keys server-side; never embed them in client code. Requests with a
        missing or invalid key fail with HTTP `401` (`unauthorized`).

````