🗑️Delete a Message
This is the GraphQL mutation to run when you want to delete a message from a mailbox.
Do I need to delete messages from Maildrop?
In most cases, you shouldn't need to delete any messages. Mailboxes are temporary, and if no email messages are sent to a mailbox within 24 hours, the mailbox is completely erased automatically. Additionally, when there are a large amount of incoming messages, mailboxes that haven't seen messages recently may get emptied before the 24 hour window.
If you are sending a large number of automated messages (for example, testing sending out batches of messages to a large database of mock email addresses) then as a courtesy, you should delete those messages as part of your testing script cleanup phase.
Deletes an individual message, by id, from a mailbox.
POST
https://api.maildrop.cc/graphql
This GraphQL mutation takes a mailbox name and a message id as required parameters. This only returns a boolean of whether the message was deleted or not. Incorrect mailbox/id combinations will still return true.
Headers
Content-Type
String
application/json
Request Body
String
'{"query":"mutation Example { delete(mailbox:\"testing\", id:\"abc123\") }"}'
Examples
returns:
Last updated