Get mail headers
Get mail headers of a message
get
Authorizations
Api-TokenstringRequired
Pass the API token in the Api-Token
Path parameters
sandbox_idinteger · int64 · min: 1RequiredExample:
Unique sandbox ID
4015message_idinteger · int64 · min: 1RequiredExample:
Unique message ID
427Responses
200
Returns mail headers of the message
application/json
headersobjectOptional
An object containing key/value pairs of header names and value. The key/value pairs must be strings.
401
Returns unauthorized error message. Check your credentials.
application/json
403
Returns forbidden error message. Check your permissions.
application/json
404
Returns not found error message
application/json
get/api/sandboxes/{sandbox_id}/messages/{message_id}/mail_headers
curl -X GET https://mailtrap.io/api/sandboxes/{sandbox_id}/messages/{message_id}/mail_headers \
-H 'Authorization: Bearer YOUR_API_KEY'
{
"headers": {
"bcc": "john_doe@example.com",
"cc": "john_doe@example.com",
"from": "john_doe@example.com",
"to": "john_doe@example.com",
"subject": "Your Example Order Confirmation"
}
}Last updated
Was this helpful?

