Runs examples for real against your account. Test keys only; kept in this tab, never stored on our side. Get a key
ZapSMTP / Docs / Received emails

Delete a received email

DELETE/v1/emails/receiving/{id}

Permanently erase a received email's content and metadata (GDPR erasure).

Requires a full-access live key; test keys get 403 test_key_restricted.

Idempotent: deleting an id that does not exist (but is a valid UUID) still returns 200 deleted:true.

Path parameters

idstring (UUID)required
Received email id

Errors

restricted_api_keyHTTP 403
test_key_restrictedHTTP 403
test-mode keys can send test email and read, not change the account: use a live key
not_foundHTTP 404
id is not a UUID
not_readyHTTP 409
this email is still being stored; retry the erasure in a few seconds (Retry-After: 5)
inbound_not_configuredHTTP 503
DELETE/v1/emails/receiving/{id}
curl -X DELETE 'https://zapsmtp.xyz/v1/emails/receiving/019a1f2e-7c3b-7d41-9a52-0c4b8e6f1a23' \
  -H "Authorization: Bearer $ZAP_API_KEY"
Set ZAP_API_KEY in your environment.
Response 200 OK
{
  "object": "email",
  "id": "019a1f30-1d4e-7a6b-8c2d-3e4f5a6b7c8d",
  "deleted": true
}