Skip to content

Email Events

Every email sent through RelayPost generates a trail of events as it moves through the delivery pipeline. You can query these events via the API or receive them in real time via webhooks.

GET /api/v1/emails/:id

The response includes the full event timeline for the email.

Terminal window
curl "https://relaypost.dev/api/v1/emails/a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
-H "Authorization: Bearer YOUR_API_KEY"

Response:

{
"data": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"from_address": "[email protected]",
"to_addresses": ["[email protected]"],
"subject": "Your receipt",
"status": "delivered",
"events": [
{
"id": "evt_001",
"type": "delivered",
"recipient": "[email protected]",
"smtp_code": 250,
"smtp_message": "OK",
"created_at": "2025-01-15T10:30:05.000Z"
}
]
}
}
TypeDescription
queuedEmail accepted into the delivery queue
processingDelivery attempt in progress
deliveredSuccessfully accepted by the recipient’s mail server
openedRecipient opened the email (pixel tracking)
bouncedRecipient’s server permanently rejected the email
deferredTemporary failure — will retry automatically
failedAll retry attempts exhausted
complainedRecipient reported the email as spam
rejectedEmail rejected before sending (validation, suppression)
FieldTypeDescription
typeStringEvent type (see above)
recipientStringThe recipient email address
mx_hostStringThe MX server that handled the email
smtp_codeIntSMTP response code (e.g., 250, 550)
smtp_messageStringSMTP response message from the receiving server
created_atDateTimeWhen the event occurred
CodeMeaning
250Success — email accepted
421Service temporarily unavailable — will retry
450Mailbox temporarily unavailable — will retry
550Mailbox not found — hard bounce
551User not local — forwarding error
552Mailbox full
553Invalid mailbox name
554Transaction failed — often a policy rejection

You can also view events in the RelayPost dashboard under Messages. Click any email to see its full event timeline.