Forward a message
Forward an inbound message to new recipients. The subject is prefixed with Fwd: (unless it already starts with one). The original message is always carried along: its rendered body is quoted below your optional note and its attachments are re-attached (any attachments you supply are added on top).
A forward has no implicit recipient — you must address it with to (and optionally cc/bcc). The from rules match those of the Reply operation: rejected for Mailtrap-hosted inboxes, required-and-domain-bound for custom-domain inboxes.
API token in Api-Token header
Inbound inbox ID
1Inbound message ID
1700000000000123Options for the sent message. All fields are optional. reply and
reply_all must carry a body (text and/or html); forward may omit
it, since the original message is quoted automatically. forward also
requires at least one recipient in to. Addresses use the Email
Sending API { email, name } shape.
Plain-text body.
Thanks for reaching out. We are looking into it.HTML body.
<p>Thanks for reaching out. We are looking into it.</p>Email API category for the sent message.
Support replyMessage queued for delivery. Returns the UUID(s) the Email API assigned to the sent message, one per recipient.
UUIDs assigned by the Email API to the sent message, one per
recipient. These are the sent message's UUIDs — not the inbound
message ID acted on, nor an RFC Message-ID header value.
["1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d"]The message could not be sent. Returned for an invalid sender (for
example a from on a Mailtrap-hosted inbox, or one outside the inbox's
domain) and for validation errors rejected by the Email API.
Unauthorized
The caller lacks permission on the inbox, or the inbox's monthly sending limit has been reached.
Not found
The message exceeds the maximum allowed size.
Too many requests. Retry after a short delay.
curl -X POST https://mailtrap.io/api/inbound/inboxes/{inbox_id}/messages/{id}/forward \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{ "to": [{ "email": "colleague@example.com" }], "text": "Please take a look at the message below." }'
{
"message_ids": [
"1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d"
]
}Last updated
Was this helpful?

