Skip to the documentation
API

Suggest replies to a thread

The short replies the reading pane offers under the latest message.

GET/threads/{id}/reply-suggestions

Runs the real call on your workspace.

GET /threads/{id}/reply-suggestions

The short replies the reading pane offers under the latest message.

Example

Needs threads:read. state is ready with up to three suggestions, pending while they are being written, or none when the latest message needs no reply. Each suggestion has a label, a few words for a button, and a body, the reply itself in plain text, and messageId names the message they answer.

curl
curl "$OE/threads/thr_7c1e4a90/reply-suggestions" -H "$AUTH"
Response
{  "object": "reply_suggestions",  "threadId": "thr_7c1e4a90",  "messageId": "msg_51d0be2c",  "state": "ready",  "suggestions": [    { "label": "Invoice coming Friday", "body": "Hi Ada, thanks for signing. I will send the invoice by Friday." },    { "label": "Could it be Monday?", "body": "Hi Ada, thanks for signing. Would Monday work for the invoice instead?" },    { "label": "Where should it go?", "body": "Hi Ada, thanks for signing. Which address should the invoice go to?" }  ]}

Suggestions are written once for each new message and kept, so asking again costs nothing until another message arrives. Writing them spends no AI action.

They are written in the language of the latest message and in the voice of the mail the workspace sends, from the conversation, the earlier mail with that correspondent, what is known about their organisation and the busy times of the calendar.

A thread your own reply ended has none, and so do newsletters, automated notices, mail from a no-reply address, spam and encrypted messages. A pending answer means they are being written, so ask again a few seconds later.

Reference