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

Retrieve an attachment

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

One attachment of a sent email with a fresh download link.

Requires a full-access key.

Path parameters

idstringrequired
Email id.
aidstringrequired
Attachment id from the list.

Errors

not_foundHTTP 404
Unknown email or attachment.
GET/v1/emails/{id}/attachments/{aid}
curl 'https://zapsmtp.xyz/v1/emails/019a1f2e-7c3b-7d41-9a52-0c4b8e6f1a23/attachments/att_1' \
  -H "Authorization: Bearer $ZAP_API_KEY"
Set ZAP_API_KEY in your environment.
Response 200 OK
{
  "object": "attachment",
  "id": "att_1",
  "filename": "invoice.pdf",
  "content_type": "application/pdf",
  "content_disposition": "attachment",
  "content_id": "",
  "size": 20480,
  "download_url": "https://zapsmtp.xyz/v1/files/eyJ0Ijoi…",
  "expires_at": "2026-10-22T16:04:10Z"
}