v1

latestOpenAPI 3.0.2cPanel License2026-08-06657427.1 MB
Mailboxes
Mailbox Management

Delete selected messages in mailbox by GUID

This function marks the selected mailbox's messages as deleted.

get/Mailboxes/expunge_messages_for_mailbox_guid

Query parameters

string email required
OR
string username required

The email account's name.

mailbox_guidstring required
Example:2550860f0c58d158c92a000044f0d230

The mailbox's globally unique identifier (GUID).

Use the Mailboxes::get_mailbox_status_list function to list possible values for the mailbox_guid parameter.

querystring required
Example:savedbefore 52w

The query to select which messages you wish to remove from the mailbox.

Response

HTTP Request was successful.

apiversioninteger

The version of the API.

funcstring

The name of the method called.

modulestring

The name of the module called.

Example response

{
  "apiversion": 3,
  "func": "expunge_messages_for_mailbox_guid",
  "module": "Mailboxes",
  "result": {
    "status": 1
  }
}