Update a Gmail draft
Input
draftId requiredThe draft's current id, as returned by the drafts listing: a new message or a reply saved inside a conversation. Note Gmail replaces this id on every save, so use a freshly listed one.
body optionalReplacement body text. This replaces the whole body rather than adding to it; for a reply, the quoted message below the body stays as it is. Pass an empty string to clear it. Omit to leave the body as it is.
account optionalGoogle account email whose draft this is. Without it Gmail opens the first signed-in account (u/0), which may not be the one holding the draft when several accounts share the browser.
subject optionalReplacement subject line. Pass an empty string to clear it. Omit to leave the subject as it is. A reply's subject follows its conversation and cannot be changed: a different subject for a reply is refused and nothing is written.
Output
after requiredWhat the draft said after the edit, read back from the composer. For a reply, the body is the text above the quoted message.
before requiredWhat the draft said before the edit. For a reply the subject is the one it carries from its conversation, and the body is the text above the quoted message.
changed requiredWhich fields were actually written. Empty when nothing needed changing.
draftId requiredThe draft's id AFTER the edit. Gmail mints a new one on every save, so this differs from the id passed in whenever something was written. Use this for follow-up calls.
account_used requiredThe Gmail account the draft was edited in, read from the session rather than assumed.
already_present requiredTrue when the draft already said exactly what was asked for, so nothing was written.
verified_on_page requiredTrue when Gmail confirmed the edit was saved: its answer to the save, or the Drafts list, shows the draft with the new subject and body under its new id.
isReply optionalTrue when the draft is a reply saved inside a conversation, false for a new message.
threadId optionalId of the conversation holding the draft. Unlike the draft id this survives a save, which makes it the durable handle for the same draft over time.
verifiedBy optionalHow the save was confirmed, when something was written: 'server' is Gmail's own answer to the save, which echoes the saved draft; 'drafts_list' is the draft found in the Drafts list under a new id with the new content, used when another Gmail tab in the browser saved it.
previousDraftId optionalThe id that was passed in, which Gmail has now retired.
