---
title: "Changes to Add file attachment"
method: POST
path: "/me/messages/{messageId}/attachments"
---

# Changes to Add file attachment

`POST /me/messages/{messageId}/attachments`

> Every recorded change to this endpoint, newest first.

## Timeline

Changed in 4 of 10 revisions.

- **2026-07-17** `af62694b9f2d` — 2 info
- **2026-05-27** `354d90657cdd` — 1 info
- **2026-05-26** `5c775c50414c` — 18 info
- **2026-05-26** `c6fc1d98f528` — 2 warning, 19 info

## Changes

- **2026-07-17** `af62694b9f2d` — 2 info
  - added the new optional request property `allOf[subschema #2: attachment]/contentBytes`
  - added the optional property `allOf[subschema #2: attachment]/contentBytes` to the response with the `2XX` status
- **2026-05-27** `354d90657cdd` — 1 info
  - api operation id `me.messages.CreateAttachments` removed and replaced with `addAttachment`
- **2026-05-26** `5c775c50414c` — 18 info
  - mapped value for discriminator key `#microsoft.graph.attachment` changed from `#/components/schemas/microsoft.graph.attachment` to `#/components/schemas/MicrosoftGraphAttachment` for `allOf[subschema #1: entity]/` request property
  - mapped value for discriminator key `#microsoft.graph.fileAttachment` changed from `#/components/schemas/microsoft.graph.fileAttachment` to `#/components/schemas/MicrosoftGraphAttachment` for `allOf[subschema #1: entity]/` request property
  - mapped value for discriminator key `#microsoft.graph.fileAttachment` changed from `#/components/schemas/microsoft.graph.fileAttachment` to `#/components/schemas/MicrosoftGraphAttachment` for `allOf[subschema #2: attachment]/` request property
  - mapped value for discriminator key `#microsoft.graph.itemAttachment` changed from `#/components/schemas/microsoft.graph.attachment` to `#/components/schemas/MicrosoftGraphAttachment` for `allOf[subschema #2: attachment]/` request property
  - mapped value for discriminator key `#microsoft.graph.mailFolder` changed from `#/components/schemas/microsoft.graph.mailFolder` to `#/components/schemas/MicrosoftGraphMailFolder` for `allOf[subschema #1: entity]/` request property
  - mapped value for discriminator key `#microsoft.graph.mailSearchFolder` changed from `#/components/schemas/microsoft.graph.mailSearchFolder` to `#/components/schemas/MicrosoftGraphMailFolder` for `allOf[subschema #1: entity]/` request property
  - mapped value for discriminator key `#microsoft.graph.message` changed from `#/components/schemas/microsoft.graph.message` to `#/components/schemas/MicrosoftGraphMessage` for `allOf[subschema #1: entity]/` request property
  - mapped value for discriminator key `#microsoft.graph.outlookItem` changed from `#/components/schemas/microsoft.graph.outlookItem` to `#/components/schemas/MicrosoftGraphOutlookItem` for `allOf[subschema #1: entity]/` request property
  - mapped value for discriminator key `#microsoft.graph.referenceAttachment` changed from `#/components/schemas/microsoft.graph.attachment` to `#/components/schemas/MicrosoftGraphAttachment` for `allOf[subschema #2: attachment]/` request property
  - mapped value for discriminator key `#microsoft.graph.attachment` changed from `#/components/schemas/microsoft.graph.attachment` to `#/components/schemas/MicrosoftGraphAttachment` for `allOf[subschema #1: entity]/` response property for the response status `2XX`
  - mapped value for discriminator key `#microsoft.graph.fileAttachment` changed from `#/components/schemas/microsoft.graph.fileAttachment` to `#/components/schemas/MicrosoftGraphAttachment` for `allOf[subschema #1: entity]/` response property for the response status `2XX`
  - mapped value for discriminator key `#microsoft.graph.fileAttachment` changed from `#/components/schemas/microsoft.graph.fileAttachment` to `#/components/schemas/MicrosoftGraphAttachment` for `allOf[subschema #2: attachment]/` response property for the response status `2XX`
  - mapped value for discriminator key `#microsoft.graph.itemAttachment` changed from `#/components/schemas/microsoft.graph.attachment` to `#/components/schemas/MicrosoftGraphAttachment` for `allOf[subschema #2: attachment]/` response property for the response status `2XX`
  - mapped value for discriminator key `#microsoft.graph.mailFolder` changed from `#/components/schemas/microsoft.graph.mailFolder` to `#/components/schemas/MicrosoftGraphMailFolder` for `allOf[subschema #1: entity]/` response property for the response status `2XX`
  - mapped value for discriminator key `#microsoft.graph.mailSearchFolder` changed from `#/components/schemas/microsoft.graph.mailSearchFolder` to `#/components/schemas/MicrosoftGraphMailFolder` for `allOf[subschema #1: entity]/` response property for the response status `2XX`
  - mapped value for discriminator key `#microsoft.graph.message` changed from `#/components/schemas/microsoft.graph.message` to `#/components/schemas/MicrosoftGraphMessage` for `allOf[subschema #1: entity]/` response property for the response status `2XX`
  - mapped value for discriminator key `#microsoft.graph.outlookItem` changed from `#/components/schemas/microsoft.graph.outlookItem` to `#/components/schemas/MicrosoftGraphOutlookItem` for `allOf[subschema #1: entity]/` response property for the response status `2XX`
  - mapped value for discriminator key `#microsoft.graph.referenceAttachment` changed from `#/components/schemas/microsoft.graph.attachment` to `#/components/schemas/MicrosoftGraphAttachment` for `allOf[subschema #2: attachment]/` response property for the response status `2XX`
- **2026-05-26** `c6fc1d98f528` — 2 warning, 19 info
  - removed the request property `allOf[subschema #2: attachment]/contentBytes`
  - removed the optional property `allOf[subschema #2: attachment]/contentBytes` from the response with the `2XX` status
  - api operation id `addAttachment` removed and replaced with `me.messages.CreateAttachments`
  - mapped value for discriminator key `#microsoft.graph.attachment` changed from `#/components/schemas/MicrosoftGraphAttachment` to `#/components/schemas/microsoft.graph.attachment` for `allOf[subschema #1: entity]/` request property
  - mapped value for discriminator key `#microsoft.graph.fileAttachment` changed from `#/components/schemas/MicrosoftGraphAttachment` to `#/components/schemas/microsoft.graph.fileAttachment` for `allOf[subschema #1: entity]/` request property
  - mapped value for discriminator key `#microsoft.graph.fileAttachment` changed from `#/components/schemas/MicrosoftGraphAttachment` to `#/components/schemas/microsoft.graph.fileAttachment` for `allOf[subschema #2: attachment]/` request property
  - mapped value for discriminator key `#microsoft.graph.itemAttachment` changed from `#/components/schemas/MicrosoftGraphAttachment` to `#/components/schemas/microsoft.graph.attachment` for `allOf[subschema #2: attachment]/` request property
  - mapped value for discriminator key `#microsoft.graph.mailFolder` changed from `#/components/schemas/MicrosoftGraphMailFolder` to `#/components/schemas/microsoft.graph.mailFolder` for `allOf[subschema #1: entity]/` request property
  - mapped value for discriminator key `#microsoft.graph.mailSearchFolder` changed from `#/components/schemas/MicrosoftGraphMailFolder` to `#/components/schemas/microsoft.graph.mailSearchFolder` for `allOf[subschema #1: entity]/` request property
  - mapped value for discriminator key `#microsoft.graph.message` changed from `#/components/schemas/MicrosoftGraphMessage` to `#/components/schemas/microsoft.graph.message` for `allOf[subschema #1: entity]/` request property
  - mapped value for discriminator key `#microsoft.graph.outlookItem` changed from `#/components/schemas/MicrosoftGraphOutlookItem` to `#/components/schemas/microsoft.graph.outlookItem` for `allOf[subschema #1: entity]/` request property
  - mapped value for discriminator key `#microsoft.graph.referenceAttachment` changed from `#/components/schemas/MicrosoftGraphAttachment` to `#/components/schemas/microsoft.graph.attachment` for `allOf[subschema #2: attachment]/` request property
  - mapped value for discriminator key `#microsoft.graph.attachment` changed from `#/components/schemas/MicrosoftGraphAttachment` to `#/components/schemas/microsoft.graph.attachment` for `allOf[subschema #1: entity]/` response property for the response status `2XX`
  - mapped value for discriminator key `#microsoft.graph.fileAttachment` changed from `#/components/schemas/MicrosoftGraphAttachment` to `#/components/schemas/microsoft.graph.fileAttachment` for `allOf[subschema #1: entity]/` response property for the response status `2XX`
  - mapped value for discriminator key `#microsoft.graph.fileAttachment` changed from `#/components/schemas/MicrosoftGraphAttachment` to `#/components/schemas/microsoft.graph.fileAttachment` for `allOf[subschema #2: attachment]/` response property for the response status `2XX`
  - mapped value for discriminator key `#microsoft.graph.itemAttachment` changed from `#/components/schemas/MicrosoftGraphAttachment` to `#/components/schemas/microsoft.graph.attachment` for `allOf[subschema #2: attachment]/` response property for the response status `2XX`
  - mapped value for discriminator key `#microsoft.graph.mailFolder` changed from `#/components/schemas/MicrosoftGraphMailFolder` to `#/components/schemas/microsoft.graph.mailFolder` for `allOf[subschema #1: entity]/` response property for the response status `2XX`
  - mapped value for discriminator key `#microsoft.graph.mailSearchFolder` changed from `#/components/schemas/MicrosoftGraphMailFolder` to `#/components/schemas/microsoft.graph.mailSearchFolder` for `allOf[subschema #1: entity]/` response property for the response status `2XX`
  - mapped value for discriminator key `#microsoft.graph.message` changed from `#/components/schemas/MicrosoftGraphMessage` to `#/components/schemas/microsoft.graph.message` for `allOf[subschema #1: entity]/` response property for the response status `2XX`
  - mapped value for discriminator key `#microsoft.graph.outlookItem` changed from `#/components/schemas/MicrosoftGraphOutlookItem` to `#/components/schemas/microsoft.graph.outlookItem` for `allOf[subschema #1: entity]/` response property for the response status `2XX`
  - mapped value for discriminator key `#microsoft.graph.referenceAttachment` changed from `#/components/schemas/MicrosoftGraphAttachment` to `#/components/schemas/microsoft.graph.attachment` for `allOf[subschema #2: attachment]/` response property for the response status `2XX`

---

[Operation](https://skmtc.dev/ballerina-platform/apis/microsoft-graph-mail-api/docs/me/messages/:messageId/attachments/post.md) · [API](https://skmtc.dev/ballerina-platform/apis/microsoft-graph-mail-api.md) · [Page](https://skmtc.dev/ballerina-platform/apis/microsoft-graph-mail-api/changes/me/messages/:messageId/attachments/post)
