Emails
Get delivery attempts
Get the complete delivery history for an email, including SMTP response codes, timestamps, and current retry state.
Response Fields
Status
The current status of the email:
- pending - Awaiting first delivery attempt
- sent - Successfully delivered to recipient server
- softfail - Temporary failure, automatic retry scheduled
- hardfail - Permanent failure, will not retry
- held - Held for manual review
- bounced - Bounced by recipient server
Retry State
When the email is in the delivery queue (pending or softfail status), retryState provides information about the retry schedule:
- attempt - Current attempt number (0 = first attempt)
- maxAttempts - Maximum attempts before hard-fail (typically 18)
- attemptsRemaining - Attempts left before hard-fail
- nextRetryAt - When the next retry is scheduled (Unix timestamp)
- processing - Whether the email is currently being processed
- manual - Whether this was triggered by a manual retry
When the email has finished processing (sent, hardfail, held, bounced), retryState is null.
Can Retry Manually
Indicates whether you can call POST /emails/{emailId}/retry to manually retry the email. This is true when the raw message content is still available (not expired due to retention policy).
get/emails/{emailId}/deliveries
Path parameters
emailIdstring required
Email identifier (the token returned when sending an email).
Response
Delivery history with retry state
Example response
{
"success": true,
"data": {
"id": "aBc123XyZ",
"status": "softfail",
"retryState": {
"attempt": 3,
"maxAttempts": 18,
"attemptsRemaining": 15,
"nextRetryAt": 1705903200,
"nextRetryAtIso": "2024-01-22T11:00:00Z",
"processing": false,
"manual": false
},
"canRetryManually": true,
"deliveries": [
{
"id": "789",
"status": "softfail",
"details": "421 temporarily unavailable: Delivery to user@example.com failed at 1.2.3.4:25 (mx.example.com)",
"output": "421 4.7.0 Try again later",
"code": 421,
"sentWithSsl": true,
"timestamp": 1705900000,
"timestampIso": "2024-01-22T10:00:00Z",
"classification": "temporarily_unavailable",
"classificationCode": 42,
"smtpEnhancedCode": "4.7.0",
"remoteHost": "mx.example.com"
}
]
},
"meta": {
"requestId": "req_V1StGXR8_Z5jdHi6"
}
}