Stay organized with collections Save and categorize content based on your preferences.
Drafts represent unsent messages with the DRAFT
system label applied. The message contained within the draft cannot be edited once created, but it can be replaced. In this sense, the draft resource is simply a container that provides a stable ID because the underlying message IDs change every time the message is replaced.
Message resources inside a draft have similar behavior to other messages except for the following differences:
DRAFT
system label.SENT
system label. This message is returned in the drafts.send
response.Your application can create drafts using the drafts.create method. The general process is to:
drafts.message.raw
field to the encoded string.The following code examples demonstrate the process.
Updating draftsSimilarly to creating a draft, to update a draft you must supply a Draft
resource in the body of your request with the draft.message.raw
field set to a base64url encoded string containing the MIME message. Because messages cannot be updated, the message contained in the draft is destroyed and replaced by the new MIME message supplied in the update request.
You can retrieve the current MIME message contained in the draft by calling drafts.get
with the parameter format=raw
.
For more information, see drafts.update
.
When sending a draft, you can choose to send the message as-is or as with an updated message. If you are updating the draft content with a new message, supply a Draft
resource in the body of the drafts.send
request; set the draft.id
of the draft to be sent; and set the draft.message.raw
field to the new MIME message encoded as a base64url encoded string. For more information, see drafts.send
.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-04 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-04 UTC."],[],[]]
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4