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

# Delete Sent Status

> Delete a previously sent status (story) on WhatsApp

## Description

This endpoint allows you to delete a status (story) that was previously sent on WhatsApp. You can delete the status for all contacts or only for specific contacts.

## URL Parameters

<ParamField path="session" type="string" required>
  Unique authenticated session ID
</ParamField>

## Request Body

<ParamField body="messageId" type="string" required>
  Message ID of the status to be deleted
</ParamField>

<ParamField body="sender" type="string" required>
  Sender JID (your account) in the format `5511999999999@s.whatsapp.net`
</ParamField>

<ParamField body="participants" type="array" optional>
  Array of contact JIDs for whom the status will be deleted. If not specified, the status will be deleted for all contacts.

  JID format: `["5511999999999@s.whatsapp.net"]`
</ParamField>

<RequestExample>
  ```json Delete for Specific Contacts theme={null}
  {
    "messageId": "3EB0796F91D8B2A4E053AC100F0A4D1E",
    "sender": "5511999999999@s.whatsapp.net",
    "participants": [
      "5511888888888@s.whatsapp.net",
      "5511777777777@s.whatsapp.net"
    ]
  }
  ```

  ```json Delete for All Contacts theme={null}
  {
    "messageId": "3EB0796F91D8B2A4E053AC100F0A4D1E",
    "sender": "5511999999999@s.whatsapp.net"
  }
  ```
</RequestExample>

## Response

<ResponseField name="success" type="boolean" required>
  Indicates if the status was deleted successfully
</ResponseField>

<ResponseField name="messageId" type="string">
  Message ID of the status that was deleted
</ResponseField>

<ResponseExample>
  ```json Success Response theme={null}
  {
      "success": true,
      "messageId": "3EB0796F91D8B2A4E053AC100F0A4D1E"
  }
  ```
</ResponseExample>

## Status Codes

* `200` - Status deleted successfully
* `400` - Invalid parameters
* `401` - Unauthorized
* `404` - Status not found
* `500` - Server error

## Usage Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.wappfy.com.br/api/my-session/status/delete \
    -H "Content-Type: application/json" \
    -d '{
      "messageId": "3EB0796F91D8B2A4E053AC100F0A4D1E",
      "sender": "5511999999999@s.whatsapp.net"
    }'
  ```

  ```javascript JavaScript theme={null}
  const session = 'my-session';
  const response = await fetch(`https://api.wappfy.com.br/api/${session}/status/delete`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      messageId: '3EB0796F91D8B2A4E053AC100F0A4D1E',
      sender: '5511999999999@s.whatsapp.net',
      participants: ['5511888888888@s.whatsapp.net']
    })
  });
  const data = await response.json();
  console.log(data);
  ```

  ```python Python theme={null}
  import requests

  session = 'my-session'
  payload = {
      'messageId': '3EB0796F91D8B2A4E053AC100F0A4D1E',
      'sender': '5511999999999@s.whatsapp.net',
      'participants': ['5511888888888@s.whatsapp.net']
  }

  response = requests.post(
      f'https://api.wappfy.com.br/api/{session}/status/delete',
      json=payload
  )
  data = response.json()
  print(data)
  ```
</CodeGroup>

## Notes

* Status are temporary content (Stories) that disappear after 24 hours
* You can only delete status that were sent by your account
* If the `participants` parameter is not specified, the status will be deleted for all contacts
* The `sender` field must contain the JID of your own account in the format `5511999999999@s.whatsapp.net`
* Once deleted, the status cannot be recovered
* The `messageId` can be obtained from the response of the status send endpoint


## OpenAPI

````yaml viewer-en.json post /api/{session}/status/delete
openapi: 3.1.0
info:
  title: Wappfy - WhatsApp HTTP API
  version: '2.0'
  contact: {}
servers:
  - url: https://{host}
    description: Customizable Server
    variables:
      host:
        default: api.wappfy.com.br
        description: Server URL (e.g., api.wappfy.com.br or your-server.com)
security:
  - api_key: []
tags:
  - name: 🖥️ Sessions
    description: Control WhatsApp sessions (accounts)
  - name: 🔑 Auth
    description: Authentication
  - name: 🆔 Profile
    description: Your profile information
  - name: 🖼️ Screenshot
    description: Get WhatsApp screenshot and display QR code
  - name: 📤 Chatting
    description: Conversation methods
  - name: 📢 Channels
    description: Channels (newsletters) methods
  - name: 🟢 Status
    description: Status (aka stories) methods
  - name: 💬 Chats
    description: Conversations methods
  - name: 👤 Contacts
    description: |-
      Contacts methods.<br>
                      Use phone number (without +) or phone number and `@c.us` at the end as `contactId`.<br>
                      E.g: `12312312310` OR `12312312310@c.us`<br>
  - name: 👥 Groups
    description: Groups methods.<br>
  - name: ✅ Presence
    description: Presence information
  - name: 📅 Events
    description: Event Message
  - name: 🏷️ Labels
    description: Labels - available only for WhatsApp Business accounts
  - name: 🔍 Observability
    description: Other methods
  - name: 🗄️ Storage
    description: Storage methods
externalDocs:
  description: Wappfy - WhatsApp API
  url: https://docs.wappfy.com.br/
paths:
  /api/{session}/status/delete:
    post:
      tags:
        - 🟢 Status
      summary: DELETE sent status
      description: The {session} parameter must be the session's instanceName.
      operationId: StatusController_deleteStatus
      parameters:
        - name: session
          required: true
          in: path
          description: Session name (instanceName)
          example: my-session
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteStatusRequest'
      responses:
        '201':
          description: ''
      security:
        - api_key: []
components:
  schemas:
    DeleteStatusRequest:
      type: object
      properties:
        id:
          type: string
          description: Status message id to delete
          example: AAAAAAAAAAAAAAAAA
          default: null
        contacts:
          description: Contact list to send the status to.
          example: null
          type: array
          items:
            type: string
  securitySchemes:
    api_key:
      type: apiKey
      in: header
      name: apikey
      description: Your Wappfy API key (get it at dash.wappfy.com.br)

````