Export the email log

Download a date range of a project's email log as CSV or JSON Lines, one row per recipient, to keep it longer or study it in your own tools.

The email log keeps your mail as long as your plan does. To keep a record for longer, or to read it in a spreadsheet or a script, export a range of it as a file. Exports are an exx.sh addition: Resend has no such endpoint.

Export a range

On the project's Emails page, choose Export, pick the first and last day (UTC) and the format, and confirm. exx.sh writes the file in the background and emails you a link when it is ready, or tells you why it failed. The Exports page next to it lists the project's exports with their state: Queued, Writing, Ready, Failed or Expired.

  • A range covers at most 31 days, and cannot start before the oldest mail your plan still keeps.
  • A project can have 2 exports queued or being written at once. Ask for another one when one of them is done; until then the answer is 409 exx_export_in_progress.
  • A file holds up to 1,000,000 recipient rows. A range with more fails with that reason: ask for a shorter one.

What the file holds

One row per recipient of every email the project sent in the range, oldest first, with the same columns as the organization's data export:

ColumnWhat it is
message_idThe email's id
project_idThe project's id
created_atWhen the API accepted the email
fromThe sender
toThis row's recipient
kindto, cc or bcc
subjectThe subject line
message_statusThe state of the whole email
recipient_statusThe state of delivery to this recipient
last_event_atWhen the recipient's last event happened
  • CSV is for a spreadsheet. Cells that a spreadsheet could read as a formula start with a ', so opening the file never runs anything.
  • JSON Lines (.jsonl) is for a script: one JSON object per line, with the same names.

A file holds every recipient address of the range, and nothing of the message bodies or attachments.

Download it

The link in the email works for 24 hours. After that, the Exports page gives you a fresh one, as long as the file is still kept. The link is yours: it opens only while you can still export (the owner or admin role), and stops working if you leave the organization. Each download is an entry of the audit log, and so is each export you ask for.

How long files are kept

An export and its file are kept for 7 days, never longer than your plan keeps its email log: 3 days on Free and 7 days on Pro and Scale. Then the export and its file are deleted. Download what you want to keep before then.

Who can export

Exports hold every recipient address, so only the owner and admin roles can ask for them, list them and download them (team roles). They are in the dashboard only: an API key cannot export.

On this page