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

# Update a message

> Update message content before its queued processing has started.



## OpenAPI

````yaml https://api.tembo.io/public-api/openapi/public patch /v1/messages/{messageId}
openapi: 3.1.0
info:
  title: Tembo Public API
  description: Public API Endpoints for Tembo
  version: 1.0.0
servers:
  - url: https://api.tembo.io
    description: Tembo API
  - url: https://{deployment-origin}/api/public-api
    description: Self-hosted Tembo
    variables:
      deployment-origin:
        default: tembo.example.com
        description: Hostname of your self-hosted Tembo deployment
security: []
paths:
  /v1/messages/{messageId}:
    patch:
      tags:
        - Messages
      summary: Update a message
      description: Update message content before its queued processing has started.
      operationId: updateMessage
      parameters:
        - in: path
          name: messageId
          schema:
            type: string
            format: uuid
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                content:
                  type: string
                  minLength: 1
                  maxLength: 1000000
                jsonContent:
                  type:
                    - string
                    - 'null'
                  description: >-
                    JSON-encoded TipTap document, normally rooted at { "type":
                    "doc", "content": [...] }.
                  example: >-
                    {"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"Hello"}]}]}
              additionalProperties: false
      responses:
        '200':
          description: Update a message
          content:
            application/json:
              schema:
                type: object
                properties:
                  artifactId:
                    type:
                      - string
                      - 'null'
                    format: uuid
                  content:
                    type: string
                  createdAt:
                    type: string
                    format: date-time
                  createdBy:
                    type:
                      - string
                      - 'null'
                  externalAvatarUrl:
                    type:
                      - string
                      - 'null'
                  externalUrl:
                    type:
                      - string
                      - 'null'
                  id:
                    type: string
                    format: uuid
                  parentMessageId:
                    type:
                      - string
                      - 'null'
                    format: uuid
                  pullRequestId:
                    type:
                      - string
                      - 'null'
                    format: uuid
                  role:
                    type: string
                    enum:
                      - user
                      - assistant
                      - system
                  sessionId:
                    type:
                      - string
                      - 'null'
                    format: uuid
                  type:
                    type: string
                  updatedAt:
                    type: string
                    format: date-time
                  jsonContent:
                    allOf:
                      - 5906b0ed-29b0-4dca-b623-539756d1931f
                    description: >-
                      Raw JSON value stored for the message, including legacy
                      strings and unknown TipTap nodes or attributes.
                    example:
                      type: doc
                      content:
                        - type: paragraph
                  slashCommand:
                    type:
                      - object
                      - 'null'
                    properties:
                      command:
                        type: string
                        minLength: 1
                        maxLength: 200
                      arguments:
                        type: string
                        maxLength: 100000
                    required:
                      - command
                    additionalProperties: false
                  source:
                    type:
                      - string
                      - 'null'
                    maxLength: 100
                required:
                  - artifactId
                  - content
                  - createdAt
                  - createdBy
                  - externalAvatarUrl
                  - externalUrl
                  - id
                  - parentMessageId
                  - pullRequestId
                  - role
                  - sessionId
                  - type
                  - updatedAt
                  - jsonContent
                  - slashCommand
                  - source
                additionalProperties: false
        '400':
          description: Validation error or missing resource scope
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '404':
          description: Message or session not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '409':
          description: Message operation conflicts with its current state
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
        '500':
          description: Message operation failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
                additionalProperties: false
      security:
        - apiKey: []
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer

````