Skip to Content

The message store: list and read messages (metadata, parsed content, raw MIME, parts), update and delete them one by one or in batches, append, compose and…

The message store: list and read messages (metadata, parsed content, raw MIME, parts), update and delete them one by one or in batches, append, compose and copy them, restore them, train the spam filter, follow the changes feed, and send.

Its 27 methods, each a page of its own, in the order the API reference presents them:

MethodWhat it doesIt calls
messages.listList mailbox messagesGET /mailboxes/{mailboxId}/messages
messages.getGet message metadataGET /mailboxes/{mailboxId}/messages/{messageId}
messages.getManyBatch get message metadataPOST /mailboxes/{mailboxId}/messages/batch
messages.getContentGet parsed message content and attachmentsGET /mailboxes/{mailboxId}/messages/{messageId}/content
messages.getRawGet raw MIME message bodyGET /mailboxes/{mailboxId}/messages/{messageId}/raw
messages.getPartGet specific message MIME partGET /mailboxes/{mailboxId}/messages/{messageId}/parts/{section}
messages.getRawHeadersBatch get raw header blocksPOST /mailboxes/{mailboxId}/messages/heads
messages.getMimeStructuresBatch get cached MIME structuresPOST /mailboxes/{mailboxId}/messages/mime
messages.updateUpdate message flags and labelsPATCH /mailboxes/{mailboxId}/messages/{messageId}
messages.updateManyUpdate flags and labels for multiple messages or whole conversationsPATCH /mailboxes/{mailboxId}/messages
messages.deleteDelete a messageDELETE /mailboxes/{mailboxId}/messages/{messageId}
messages.deleteManyEmpty trash, or delete a batch of messages or whole conversationsDELETE /mailboxes/{mailboxId}/messages
messages.appendAppend raw MIME message to mailboxPOST /mailboxes/{mailboxId}/messages
messages.composeSave structured message to mailboxPOST /mailboxes/{mailboxId}/messages/compose
messages.copyCopy or move messages and conversations into another mailboxPOST /mailboxes/{mailboxId}/messages/copy
messages.restoreRestore an expunged message from trashPOST /mailboxes/{mailboxId}/messages/{messageId}/restore
messages.restoreManyRestore multiple messages from trashPOST /mailboxes/{mailboxId}/messages/restore
messages.untrashTake messages out of Trash, back to where they were filedPOST /mailboxes/{mailboxId}/messages/untrash
messages.unjunkTake messages out of Junk, back to where they were filedPOST /mailboxes/{mailboxId}/messages/unjunk
messages.learnTrain spam filter from a messagePOST /mailboxes/{mailboxId}/messages/{messageId}/learn
messages.learnManyTrain spam filter from multiple messagesPOST /mailboxes/{mailboxId}/messages/learn
messages.listKeywordsList the keywords in use, with countsGET /mailboxes/{mailboxId}/keywords
messages.getChangesGet message sync changesGET /mailboxes/{mailboxId}/messages/changes
messages.sendSend an email messagePOST /mailboxes/{mailboxId}/send
messages.sendDraftSend a stored draftPOST /mailboxes/{mailboxId}/messages/{messageId}/submit
messages.getDeliveryGet delivery status of a sent messageGET /mailboxes/{mailboxId}/messages/{messageId}/delivery
messages.getInvitationGet invitation from email messageGET /mailboxes/{mailboxId}/messages/{messageId}/invitation

In the API reference: Messages, Delivery, PIM.