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

Get text message

Get text email body, if it exists.

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 message body in txt format.

text/plain
stringOptionalExample: Congrats for sending test email with Mailtrap! Inspect it using the tabs above and learn how this email can be improved. Now send your email using our fake SMTP server and integration of your choice! Good luck! Hope it works.
get/api/sandboxes/{sandbox_id}/messages/{message_id}/body.txt
curl -X GET https://mailtrap.io/api/sandboxes/{sandbox_id}/messages/{message_id}/body.txt \
  -H 'Authorization: Bearer YOUR_API_KEY'
Congrats for sending test email with Mailtrap!

Inspect it using the tabs above and learn how this email can be improved.
Now send your email using our fake SMTP server and integration of your choice!

Good luck! Hope it works.

Last updated

Was this helpful?