For the complete documentation index, see llms.txt. This page is also available as Markdown.

Delete all messages

Permanently delete every message in a folder (empty the folder).

Delete all messages

delete

Permanently delete every message in a folder (empty the folder).

Authorizations
AuthorizationstringRequired

Bearer authentication using API tokens in the Authorization header.

Path parameters
mailboxResourceIdstringRequired

Resource ID of the managed mailbox the bearer token is authorized for.

Example: AC1a2b3c4d5e6f7g
folderstringRequired

Folder path (URL-encoded).

Example: INBOX.Trash
Responses
204

Messages deleted successfully.

No content

delete/api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages
DELETE /api/v1/mailboxes/{mailboxResourceId}/folders/{folder}/messages HTTP/1.1
Host: api.mail.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Last updated

Was this helpful?