v1

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

Updates vacation responder settings. For more information, see Manage vacation settings with the Gmail API.

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

Path parameters

userIdstring required

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

Request body

responseSubjectstring

Optional text to prepend to the subject line in vacation responses. In order to enable auto-replies, either the response subject or the response body must be nonempty.

restrictToDomainboolean

Flag that determines whether responses are sent to recipients who are outside of the user's domain. This feature is only available for Google Workspace users.

enableAutoReplyboolean

Flag that controls whether Gmail automatically replies to messages.

responseBodyHtmlstring

Response body in HTML format. Gmail will sanitize the HTML before storing it. If both response_body_plain_text and response_body_html are specified, response_body_html will be used.

restrictToContactsboolean

Flag that determines whether responses are sent to recipients who are not in the user's list of contacts.

startTimestring int64

An optional start time for sending auto-replies (epoch ms). When this is specified, Gmail will automatically reply only to messages that it receives after the start time. If both startTime and endTime are specified, startTime must precede endTime.

endTimestring int64

An optional end time for sending auto-replies (epoch ms). When this is specified, Gmail will automatically reply only to messages that it receives before the end time. If both startTime and endTime are specified, startTime must precede endTime.

responseBodyPlainTextstring

Response body in plain text format. If both response_body_plain_text and response_body_html are specified, response_body_html will be used.

Response

Successful response