> For the complete documentation index, see [llms.txt](https://docs.mailtrap.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mailtrap.io/developers/inbound/messages/forward-a-message.md).

# 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 — address it with `to` (and/or `cc`/`bcc`). The `from` rules match those of the Reply operation: rejected for Mailtrap-hosted inboxes, required-and-domain-bound for custom-domain inboxes.

```json
{"openapi":"3.1.0","info":{"title":"Inbound","version":"2.0.0"},"tags":[{"name":"messages","description":"Inbound messages are the emails delivered to an inbox. Use these\nendpoints to page through recent messages, fetch the full body and\nattachments, reply to or forward a message, or delete one you no longer\nneed.\n"}],"servers":[{"description":"Mailtrap API","url":"https://mailtrap.io"}],"security":[{"HeaderAuth":[]},{"BearerAuth":[]}],"components":{"securitySchemes":{"HeaderAuth":{"type":"apiKey","description":"API token in Api-Token header","in":"header","name":"Api-Token"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Bearer token authentication"}},"parameters":{"inbox_id":{"name":"inbox_id","in":"path","required":true,"description":"Inbound inbox ID","schema":{"type":"integer"}},"message_id":{"name":"id","in":"path","required":true,"description":"Inbound message ID","schema":{"type":"string"}}},"schemas":{"SendMessageInput":{"type":"object","description":"Options for the sent message. All fields are optional. `reply` and\n`reply_all` must carry a body (`text` and/or `html`); `forward` may omit\nit, since the original message is quoted automatically. `forward` has\nno default recipient, so supply at least one in `to`, `cc`, or `bcc`.\nAddresses use the Email Sending API `{ email, name }` shape. Missing\nbodies or recipients are rejected by the Email API with `400`.\n","properties":{"from":{"allOf":[{"$ref":"#/components/schemas/Address"}],"description":"Sender address. Rejected for Mailtrap-hosted inboxes (they always\nsend from their own address); required for custom-domain inboxes,\nwhere the address must belong to the inbox's domain.\n"},"to":{"type":"array","maxItems":1000,"items":{"$ref":"#/components/schemas/Address"}},"cc":{"type":"array","maxItems":1000,"items":{"$ref":"#/components/schemas/Address"}},"bcc":{"type":"array","maxItems":1000,"items":{"$ref":"#/components/schemas/Address"}},"reply_to":{"$ref":"#/components/schemas/Address"},"text":{"type":"string","description":"Plain-text body."},"html":{"type":"string","description":"HTML body."},"category":{"type":"string","maxLength":255,"description":"Email API category for the sent message."},"attachments":{"type":"array","items":{"$ref":"#/components/schemas/EmailAttachment"}},"headers":{"type":"object","additionalProperties":{"type":"string"},"description":"Custom headers to add to the sent message. `In-Reply-To` and\n`References` are always set from the original message and cannot be\noverridden.\n"},"custom_variables":{"type":"object","additionalProperties":{"type":"string"},"description":"Email API custom variables for the sent message."}}},"Address":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email"},"name":{"type":"string"}}},"EmailAttachment":{"type":"object","required":["content","filename"],"properties":{"content":{"type":"string","description":"Base64-encoded attachment content."},"filename":{"type":"string"},"type":{"type":"string","description":"MIME type of the attachment."},"disposition":{"type":"string","enum":["attachment","inline"],"default":"attachment"},"content_id":{"type":"string","description":"`Content-ID` used to reference an inline attachment from the HTML\nbody. Only relevant when `disposition` is `inline`.\n"}}},"SendMessageResult":{"type":"object","required":["message_ids"],"properties":{"message_ids":{"type":"array","description":"UUIDs assigned by the Email API to the sent message, one per\nrecipient. These are the sent message's UUIDs — not the inbound\nmessage ID acted on, nor an RFC `Message-ID` header value.\n","items":{"type":"string"}}}},"SendMessageError":{"type":"object","properties":{"errors":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]}}},"ErrorResponse":{"type":"object","properties":{"error":{"type":"string"}}}},"responses":{"SendMessageAccepted":{"description":"Message queued for delivery. Returns the UUID(s) the Email API\nassigned to the sent message, one per recipient.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageResult"}}}},"SendMessageBadRequest":{"description":"The message could not be sent. Returned for an invalid sender (for\nexample a `from` on a Mailtrap-hosted inbox, or one outside the inbox's\ndomain) and for validation errors rejected by the Email API.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageError"}}}},"Unauthorized":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"SendMessageForbidden":{"description":"The token lacks admin access (on the inbox for a Mailtrap-hosted inbox,\nor on the inbox's sending domain for a custom-domain inbox), the\nMailtrap-hosted sending limit has been reached, or the Email API\nrejected the message.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageError"}}}},"NotFound":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"PayloadTooLarge":{"description":"The message exceeds the maximum allowed size.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageError"}}}},"TooManyRequests":{"description":"Too many requests. Retry after a short delay.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageError"}}}}}},"paths":{"/api/inbound/inboxes/{inbox_id}/messages/{id}/forward":{"post":{"operationId":"forwardInboundMessage","summary":"Forward a message","description":"Forward an inbound message to new recipients. The subject is prefixed\nwith `Fwd:` (unless it already starts with one). The original message is\nalways carried along: its rendered body is quoted below your optional\nnote and its attachments are re-attached (any attachments you supply are\nadded on top).\n\nA forward has no implicit recipient — address it with `to` (and/or\n`cc`/`bcc`). The `from` rules match those of the Reply operation:\nrejected for Mailtrap-hosted inboxes, required-and-domain-bound for\ncustom-domain inboxes.\n","tags":["messages"],"parameters":[{"$ref":"#/components/parameters/inbox_id"},{"$ref":"#/components/parameters/message_id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendMessageInput"}}}},"responses":{"201":{"$ref":"#/components/responses/SendMessageAccepted"},"400":{"$ref":"#/components/responses/SendMessageBadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/SendMessageForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"413":{"$ref":"#/components/responses/PayloadTooLarge"},"429":{"$ref":"#/components/responses/TooManyRequests"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.mailtrap.io/developers/inbound/messages/forward-a-message.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
