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

# Apagar mensagem WhatsApp

> Apaga uma mensagem que você enviou (quando o canal permite).



## OpenAPI

````yaml /whatsapp-api/api-reference/openapi-whatsapp.json delete /v1/whatsapp/messages/{messageId}
openapi: 3.0.3
info:
  title: Notifique API — WhatsApp
  description: >-
    Envie mensagens WhatsApp e gerencie conexões. Autentique com `Authorization:
    Bearer sk_live_...` ou `x-api-key`.
  version: 1.0.0
servers:
  - url: https://api.notifique.dev
    description: Produção
security:
  - ntfWaBearerAuth: []
  - ntfWaApiKeyHeader: []
tags:
  - name: Mensagens
    description: Enviar, listar, editar e cancelar mensagens
  - name: Instâncias
    description: >-
      Cadastre e gerencie os números de WhatsApp conectados — cada número é uma
      **instância** (o telefone por onde entram e saem as mensagens).
  - name: Grupos
    description: Grupos (só conexão não oficial)
paths:
  /v1/whatsapp/messages/{messageId}:
    delete:
      tags:
        - Mensagens
      summary: Apagar mensagem WhatsApp
      description: Apaga uma mensagem que você enviou (quando o canal permite).
      operationId: ntfWa_deleteV1WhatsappMessage
      parameters:
        - name: messageId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Mensagem apagada.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfWa_MessageActionResponse'
              example:
                success: true
                data:
                  messageId: clxx...
                  status: DELETED
        '400':
          description: Sem external_id, já deletada, instância não conectada.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfWa_ErrorResponse'
        '401':
          description: Não autorizado.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfWa_ErrorResponse'
        '403':
          description: Escopo ou acesso à instância.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfWa_ErrorResponse'
        '404':
          description: Mensagem não encontrada.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NtfWa_ErrorResponse'
components:
  schemas:
    NtfWa_MessageActionResponse:
      type: object
      description: >-
        Resposta 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: >-
            Mensagem 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 [Respostas 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.

````