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

Share an email

POST/v1/emails/{id}/share

Create a link anyone can open to view a sent email — for a colleague or support. It shows the subject, sender, recipients and body; never attachments or headers.

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

The page renders the body in a sandbox: scripts, forms and external requests other than images are blocked.

Path parameters

idstringrequired
Email id.

Body parameters

expires_in_hoursinteger
1–720. Default 72.

Errors

test_key_restrictedHTTP 403
test-mode keys can send test email and read, not change the account: use a live key
not_foundHTTP 404
Unknown email, or past your plan’s log retention.
invalid_parameterHTTP 422
expires_in_hours out of range.
POST/v1/emails/{id}/share
curl -X POST 'https://zapsmtp.xyz/v1/emails/019a1f2e-7c3b-7d41-9a52-0c4b8e6f1a23/share' \
  -H "Authorization: Bearer $ZAP_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "expires_in_hours": 72
}'
Set ZAP_API_KEY in your environment.
Response 201 Created
{
  "object": "email_share",
  "email_id": "019a1f2e-7c3b-7d41-9a52-0c4b8e6f1a23",
  "url": "https://zapsmtp.xyz/t/s/eyJ0Ijoi…",
  "expires_at": "2026-10-25T15:04:10Z"
}