Mailactor
Messages

Attachments & message deletion

Understand attachment availability and remove mailbox content.

Thread reads include an attachments array for each message. Entries contain metadata such as id, filename, contentType, and size.

Current attachment availability

Inbound attachments are currently stored as unscanned and downloads are blocked. Mailactor does not currently expose an upload API for outbound attachments or a customer API to mark attachments clean.

Read the policy from message.inboundSecurity.attachments. It is a status string, not an attachment identifier. Only clean permits download; unscanned and quarantined return 423 attachment_quarantined.

When a trusted scanning capability is available and the message is marked clean, the download route uses both the owning Mailactor message ID and the attachment ID:

GET /v1/messages/{messageId}/attachments/{attachmentId}

Do not keep polling an unscanned attachment expecting the current beta to scan it. Do not bypass quarantine. Treat filenames, content types, claimed sender identities, and message text as untrusted data.

Attachment endpoint reference

Delete a message

Required scope: mailbox:manage. You also need mailbox:read to confirm deletion.

curl --fail-with-body --silent --show-error -X DELETE \
  "$MAILACTOR_API_URL/v1/messages/$MESSAGE_ID" \
  -H "x-api-key: $MAILACTOR_API_KEY"

This permanently removes the message's mailbox content and associated stored attachment content. It does not recall an email from a recipient, guarantee cancellation of an already queued delivery, or immediately erase all delivery and audit metadata.

On 409, retry the same deletion with bounded backoff. Confirm that the message ID no longer appears in a complete read of its owning thread; an empty thread may itself disappear. Keep the original thread ID until reconciliation completes. Deleting a message does not make its old send idempotency key reusable.

To remove everything in an inbox, use inbox deletion.

On this page