Reply to an email
Pass the email you’re answering asreply_to_message_id: its Message-ID (from its headers), or its email_… id.
Response 201
So the reply shows in the same conversation in Gmail and other email clients, for the user and the recipients.
reply_to_message_id must name an email of the same account that the engine has synced. Emails that arrived before the account connected aren’t synced (unless you used initial sync), so they can’t be answered this way. An unknown reply_to_message_id gets 400 errors/invalid_parameters.reply_to: that field sets the Reply-To header of the email you send.
To reply to everyone, pass the recipients yourself, for example the original from_attendee plus its to_attendees and cc_attendees, minus the user’s own address. Write them as { "email", "display_name" } (an attendee’s identifier is the email).
Find the email a reply answers
Every email has itsheaders. The answered email’s Message-ID is in In-Reply-To:
Message-ID header matches. An email that answers nothing has no In-Reply-To header.
Forward
There’s no forward call. Send a new email with the original’s content and files: put itsbody in html, download the attachments with the attachment endpoint and attach them again. See Forward attachments.
Threads
Every email has athread_id:
Get the whole conversation of an email, oldest first:
thread_id (URL-encoded):
Thread, with Sent copies included and drafts left out: