/gmail/v1/users/{userId}/drafts
GET
/gmail/v1/users/{userId}/draftsLists the drafts in the user's mailbox.
Request
The user's email address. The special value me
can be used to indicate the authenticated user.
Include drafts from SPAM
and TRASH
in the results.
Maximum number of drafts to return. This field defaults to 100. The maximum allowed value for this field is 500.
Page token to retrieve a specific page of results in the list.
Only return draft messages matching the specified query. Supports the same query format as the Gmail search box. For example, "from:someuser@example.com rfc822msgid: is:unread"
.
Request samples
Responses
List of drafts. Note that the Message
property in each Draft
resource only contains an id
and a threadId
. The messages.get method can fetch additional message details.
The immutable ID of the draft.
The message content of the draft.
Token to retrieve the next page of results in the list.
Estimated total number of results.
{
"drafts": [
{
"id": "string",
"message": {
"historyId": "string",
"id": "string",
"internalDate": "string",
"labelIds": [
"string"
],
"payload": {
"body": {
"attachmentId": "string",
"data": "string",
"size": 0
},
"filename": "string",
"headers": [
{
"name": "string",
"value": "string"
}
],
"mimeType": "string",
"partId": "string",
"parts": [
{}
]
},
"raw": "string",
"sizeEstimate": 0,
"snippet": "string",
"threadId": "string"
}
}
],
"nextPageToken": "string",
"resultSizeEstimate": 0
}