v1

latestOpenAPI 3.0.42026-07-174835104.5 KB
me.message

Add file attachment

Use this API to add a file attachment to a message. An attachment can be one of the following types: fileAttachment, itemAttachment, or referenceAttachment. All these types of attachment resources are derived from the attachment resource. For file attachments smaller than 3 MB, use this endpoint. For larger files, use the createUploadSession endpoint.

post/me/messages/{messageId}/attachments

Request body

@odata.typestring
idstring

The unique identifier for an entity. Read-only

lastModifiedDateTimestring date-time nullable

The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z

sizenumber

The length of the attachment in bytes

namestring nullable

The attachment's file name

isInlineboolean

true if the attachment is an inline attachment; otherwise, false

contentTypestring nullable

The MIME type

contentBytesstring base64url nullable

The base64-encoded contents of the file attachment. Required only for file attachments

Response

Created attachment

@odata.typestring
idstring

The unique identifier for an entity. Read-only

lastModifiedDateTimestring date-time nullable

The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z

sizenumber

The length of the attachment in bytes

namestring nullable

The attachment's file name

isInlineboolean

true if the attachment is an inline attachment; otherwise, false

contentTypestring nullable

The MIME type

contentBytesstring base64url nullable

The base64-encoded contents of the file attachment. Required only for file attachments