message: forward

Important: APIs under the /beta version in Microsoft Graph are in preview and are subject to change. Use of these APIs in production applications is not supported.

Forward a message, add a comment or modify any updateable properties
all in one forward call. The message is saved in the Sent Items folder.

Alternatively, you can first create a draft forward message to include a comment or update any message properties, and then send the draft message.

Note

  • You can specify either a comment or the body property of the message parameter. Specifying both will return an HTTP 400 Bad Request error.
  • You must specify either the toRecipients parameter or the toRecipients property of the message parameter. Specifying both or specifying neither will return an HTTP 400 Bad Request error.

Prerequisites

One of the following scopes is required to execute this API: Mail.Send

HTTP request

POST /me/messages/{id}/forward
POST /users/{id | userPrincipalName}/messages/{id}/forward
POST /me/mailFolders/{id}/messages/{id}/forward
POST /users/{id | userPrincipalName}/mailFolders/{id}/messages/{id}/forward

Request headers

Name Type Description
Authorization string Bearer {token}. Required.
Content-Type string Nature of the data in the body of an entity. Required.

Request body

In the request body, provide a JSON object with the following parameters.

Parameter Type Description
comment String A comment to include. Can be an empty string.
toRecipients recipient collection The list of recipients.
message message Any writeable properties to update in the reply message.

Response

If successful, this method returns 202, Accepted response code. It does not return anything in the response body.

Example

The following example sets the isDeliveryReceiptRequested property to true, adds a comment and forwards the message.

Request

Here is an example of the request.

POST https://graph.microsoft.com/beta/me/messages/AAMkADA1MTAAAH5JaLAAA=/forward
Content-Type: application/json

{
  "message":{  
    "isDeliveryReceiptRequested": true,
    "toRecipients":[
      {
        "emailAddress": {
          "address":"danas@contoso.onmicrosoft.com",
          "name":"Dana Swope"
        }
      }
     ]
  },
  "comment": "Dana, just want to make sure you get this." 
}
Response

Here is an example of the response.

HTTP/1.1 202 Accepted