v1

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

Updates IMAP settings. For more information, see Configure POP and IMAP settings with the Gmail API.

put/gmail/v1/users/{userId}/settings/imap

Path parameters

userIdstring required

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

Request body

enabledboolean

Whether IMAP is enabled for the account.

expungeBehavior'expungeBehaviorUnspecified' | 'archive' | 'trash' | 'deleteForever'

The action that will be executed on a message when it is marked as deleted and expunged from the last visible IMAP folder.

autoExpungeboolean

If this value is true, Gmail will immediately expunge a message when it is marked as deleted in IMAP. Otherwise, Gmail will wait for an update from the client before expunging messages marked as deleted.

maxFolderSizeinteger

An optional limit on the number of messages that an IMAP folder may contain. Legal values are 0, 1000, 2000, 5000 or 10000. A value of zero is interpreted to mean that there is no limit.

Response

Successful response