Sorry for the trouble you are having. What address are you trying to delete all the messages from? Is this an address you have configured as private or is it a public address? Feel free free to send me a message directly if you don’t want to post the address publicly here in the forums.
The REST endpoint that the deleteAllMessages method is acting on is documented here. It does state “The address must be an owned address or an address in a owned domain.” which is probably why you are seeing the 401. Try reserving the address and see if the API call works.
Let me know if that resolves your issue.
Mailsac is trusted by thousands of developers and businesses for temporary disposable email testing.