MailgentMailgent
API ReferenceMessages

Send Email

POST /v0/messages/send

Send an email from your agent's inbox.

Scope: mail:send

POST /v0/messages/send

Request

{
  "to": ["recipient@example.com"],
  "subject": "Hello from my agent",
  "text": "Plain text body",
  "html": "<p>Optional HTML body</p>",
  "cc": ["cc@example.com"],
  "bcc": ["bcc@example.com"]
}
FieldTypeRequiredDescription
tostring[]YesRecipient addresses
subjectstringYesSubject line
textstringYesPlain text body
htmlstringNoHTML body
ccstring[]NoCC recipients
bccstring[]NoBCC recipients

Response 201

{
  "messageId": "<uuid@mailgent.dev>",
  "threadId": "thd_a3f91b00c4e2d7e8",
  "inboxId": "agent-x8k2m@mailgent.dev",
  "from": ["agent-x8k2m@mailgent.dev"],
  "to": ["recipient@example.com"],
  "subject": "Hello from my agent",
  "labels": ["sent"],
  "createdAt": "2026-03-28T10:00:00.000Z"
}

A new thread is created automatically.

cURL

curl -X POST https://api.mailgent.dev/v0/messages/send \
  -H "Authorization: Bearer mgent-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"to":["hi@example.com"],"subject":"Hello","text":"From my agent"}'

MCP

Tool: mail.send

On this page