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

List attachments

GET/v1/emails/receiving/{id}/attachments

List a received email's attachments with signed download links.

Requires a full-access key.

Each download_url works for one hour without an API key. Files are always served as downloads; HTML, SVG, XML and JavaScript are served as binary so they can never run in a browser.

Path parameters

idstring (UUID)required
Received email id

Query parameters

limitinteger
1-100; when omitted or out of range all attachments are returned.
afterstring
Attachment id; returns attachments after it (ignored if unknown).
beforestring
Attachment id; returns attachments before it (used only when after is absent).

Errors

restricted_api_keyHTTP 403
not_foundHTTP 404
email not found
inbound_not_configuredHTTP 503
GET/v1/emails/receiving/{id}/attachments
curl 'https://zapsmtp.xyz/v1/emails/receiving/019a1f2e-7c3b-7d41-9a52-0c4b8e6f1a23/attachments' \
  -H "Authorization: Bearer $ZAP_API_KEY"
Set ZAP_API_KEY in your environment.
Response 200 OK
{
  "object": "list",
  "has_more": false,
  "data": [
    {
      "object": "attachment",
      "id": "5b0f8f7e-2a1c-5d3e-9f4a-6b7c8d9e0f1a",
      "filename": "screenshot.png",
      "content_type": "image/png",
      "content_disposition": "attachment",
      "content_id": null,
      "size": 48213,
      "download_url": "https://zapsmtp.xyz/v1/files/eyJ0Ijoi....aGk",
      "expires_at": "2026-10-21T16:12:00Z"
    }
  ]
}