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:idOne of:
attachmentIds: number[]— Up to 10 repository attachment IDs; backend fetches file data and uploads it.name: stringandcontentBytesBase64: string— Direct upload of a single file (alias:contentBase64).
Optional
contentType: string— Defaultapplication/octet-stream
Usage (app.businessFunction)
Using repository attachments (recommended)
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
MailSend — send a new message with
attachmentIdsin one callMailReply — reply and attach repository files
MailReplyAll — reply-all with attachments
MailForward — forward with attachments
Last updated
Was this helpful?