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

# Edit WhatsApp message

> Edit the text of a message already sent (when allowed).



## OpenAPI

````yaml /en/whatsapp-api/api-reference/openapi-whatsapp.json patch /v1/whatsapp/messages/{messageId}/edit
openapi: 3.0.3
info:
  title: Notifique API — WhatsApp
  description: >-
    Send WhatsApp messages and manage connections. Authenticate with
    `Authorization: Bearer sk_live_...` or `x-api-key`.
  version: 1.0.0
servers:
  - url: https://api.notifique.dev
    description: Production
security:
  - ntfWaBearerAuth: []
  - ntfWaApiKeyHeader: []
tags:
  - name: Messages
    description: Send, list, edit, and cancel messages
  - name: Instances
    description: >-
      Register and manage connected WhatsApp numbers — each number is an
      **instance** (the phone that sends and receives messages).
  - name: Groups
    description: Groups (unofficial only)
paths:
  /v1/whatsapp/messages/{messageId}/edit:
    patch:
      tags:
        - Mensagens
      summary: Edit WhatsApp message
      description: Edit the text of a message already sent (when allowed).
      operationId: ntfWa_patchV1WhatsappMessageEdit
      parameters:
        - name: messageId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - text
              properties:
                text:
                  type: string
                  minLength: 1
            example:
              message: Texto corrigido
      responses:
        '200':
          description: Message editada.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfWa_MessageActionResponse'
              example:
                success: true
                data:
                  messageId: clxx...
                  status: EDITED
        '400':
          description: Sem external_id, message deletada, ou tipo não é text.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfWa_ErrorResponse'
        '401':
          description: Unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfWa_ErrorResponse'
        '403':
          description: Escopo ou acesso à instance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfWa_ErrorResponse'
        '404':
          description: Message não encontrada.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfWa_ErrorResponse'
components:
  schemas:
    NtfWa_MessageActionResponse:
      type: object
      description: >-
        Response padronizada para cancel, delete e edit: envelope success/data;
        data contém message_id e status em MAIÚSCULO.
      properties:
        success:
          type: boolean
          example: true
        data:
          type: object
          properties:
            messageId:
              type: string
            status:
              type: string
              enum:
                - CANCELLED
                - DELETED
                - EDITED
    NtfWa_ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        error:
          type: string
          description: 'Rótulo HTTP do erro (ex.: Unauthorized, Bad Request, Not Found).'
        message:
          type: string
          description: >-
            Message legível para exibir ao usuário (localizada via
            Accept-Language / x-locale quando aplicável).
        code:
          type: string
          description: >-
            Código estável da API v1 (enum). Sempre presente em erros. Use com o
            status HTTP para decidir retry ou correção. Ver [Responses de
            erro](/guides/conceitos/resposta-de-erros).
        details:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
              message:
                type: string
        note:
          type: string
      required:
        - success
        - error
        - message
        - code
  securitySchemes:
    ntfWaBearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        API Key no header Authorization. Exemplo: `Authorization: Bearer
        sk_live_xxxxx`
    ntfWaApiKeyHeader:
      type: apiKey
      in: header
      name: x-api-key
      description: API Key no header x-api-key.

````