Delete an empty folder

DELETE/api/v1/mailbox/folders/{folder}
Requires amailbox token— it acts as one mailbox holder, not as the organization.

folder is the id GET /folders returns. Refused with 409 cannot_delete_special_folder for INBOX and the special-use folders, and with 409 folder_not_empty (messages) or folder_has_subfolders while anything is still inside -- IMAP DELETE destroys contents without a Trash step, so the holder empties the folder deliberately first. The client should warn on 409 rather than retry.

Parameters

NameInTypeDescription
folderrequiredpathstring

Request

DELETE/api/v1/mailbox/folders/{folder}
curl -X DELETE 'https://app.mailyte.com/api/v1/mailbox/folders/01JBT8XQ2M9WYC3K4F6R7S8T9V' \
  -H 'Authorization: Bearer MAILBOX_TOKEN'
The key names its own organization, so no X-Organization-ID header is needed.

Response

Successful Response

Returned inside the standard envelope.

Errors

StatusWhen
422Validation Error

Every status, with what causes it and what to do, is on the error reference.