POST/emails/{email_id}/share

Create a shareable email link

Creates a shareable link for a sent or received email. Use email_id to select the email and optionally set expires_in to a duration of up to 48 hours; the default is 48 hours.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 parameter · 1 body field
email_idstringrequired
The ID of the email for which to create a shareable link.

Optional settings for the shareable link.

expires_instringoptional
How long the link stays valid for, as a duration like `10m`, `2 hours`, or `1 day`. Defaults to `48h` and cannot exceed 48 hours.

1 status code
200Returns the email's ID and a shareable URL that is valid until it expires.
objectstringoptional
The type of object.
idstringoptional
The ID of the email.
urlstringoptional
The shareable link, valid until it expires.

Error handling

The email_id path parameter must identify an email. If supplied, expires_in must specify a duration no longer than 48 hours; it defaults to 48 hours when omitted.