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:
You can already create a shareable link from the dashboard, and now also from code.
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..."}
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.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.