FlaresendDocs
Emails

Retrieve an email

Get one email with its recipients and full event timeline.

GET/v1/emails/{id}API key

Returns everything Flaresend knows about one email: its status, each recipient's delivery result, and every event in its timeline, oldest first. It doesn't include the body; use Retrieve email content for that.

Path parameters

idstringpathrequired

The email ID, for example email_01K6B2Y4ZP9R3M7T8V5N2QXW4C.

Response

idstring

The email ID.

projectIdstring

The project it belongs to.

mode'live' | 'test'

test when it was sent with a test key.

sourcestring

How it was sent: http (single send over the API, or a resend from the dashboard), batch, rpc or broadcast.

fromstring

The sender's bare address, lowercased.

fromNamestring | null

The sender's display name, if one was given.

replyTostring | null

The reply-to address.

tostring[]

Bare addresses, lowercased and deduplicated. cc and bcc are the same.

subjectstring

The final subject, after any template was rendered.

textPreviewstring | null

The first 200 characters of the text body, or of the HTML with tags removed.

tagsRecord<string, string> | null

The tags sent with the email. Broadcast emails also carry broadcast_id, and resent emails resent_from.

templatestring | null

The template name, when one was used.

templateVersionnumber | null

The version of a stored template that was rendered. null for built-in templates.

statusstring

The email's overall status. See Email statuses for what each value means and how it's worked out from the recipients.

cloudflareMessageIdstring | null

The message ID Cloudflare returned when it accepted the email. Set once the email is sent.

lastError{ code, message } | null

The most recent send error, for example { "code": "E_RATE_LIMIT_EXCEEDED", "message": "…" }. Cleared when a retry succeeds. Every attempt is also in the timeline as an email.retrying event.

attemptsnumber

How many times the send queue tried to hand it to Cloudflare.

sizeBytesnumber

The stored size of the email, attachments included.

How many attachments it has.

trackOpensboolean

Whether open tracking was applied. trackClicks is the same for clicks.

openedAtstring | null

When it was first opened, if open tracking was on. firstClickedAt is the same for clicks.

createdAtstring

When Flaresend accepted it. The other timestamps are queuedAt, sentAt, deliveredAt, failedAt (set when it reaches a failure status) and scheduledAt. Each is null until it happens.

recipientsRecipient[]

One entry per address, with its own delivery result.

Show recipient properties
addressstring

The address.

kind'to' | 'cc' | 'bcc'

Which list it was in.

statusstring

queued, sent, delivered, deferred, bounced, complained, rejected, failed, test or canceled.

providerstring | null

The receiving mail provider, when Cloudflare reports it.

smtpStatusstring | null

The SMTP status code from the receiving server, for example 250 or 550.

smtpResponsestring | null

The receiving server's response text.

deliveryMsnumber | null

How long delivery took, in milliseconds.

bounceType'hard' | 'soft' | null

For bounces. Hard bounces add the address to the suppression list.

lastEventAtstring | null

When the last delivery event for this address arrived.

eventsEvent[]

The timeline, oldest first.

Show event properties
idstring

The event ID, evt_….

typestring

email.queued, email.scheduled, email.sent, email.retrying, email.delivered, email.deferred, email.bounced, email.complained, email.rejected, email.failed, email.test, email.canceled, email.opened or email.clicked.

recipientstring | null

The address the event is about. null for events about the whole email.

dataobject | null

Details that depend on the type: Cloudflare's delivery result (and bounce, rejection and so on) for delivery events, { messageId } for email.sent, { code, message, attempt, delaySeconds } for email.retrying, { url, userAgent } for email.clicked.

createdAtstring

When it happened.

Errors

StatusCodeWhen
404email_not_foundNo email with that ID in this project.