All updates

Share Email API

Create a shareable link to view a sent or received email directly from the API.

Today we're releasing a new API endpoint to share an email. It returns a link to a read-only view of any sent or received email, viewable by anyone with the link.

Share any email with someone outside of your team, like when a:

  • client wants confirmation an email was sent
  • teammate without dashboard access needs to see an email
  • support tool needs a quick preview

You can already create a shareable link from the dashboard, and now also from code.

What you can build with it

  • Support tooling: attach a live email preview to a ticket.
  • Customer-facing history: let users open a "view this email" link from your app.
  • Agent workflows: ask your agent to surface the email when reporting on a send.
  • Debugging with your team: share a link to see the email when investigating issues.

Use the ID of any sent or received email. The API returns the full share URL.

import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data, error } = await resend.emails.share(
'49a3999c-0ce1-4ea6-ab68-afcd6dc2e794',
{ expiresIn: '2 hours' },
);

The response includes the link, ready to hand off:

{
"object": "email",
"id": "49a3999c-0ce1-4ea6-ab68-afcd6dc2e794",
"url": "https://resend.com/shared?token=eyJhbGciOiJIUzI1NiJ9..."
}

How expiration works

Share links are temporary by design. Anyone with the link can view the email while it's still active, but links always expire.

  • expires_in accepts a human-readable duration like 10m, 2 hours, or 1 day.
  • If you don't pass it, the link lasts 48 hours, which is also the maximum.
  • Invalid or over-limit durations return a validation error.

Conclusion

The share email API is part of a larger move to bring the full functionality of the dashboard into the API. You can also create share links from the Resend CLI or delegate it to your agent through the MCP server.