MailAttachmentAdd

Summary

  • Adds a small file attachment to an existing message (draft or sent).

Graph Endpoint

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

Parameters

Required

  • messageId: string — Alias: id

  • One of:

    • attachmentIds: number[] — Up to 10 repository attachment IDs; backend fetches file data and uploads it.

    • name: string and contentBytesBase64: string — Direct upload of a single file (alias: contentBase64).

Optional

  • contentType: string — Default application/octet-stream

Usage (app.businessFunction)

Single file (base64)

Response

Notes

  • Backend uploads via upload sessions (robust for any size). Limit: max 10 attachments per call when using attachmentIds.

  • For external clients without repository attachments, use the base64 single-file option or MailAttachmentUploadLarge.

See also

Last updated

Was this helpful?