# Remove email account messages by mailbox GUID This function removes mail messages from a cPanel account. When you disable the Receive Mail role, the system this function. Endpoint: GET /expunge_messages_for_mailbox_guid Version: 11.134.0.5 Security: BasicAuth ## Query parameters: - `account` (string, required) The email account's name. Example: "user@example.com" - `mailbox_guid` (string, required) The mailbox's globally unique identifier (GUID). To find the mailbox GUID, use the WHM API 1 - function. Example: "2550860f0c58d158c92a000044f0d230" - `query` (string, required) The Dovecot search query to select which messages you wish to remove from the mailbox. For more information, read Dovecot's Search Query documentation. Example: "savedbefore 52w" ## Response 200 fields (application/json): - `metadata` (object) - `metadata.command` (string) The method name called. Example: "expunge_messages_for_mailbox_guid" - `metadata.reason` (string) The reason the API function failed when the field is . This field may display a success message when a function succeeds. Example: "OK" - `metadata.result` (integer) * - Success * - Failed. Check the reason field for more details. Enum: 0, 1 - `metadata.version` (integer) The version of the API function. Example: 1