Get an email log message by ID
Returns a single message by message UUID. Message must belong to the account and a domain the token can access.
get
Authorizations
Api-TokenstringRequired
API token in Api-Token header
Path parameters
sending_message_idstring · uuidRequired
Message UUID
Responses
200
Success
application/json
message_idstring · uuidOptional
statusstring · enumOptionalPossible values:
subjectstring · nullableOptional
rfc_message_idstring · nullableOptional
Value of the RFC 5322 Message-ID header.
in_reply_tostring · nullableOptional
Value of the RFC 5322 In-Reply-To header.
referencesstring[]Optional
Values of the RFC 5322 References header.
thread_idstring · nullableOptional
ID of the inbound thread this message belongs to, or null if the message is not part of one. Use it with the Inbound Threads endpoints to fetch the full conversation.
fromstringOptional
tostringOptional
sent_atstring · date-timeOptional
client_ipstring · nullableOptional
categorystring · nullableOptional
custom_variablesobjectOptional
sending_streamstring · enumOptionalPossible values:
domain_idintegerOptional
template_idinteger · nullableOptional
template_variablesobjectOptional
opens_countintegerOptional
clicks_countintegerOptional
raw_message_urlstring · uriOptional
Signed URL to download raw .eml message (temporary).
401
Returns unauthorized error message. Check your credentials.
application/json
404
Resource not found
application/json
429
Rate limit exceeded for the current account.
application/json
get/api/email_logs/{sending_message_id}
curl -X GET 'https://mailtrap.io/api/email_logs/{sending_message_id}' \
-H 'Authorization: Bearer YOUR_API_KEY'
{
"message_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "delivered",
"subject": "Welcome to our service",
"from": "sender@example.com",
"to": "recipient@example.com",
"sent_at": "2025-01-15T10:30:00Z",
"client_ip": "203.0.113.42",
"category": "Welcome Email",
"custom_variables": {},
"sending_stream": "transactional",
"domain_id": 3938,
"template_id": 100,
"template_variables": {},
"opens_count": 2,
"clicks_count": 1,
"raw_message_url": "https://storage.example.com/signed/eml/a1b2c3d4-e5f6-7890-abcd-ef1234567890?token=...",
"events": [
{
"event_type": "click",
"created_at": "2025-01-15T10:35:00Z",
"details": {
"click_url": "https://example.com/track/click/abc123",
"web_ip_address": "198.51.100.50"
}
},
{
"event_type": "spam",
"created_at": "2025-01-15T10:40:00Z",
"details": {
"spam_feedback_type": "abuse"
}
}
]
}Last updated
Was this helpful?

