# How to delete a group

Deleting a WhatsApp group works differently depending on your role in the chat — whether you are an administrator or a regular participant.

#### If You Are a Group Administrator

{% hint style="info" %}
If you are a group admin, you will need to remove all of its members before you can delete the group.
{% endhint %}

1. **Get a group ID and a list of group member**\
   (method: <https://whapi.readme.io/reference/getgroups> )
2. **Remove all participants**\
   `delete https://gate.whapi.cloud/groups/{GroupID}`\
   (method: <https://whapi.readme.io/reference/removegroupparticipant> )
3. **Leave the group**\
   (method: <https://whapi.readme.io/reference/leavegroup> )
4. **Delete the chat** ( If the chat is **not deleted**, it will remain visible in the application **in read-only mode** and will be returned by the **Get Groups** method with the parameter\
   `"read_only": true`)\
   (method: [https://whapi.readme.io/reference/](https://whapi.readme.io/reference/deletechat))

{% hint style="info" %}
Once all members have been removed and the administrator has left, the group is considered permanently deleted and cannot be restored.
{% endhint %}

{% code title="Remove Participant Response" %}

```json
{
    "success": true,
    "processed": [
        "99001112233@s.whatsapp.net",
        "99998887766@s.whatsapp.net"
    ],
    "failed": []
}
```

{% endcode %}

{% code title="Leave group Response" %}

```json
{
    "success": true
}
```

{% endcode %}

#### If you are a group member

1. Get a group ID&#x20;
2. Leave the group
3. Delete the chat (optional, if you want it removed from your device)

{% hint style="info" %}
This only affects your account. The group will continue to exist for other members.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://support.whapi.cloud/help-desk/groups/how-to-delete-a-group.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
