v1

latestOpenAPI 3.0.0Creative Commons Attribution 3.02026-07-137956179.1 KB
users

Imports a message into only this user's mailbox, with standard email delivery scanning and classification similar to receiving via SMTP. This method doesn't perform SPF checks, so it might not work for some spam messages, such as those attempting to perform domain spoofing. This method does not send a message. Note that the maximum size of the message is 150 MB.

post/gmail/v1/users/{userId}/messages/import

Path parameters

userIdstring required

The user's email address. The special value me can be used to indicate the authenticated user.

Query parameters

deletedboolean

Mark the email as permanently deleted (not TRASH) and only visible in Google Vault to a Vault administrator. Only used for Google Workspace accounts.

internalDateSource'receivedTime' | 'dateHeader'

Source for Gmail's internal date of the message.

neverMarkSpamboolean

Ignore the Gmail spam classifier decision and never mark this email as SPAM in the mailbox.

processForCalendarboolean

Process calendar invites in the email and add any extracted meetings to the Google Calendar for this user.

Response

Successful response