Skip to Content
The Makinari API repo now includes an MCP Server — connect your AI models directly. View on GitHub →
MCP ServerToolsSend EmailPOST

Send Email

Send an email to a recipient. Required: email (recipient), subject, message. Optional: from, lead_id, conversation_id, agent_id, placeholder_policy.

Merge fields (with lead_id): {{lead.name}}, {{lead.first_name}}, {{lead.email}}, {{lead.phone}}, {{lead.position}}, {{lead.company}}, {{lead.notes}}, {{lead.metadata.<path>}}, {{site.name}}. Use double braces only; aliases like {{lead.correo}} are normalized. Unknown tokens: strip_tokens (default) removes them; skip_recipient aborts the send if unresolved tokens remain.

Input Schema

ParameterTypeDescription
emailstringRecipient email address
subjectstringEmail subject (may include merge fields if lead_id is set)
messagestringEmail body (HTML or plain text)
fromstringSender display name
lead_idstringLead UUID for tracking and merge fields
conversation_idstringConversation UUID for tracking
agent_idstringAgent UUID for tracking
placeholder_policystringstrip_tokens or skip_recipient when using merge fields

REST Endpoint

POST /api/agents/tools/sendEmail

The site_id field is required when calling via REST.

POST /api/agents/tools/sendEmail Authorization: Bearer YOUR_API_KEY Content-Type: application/json { "site_id": "YOUR_SITE_ID", "email": "recipient@example.com", "subject": "Hello from Makinari", "message": "<p>Hi there!</p>", "from": "Sales Team", "lead_id": "LEAD_UUID" }

Response:

{ "success": true, "status": "sent", "envelope_id": "...", "email_id": "..." }
Last updated on