Delete selected messages in mailbox by GUID

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

Authorizations:
query Parameters
required
string or string

The email account's name.

Examples:
account=_mainaccount@example.com
account=example
account=user@example.com
mailbox_guid
required
string

The mailbox's globally unique identifier (GUID).

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

Example: mailbox_guid=2550860f0c58d158c92a000044f0d230
query
required
string

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

Example: query=savedbefore 52w

Responses

Response Schema: application/json
apiversion
integer

The version of the API.

func
string

The name of the method called.

module
string

The name of the module called.

object

Request samples

uapi --user=username Mailboxes expunge_messages_for_mailbox_guid account='_mainaccount@example.com' mailbox_guid='2550860f0c58d158c92a000044f0d230' query='savedbefore 52w'

Response samples

Content type
application/json
{
  • "apiversion": 3,
  • "func": "expunge_messages_for_mailbox_guid",
  • "module": "Mailboxes",
  • "result": {
    • "data": { },
    • "errors": null,
    • "messages": null,
    • "metadata": { },
    • "status": 1,
    • "warnings": null
    }
}