For the complete documentation index, see llms.txt. This page is also available as Markdown.

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: 1Required

Unique sandbox ID

Example: 4015
message_idinteger · int64 · min: 1Required

Unique message ID

Example: 427
Responses
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.

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?