> ## 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.

# Editar mensagem enviada

> Edita o texto de uma mensagem enviada anteriormente por este número.



## OpenAPI

````yaml openapi.evolution-v2.pt.json POST /chat/updateMessage/{instance}
openapi: 3.1.0
info:
  title: Evolution V2 Layer
  version: 1.0.0
  description: >-
    Camada de API do Pilot Status — Evolution V2. Base URL
    `https://pilotstatus.com.br/api/layer/evolution-v2`. Autentique com o header
    `apikey` (sua chave `ps_` do Pilot Status). Endpoints de instância/sessão
    NÃO estão disponíveis na camada.
servers:
  - url: https://pilotstatus.com.br/api/layer/evolution-v2
security:
  - apiKey: []
tags:
  - name: Chamada e Business
  - name: Chat
  - name: Grupo
  - name: Etiqueta (Label)
  - name: Mensagem
  - name: Perfil
  - name: Configurações e Proxy
  - name: Armazenamento (S3)
  - name: Template
paths:
  /chat/updateMessage/{instance}:
    post:
      tags:
        - Chat
      summary: Editar mensagem enviada
      description: Edita o texto de uma mensagem enviada anteriormente por este número.
      operationId: post__chat_updateMessage_instance
      parameters:
        - name: instance
          in: path
          required: true
          schema:
            type: string
          description: O nome de exibição do número no painel do Pilot Status.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                number:
                  type: string
                  description: >-
                    Número/conversa de destino para o qual a mensagem foi
                    enviada.
                  example: '5511999999999'
                text:
                  type: string
                  description: Novo texto da mensagem.
                  example: Edited message text
                key:
                  type: object
                  description: >-
                    Chave da mensagem a ser editada (`id`, `remoteJid`,
                    `fromMe`).
                  example:
                    id: BAE5F5A632EAE722
                    remoteJid: 5511999999999@s.whatsapp.net
                    fromMe: true
              required:
                - number
                - text
                - key
      responses:
        '200':
          description: Sucesso — corpo de resposta nativo do provedor.
          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: Erro — erro do provedor ou da camada.
          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>`.

````