Reply or forward
/messages/{id}/replyStarts a reply, a reply to all or a forward, as a draft. Send it with Send a draft, as you would any other.
Needs the permissionmessages:reply
Use it rather than Create a draft for anything that answers a message. It picks the mailbox to answer from and the recipients (a reply to all leaves out your own addresses and repeats), writes one Re: however many the sender stacked up, Greek’s Απ: included, and sets In-Reply-To and References so it threads in the recipient’s mail. It quotes the original and stays in the same conversation; a forward starts a new one.
With no bodyHtml you get the quote and the signature, ready to write into. With one, your text goes above the quote.
A conversation given to the key’s owner by a mention or an assignment, without its mailbox, has to be answered from one of their own mailboxes: pass fromMailboxId. The reply then starts a conversation there, still threaded for the recipient.
Path parameters
idstringrequired- The message to answer or forward.
Body
modestringoptionalreply(the default),reply-allorforward.bodyHtmlstringoptional- Your text, which goes above the quote.
tolist of stringsoptional- With
ccandbcc: recipients to use instead of the ones worked out. A forward has none until you give them. fromMailboxIdstringoptional- Another mailbox of the key’s owner to reply from.
Returns
The draft:
idstring- The draft. Send it with Send a draft.
threadIdstring- The conversation it’s in. A forward’s is a new one.
mailboxIdstring- The mailbox it will go from, and
from, its address. tolist of strings- With
ccandbcc: its recipients. subjectstring- With one
Re:orFwd:. bodyHtmlstring- Your text, the signature and the quoted original.
inReplyTostring or null- The Message-ID it answers. Null for a forward.
updatedAtstring- When the draft last changed.
Errors
400unknown_modemodeisn’treply,reply-allorforward.400reply_failed- The draft couldn’t be started. The message says why.
401invalid_key- The key is wrong, expired or revoked. With no Authorization header at all, the code is
missing_credentials. 403missing_scope- The key doesn’t have
messages:reply. TheX-Required-Scopeheader names what’s missing. 403not_your_mailbox- The conversation was given to the key’s owner without its mailbox. Pass
fromMailboxId. 404not_found- There’s no such message, or the key’s owner can’t see it.
404unknown_mailboxfromMailboxIdisn’t a mailbox the key can send from.429rate_limited- More than 120 requests a minute from this key. Wait for
Retry-Afterseconds.