Send an email message
Sends an email through the authenticated user's connected mailbox (Gmail or Outlook). The mailbox is resolved by matching the from address against the user's connected accounts - the user must have previously completed the OAuth flow for that address. Supports plain-text or HTML bodies, CC/BCC, threading (replies), and attachments stored in R2.
Authorization
bearerAuth In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Payload to send an email through a connected mailbox. The server resolves which mailbox to send from by matching from (and optionally provider) against the authenticated user's connected email accounts.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/email/messages/send" \ -H "Content-Type: application/json" \ -d '{ "from": "ops@acme.example", "to": [ "jamie.lee@example.com" ], "subject": "Weekly report", "body": "Hi Jamie - attaching this week\'s report.", "isHtml": false }'{ "message": { "_id": "665f1a0c0e0a4b001a2c9f60", "channelType": "email", "status": "delivered", "body": "Hi Jamie - attaching this week's report." }, "conversationId": "665f1a0c0e0a4b001a2c9f70", "threadId": "gthread-1902a9f3c4b1e0d5"}