Skip to main content
GET
Fetch email

Authorizations

X-API-KEY
string
header
required

API Key Authentication.

Path Parameters

id
string<uuid>
required

The unique identifier of the email in our system.

Response

Schema representing an email that Aira sent for the tenant, with its body, its attachments, the signals of the provider and the invoice that it delivered.

id
string<uuid>
required

The unique identifier of the email in our system.

status
enum<string>
required

The status of the email: sent once the provider accepted it, delivered once it reached the server of a recipient, opened once a recipient opened it, bounced once it came back, and failed when the provider refused it.

Available options:
sent,
delivered,
opened,
bounced,
failed
subject
string
required

The subject of the email.

Example:

"Fatura 42 disponível"

recipients
string[]
required

The email addresses that the email went to.

sentAt
null | string<date-time>
required

ISO 8601 timestamp in UTC indicating when the provider accepted the email, or null if the provider refused it.

createdAt
string<date-time>
required

ISO 8601 timestamp in UTC indicating when Aira created the email.

bounceType
null | enum<string>
required

The kind of bounce that the provider reported, or null if the email did not bounce or the provider did not classify the bounce.

Available options:
hard,
soft,
null
fromEmail
string
required

The sender of the email, as the recipients see it.

Example:

"Acme <billing+acme@useaira.com>"

deliveredAt
null | string<date-time>
required

ISO 8601 timestamp in UTC indicating when the provider reported that the email reached the server of a recipient, or null.

openedAt
null | string<date-time>
required

ISO 8601 timestamp in UTC indicating when the provider reported that a recipient opened the email, or null.

bouncedAt
null | string<date-time>
required

ISO 8601 timestamp in UTC indicating when the provider reported that the email bounced, or null.

providerReason
null | string
required

The reason that the provider gave, verbatim, for a bounce or for a refusal, or null.

Example:

"550 5.1.1 The email account that you tried to reach does not exist."

attachments
string[]
required

The file names of the attachments of the email, in order. Download each one by its index in this list.

html
null | string
required

The body of the email in HTML, as Aira handed it to the provider, or null if Aira cannot read the stored body.

Example:

"<html><body><p>A fatura PADAR-00042 da Padaria Central está disponível.</p></body></html>"

invoice
object | null
required

The invoice that the email delivered, or null for an email of no invoice.