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

# Edit sent message

> Edits the text of a message previously sent by this number.



## OpenAPI

````yaml openapi.evolution-v2.json POST /chat/updateMessage/{instance}
openapi: 3.1.0
info:
  title: Evolution V2 Layer
  version: 1.0.0
  description: >-
    Pilot Status API Layer — Evolution V2. Base URL
    `https://pilotstatus.com.br/api/layer/evolution-v2`. Authenticate with the
    `apikey` header (your Pilot Status `ps_` key). Instance/session endpoints
    are NOT available through the layer.
servers:
  - url: https://pilotstatus.com.br/api/layer/evolution-v2
security:
  - apiKey: []
tags:
  - name: Call & Business
  - name: Chat
  - name: Group
  - name: Label
  - name: Message
  - name: Profile
  - name: Settings & Proxy
  - name: Storage (S3)
  - name: Template
paths:
  /chat/updateMessage/{instance}:
    post:
      tags:
        - Chat
      summary: Edit sent message
      description: Edits the text of a message previously sent by this number.
      operationId: post__chat_updateMessage_instance
      parameters:
        - name: instance
          in: path
          required: true
          schema:
            type: string
          description: The number's display name in the Pilot Status dashboard.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                number:
                  type: string
                  description: Recipient number / chat the message was sent to.
                  example: '5511999999999'
                text:
                  type: string
                  description: New message text.
                  example: Edited message text
                key:
                  type: object
                  description: Key of the message to edit (`id`, `remoteJid`, `fromMe`).
                  example:
                    id: BAE5F5A632EAE722
                    remoteJid: 5511999999999@s.whatsapp.net
                    fromMe: true
              required:
                - number
                - text
                - key
      responses:
        '200':
          description: Success — provider-native response body.
          content:
            application/json:
              schema:
                type: object
                description: Baileys WAMessage returned from the edit send.
                properties:
                  key:
                    type: object
                    properties:
                      remoteJid:
                        type: string
                        description: Chat JID the edited message was sent to.
                      fromMe:
                        type: boolean
                        description: Whether the message was sent by this account.
                      id:
                        type: string
                        description: Message id of the edit send.
                  message:
                    type: object
                    description: >-
                      Edited message payload (contains a protocolMessage of type
                      MESSAGE_EDIT wrapping the new content).
                    properties:
                      protocolMessage:
                        type: object
                        properties:
                          key:
                            type: object
                            properties:
                              remoteJid:
                                type: string
                              fromMe:
                                type: boolean
                              id:
                                type: string
                          type:
                            type: string
                            description: Protocol type, "MESSAGE_EDIT" for an edit.
                          editedMessage:
                            type: object
                            properties:
                              conversation:
                                type: string
                                description: New text content of the edited message.
                  messageTimestamp:
                    type: integer
                    description: Unix timestamp (seconds) of the edit.
                  status:
                    type: string
                    description: Delivery status, e.g. "PENDING".
              example:
                key:
                  remoteJid: 5511999999999@s.whatsapp.net
                  fromMe: true
                  id: 3EB0C767D26A1D8A0F1B
                message:
                  protocolMessage:
                    key:
                      remoteJid: 5511999999999@s.whatsapp.net
                      fromMe: true
                      id: BAE5F5A632EAE722
                    type: MESSAGE_EDIT
                    editedMessage:
                      conversation: 'Edited: see you at 3pm instead'
                messageTimestamp: 1720544460
                status: PENDING
        default:
          description: Error — provider or layer error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: integer
                  error:
                    type: string
                  message:
                    type: string
                  response:
                    type: object
              example:
                status: 400
                error: Bad Request
                message: Invalid payload
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: apikey
      description: >-
        Your Pilot Status API key (ps_...). Evolution GO also accepts
        `Authorization: Bearer <key>`.

````