API ReferenceMessages
Reply to Email
POST /v0/messages/:messageId/reply
Reply to an existing email. The reply is automatically threaded.
Scope: mail:send
POST /v0/messages/{messageId}/replyRequest
{
"text": "Thanks for your question! Here's the answer...",
"html": "<p>Optional HTML reply</p>"
}| Field | Type | Required | Description |
|---|---|---|---|
text | string | Yes | Plain text reply |
html | string | No | HTML reply |
Response 201
{
"messageId": "<new-uuid@mailgent.dev>",
"threadId": "thd_f8e2a1c4d7b90e3f",
"subject": "Re: Question about pricing",
"labels": ["sent"],
"createdAt": "2026-03-28T14:30:00.000Z"
}Threading
- Subject prefixed with
Re:automatically In-Reply-Toheader set to the original messageIdReferencesheader includes full chain- Same
threadIdas the original
cURL
curl -X POST https://api.mailgent.dev/v0/messages/%3Cmsg-id%40gmail.com%3E/reply \
-H "Authorization: Bearer mgent-your-api-key" \
-H "Content-Type: application/json" \
-d '{"text":"Thanks! Here is the info you requested."}'MCP
Tool: mail.reply