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

# Update a message in a conversation



## OpenAPI

````yaml https://dev.flextell.ai/docs/api.json put /v1/conversations/{id}/messages/{messageId}
openapi: 3.1.0
info:
  title: Flextell API
  version: 0.0.1
  description: '## Flextell API'
servers:
  - url: https://dev.flextell.ai/api
security:
  - oauth2: []
  - bearer: []
paths:
  /v1/conversations/{id}/messages/{messageId}:
    put:
      tags:
        - Conversation
      summary: Update a message in a conversation
      operationId: conversation.updateMessage
      parameters:
        - name: id
          in: path
          required: true
          description: The conversation identifier
          schema:
            type: integer
        - name: messageId
          in: path
          required: true
          description: The message identifier
          schema:
            type: integer
        - name: X-Tenant
          in: header
          required: true
          description: >-
            Tenant identifier. Send the Tenant ID in the `X-Tenant` header to
            scope API requests to a specific tenant.
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConversationUpdateMessageRequest'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: string
                  data:
                    $ref: '#/components/schemas/ConversationMessageResource'
                required:
                  - success
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '404':
          description: ''
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      success:
                        type: string
                      data:
                        type: object
                        properties:
                          message:
                            type: string
                            const: Message not found
                        required:
                          - message
                    required:
                      - success
                      - data
                  - type: object
                    properties:
                      success:
                        type: string
                      data:
                        type: object
                        properties:
                          message:
                            type: string
                            const: Conversation not found
                        required:
                          - message
                    required:
                      - success
                      - data
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    ConversationUpdateMessageRequest:
      type: object
      properties:
        message:
          type: string
          description: The message body.
          maxLength: 5000
      required:
        - message
      title: ConversationUpdateMessageRequest
    ConversationMessageResource:
      type: object
      properties:
        id:
          type: integer
        conversation_id:
          type:
            - integer
            - 'null'
        user_id:
          type:
            - integer
            - 'null'
        user_name:
          type:
            - string
            - 'null'
        is_customer:
          type: boolean
        message_type:
          anyOf:
            - $ref: '#/components/schemas/ChatMessageType'
            - type: 'null'
        message:
          type:
            - string
            - 'null'
        quoted_text:
          type:
            - string
            - 'null'
        transcript:
          type:
            - string
            - 'null'
        transcript_status:
          type: string
        is_deleted:
          type: boolean
        is_edited:
          type: boolean
        edited_by_user_name:
          type:
            - string
            - 'null'
        deleted_by_user_name:
          type:
            - string
            - 'null'
        read_at:
          type:
            - string
            - 'null'
          format: date-time
        delivery_status: {}
        metadata:
          anyOf:
            - type: string
            - type: 'null'
            - type: array
              items: {}
        created_at:
          type:
            - string
            - 'null'
          format: date-time
        file:
          anyOf:
            - $ref: '#/components/schemas/FileResource'
            - type: 'null'
        file_temporary_url:
          type: string
      required:
        - id
        - conversation_id
        - user_id
        - user_name
        - is_customer
        - message_type
        - message
        - quoted_text
        - transcript
        - transcript_status
        - is_deleted
        - is_edited
        - edited_by_user_name
        - deleted_by_user_name
        - read_at
        - delivery_status
        - metadata
        - created_at
        - file
        - file_temporary_url
      title: ConversationMessageResource
    ChatMessageType:
      type: string
      enum:
        - text
        - audio
        - video
        - document
        - image
        - location
        - system
      title: ChatMessageType
    FileResource:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        description:
          type:
            - string
            - 'null'
        type:
          type: string
        mime_type:
          type:
            - string
            - 'null'
        size:
          type:
            - integer
            - 'null'
        formatted_size:
          type: string
        group_id:
          type:
            - string
            - 'null'
        fileable_type:
          type:
            - string
            - 'null'
        fileable_id:
          type:
            - integer
            - 'null'
        temporary_url:
          type:
            - string
            - 'null'
        temporary_thumbnail_url:
          type:
            - string
            - 'null'
        created_at:
          type:
            - string
            - 'null'
          format: date-time
        updated_at:
          type:
            - string
            - 'null'
          format: date-time
        deleted_at:
          type:
            - string
            - 'null'
          format: date-time
      required:
        - id
        - name
        - description
        - type
        - mime_type
        - size
        - formatted_size
        - group_id
        - fileable_type
        - fileable_id
        - temporary_url
        - temporary_thumbnail_url
        - created_at
        - updated_at
        - deleted_at
      title: FileResource
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    AuthorizationException:
      description: Authorization error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://dev.flextell.ai/oauth/authorize
          tokenUrl: https://dev.flextell.ai/oauth/token
          scopes:
            '*': all
    bearer:
      type: http
      scheme: bearer

````