Skip to main content

Reply to an email

Pass the email you’re answering as reply_to_message_id: its Message-ID (from its headers), or its email_… id.
Response 201
The engine fills in the rest: 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.
Don’t confuse it with 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 its headers. The answered email’s Message-ID is in In-Reply-To:
To get the answered email itself, take its thread and find the email whose 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 its body in html, download the attachments with the attachment endpoint and attach them again. See Forward attachments.

Threads

Every email has a thread_id: Get the whole conversation of an email, oldest first:
Or by its thread_id (URL-encoded):
The response is a Thread, with Sent copies included and drafts left out: