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: 1RequiredExample:
Unique sandbox ID
4015message_idinteger · int64 · min: 1RequiredExample:
Unique message ID
427Responses
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.401
Returns unauthorized error message. Check your credentials.
text/plain
403
Returns forbidden error message. Check your permissions.
text/plain
404
Returns not found error message
application/json
409
Returns conflict error message. Text body does not exist.
text/plain
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?

