Omnichannel Email API
Dispatch branded emails via company SMTP, resolve contact details dynamically, and maintain unified CRM message history alongside WhatsApp.
Dynamic SMTP
Per-workspace runtime transport with complete password redaction.
Smart Resolution
Send by email, contact_id, or phone with auto-resolved recipient data.
Unified CRM Log
Logged directly in messages table under channel = 'email'.
Authentication & Base URL
All Email API endpoints require authentication using a Bearer token in the Authorization header, or a token query parameter.
curl -X GET https://app.wacm.in/api/v1/email/settings \
-H 'Authorization: Bearer YOUR_SANCTUM_TOKEN' \
-H 'Accept: application/json'/api/v1/email/settings
Check SMTP configuration status for your workspace. Returns driver, host, port, encryption, and sender details without exposing passwords.
Response Example (Configured)
{
"status": "success",
"data": {
"is_configured": true,
"driver": "smtp",
"host": "smtp.mailgun.org",
"port": 587,
"encryption": "tls",
"from_address": "support@example.com",
"from_name": "Support Team",
"username": "postmaster@example.com"
}
}/api/v1/email/templates
Retrieve pre-configured email templates available in the workspace for outbound dispatch.
Response Example
{
"status": "success",
"data": [
{
"id": 1,
"title": "Welcome Onboarding",
"subject": "Welcome to our platform!",
"body": "Hello {{name}}, welcome aboard!",
"created_at": "2026-10-10T12:00:00Z"
}
]
}/api/v1/email/send
Dispatches an email via the workspace's dynamic SMTP transport and logs it to the unified CRM conversation timeline.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| string | Optional | Direct recipient email address. (Required if contact_id or phone not provided). | |
| contact_id | integer | Optional | Contact ID. Resolves email address automatically and links message history. |
| phone | string | Optional | International phone number. Resolves existing contact and email automatically. |
| subject | string | Required | Subject line of the outbound email. |
| message | string | Required | Body content of the email (HTML or Markdown supported). |
| template_id | integer | Optional | Pre-configured email template ID to apply. |
Request Example
{
"contact_id": 42,
"subject": "Your Order Confirmation #8921",
"message": "<p>Thank you for your purchase! Your package is on the way.</p>"
}Response Example
{
"status": "success",
"message": "Email sent successfully",
"data": {
"recipient_email": "jane@example.com",
"contact_id": 42,
"subject": "Your Order Confirmation #8921",
"message_id": 1502
}
}/api/v1/email/messages
Paginated list of unified CRM email messages sent through WACM.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| page | integer | Optional | Page number for pagination (default: 1). |
| limit | integer | Optional | Items per page (default: 25, max: 100). |
| contact_id | integer | Optional | Filter emails by associated contact ID. |
| search | string | Optional | Filter emails by subject or body text. |
Response Example
{
"status": "success",
"data": [
{
"id": 1502,
"contact_id": 42,
"channel": "email",
"value": "Your Order Confirmation #8921",
"status": "delivered",
"created_at": "2026-10-12T00:30:00Z"
}
],
"pagination": {
"current_page": 1,
"per_page": 25,
"total": 1
}
}MCP Support (@codingmantra/wacm-mcp)
AI assistants using the Model Context Protocol can inspect email configuration and message history safely using 3 read tools:
get_email_statusChecks workspace SMTP readiness and sender details.
list_email_templatesLists pre-configured email templates.
list_email_messagesQueries CRM email history with pagination.
Omnichannel Email API Context
LLM ReadyExport and feed Email API endpoints to Cursor, Claude, Antigravity, or custom agents.