WACM.in Logo
Back to API Overview
REST API v1MCP Supported (3 Tools)

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.

bash
curl -X GET https://app.wacm.in/api/v1/email/settings \
  -H 'Authorization: Bearer YOUR_SANCTUM_TOKEN' \
  -H 'Accept: application/json'
GET

/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)

json
{
  "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"
  }
}
GET

/api/v1/email/templates

Retrieve pre-configured email templates available in the workspace for outbound dispatch.

Response Example

json
{
  "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"
    }
  ]
}
POST

/api/v1/email/send

Dispatches an email via the workspace's dynamic SMTP transport and logs it to the unified CRM conversation timeline.

Parameters

ParameterTypeRequiredDescription
emailstringOptionalDirect recipient email address. (Required if contact_id or phone not provided).
contact_idintegerOptionalContact ID. Resolves email address automatically and links message history.
phonestringOptionalInternational phone number. Resolves existing contact and email automatically.
subjectstringRequiredSubject line of the outbound email.
messagestringRequiredBody content of the email (HTML or Markdown supported).
template_idintegerOptionalPre-configured email template ID to apply.

Request Example

json
{
  "contact_id": 42,
  "subject": "Your Order Confirmation #8921",
  "message": "<p>Thank you for your purchase! Your package is on the way.</p>"
}

Response Example

json
{
  "status": "success",
  "message": "Email sent successfully",
  "data": {
    "recipient_email": "jane@example.com",
    "contact_id": 42,
    "subject": "Your Order Confirmation #8921",
    "message_id": 1502
  }
}
GET

/api/v1/email/messages

Paginated list of unified CRM email messages sent through WACM.

Parameters

ParameterTypeRequiredDescription
pageintegerOptionalPage number for pagination (default: 1).
limitintegerOptionalItems per page (default: 25, max: 100).
contact_idintegerOptionalFilter emails by associated contact ID.
searchstringOptionalFilter emails by subject or body text.

Response Example

json
{
  "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_status

Checks workspace SMTP readiness and sender details.

list_email_templates

Lists pre-configured email templates.

list_email_messages

Queries CRM email history with pagination.

Omnichannel Email API Context

LLM Ready

Export and feed Email API endpoints to Cursor, Claude, Antigravity, or custom agents.

Download .mdOpenAPI 3.1
Machine-Readable Feeds:/llms.txt /llms-full.txt