zeptomail

$npx mdskill add vm0-ai/vm0-skills/zeptomail

Send transactional emails via ZeptoMail API

  • Handles user requests to send emails or OTP codes
  • Depends on ZeptoMail API and Zoho authentication
  • Executes POST requests with JSON payloads to the API
  • Delivers formatted HTML or plain text emails to recipients

SKILL.md

.github/skills/zeptomailView on GitHub ↗
---
name: zeptomail
description: ZeptoMail API for transactional email. Use when user mentions "ZeptoMail",
  "transactional email", "send email", or Zoho email.
---

## Troubleshooting

If requests fail, run `zero doctor check-connector --env-name ZEPTOMAIL_TOKEN` or `zero doctor check-connector --url https://api.zeptomail.com/v1.1/email --method POST`

## How to Use

Base URL: `https://api.zeptomail.com/v1.1`

### 1. Send Basic Email

Write to `/tmp/zeptomail_request.json`:

```json
{
  "from": {
    "address": "[email protected]",
    "name": "Your App"
  },
  "to": [
    {
      "email_address": {
        "address": "[email protected]",
        "name": "User"
      }
    }
  ],
  "subject": "Welcome to Our Service",
  "htmlbody": "<h1>Welcome!</h1><p>Thank you for signing up.</p>"
}
```

Then run:

```bash
curl -s "https://api.zeptomail.com/v1.1/email" -X POST --header "Authorization: Zoho-enczapikey $ZEPTOMAIL_TOKEN" --header "Content-Type: application/json" -d @/tmp/zeptomail_request.json
```

### 2. Send Plain Text Email

Write to `/tmp/zeptomail_request.json`:

```json
{
  "from": {
    "address": "[email protected]",
    "name": "Your App"
  },
  "to": [
    {
      "email_address": {
        "address": "[email protected]",
        "name": "User"
      }
    }
  ],
  "subject": "Your OTP Code",
  "textbody": "Your one-time password is: 123456\n\nThis code expires in 10 minutes."
}
```

Then run:

```bash
curl -s "https://api.zeptomail.com/v1.1/email" -X POST --header "Authorization: Zoho-enczapikey $ZEPTOMAIL_TOKEN" --header "Content-Type: application/json" -d @/tmp/zeptomail_request.json
```

### 3. Send Email with Tracking

Enable open and click tracking:

Write to `/tmp/zeptomail_request.json`:

```json
{
  "from": {
    "address": "[email protected]",
    "name": "Your App"
  },
  "to": [
    {
      "email_address": {
        "address": "[email protected]",
        "name": "User"
      }
    }
  ],
  "subject": "Order Confirmation #12345",
  "htmlbody": "<p>Your order has been confirmed. <a href=\"https://example.com/track\">Track your order</a></p>",
  "track_clicks": true,
  "track_opens": true,
  "client_reference": "order-12345"
}
```

Then run:

```bash
curl -s "https://api.zeptomail.com/v1.1/email" -X POST --header "Authorization: Zoho-enczapikey $ZEPTOMAIL_TOKEN" --header "Content-Type: application/json" -d @/tmp/zeptomail_request.json
```

### 4. Send to Multiple Recipients (CC/BCC)

Write to `/tmp/zeptomail_request.json`:

```json
{
  "from": {
    "address": "[email protected]",
    "name": "Your App"
  },
  "to": [
    {
      "email_address": {
        "address": "[email protected]",
        "name": "User 1"
      }
    }
  ],
  "cc": [
    {
      "email_address": {
        "address": "[email protected]",
        "name": "User 2"
      }
    }
  ],
  "bcc": [
    {
      "email_address": {
        "address": "[email protected]",
        "name": "Admin"
      }
    }
  ],
  "subject": "Team Update",
  "htmlbody": "<p>Here is the latest update for the team.</p>",
  "reply_to": [
    {
      "address": "[email protected]",
      "name": "Support"
    }
  ]
}
```

Then run:

```bash
curl -s "https://api.zeptomail.com/v1.1/email" -X POST --header "Authorization: Zoho-enczapikey $ZEPTOMAIL_TOKEN" --header "Content-Type: application/json" -d @/tmp/zeptomail_request.json
```

### 5. Send Email with Attachment (Base64)

```bash
# Encode file to base64
FILE_CONTENT=$(base64 -i /path/to/file.pdf)
```

Write to `/tmp/zeptomail_request.json`:

```json
{
  "from": {
    "address": "[email protected]",
    "name": "Your App"
  },
  "to": [
    {
      "email_address": {
        "address": "[email protected]",
        "name": "User"
      }
    }
  ],
  "subject": "Your Invoice",
  "htmlbody": "<p>Please find your invoice attached.</p>",
  "attachments": [
    {
      "name": "invoice.pdf",
      "mime_type": "application/pdf",
      "content": "${FILE_CONTENT}"
    }
  ]
}
```

Then run:

```bash
curl -s "https://api.zeptomail.com/v1.1/email" -X POST --header "Authorization: Zoho-enczapikey $ZEPTOMAIL_TOKEN" --header "Content-Type: application/json" -d @/tmp/zeptomail_request.json
```

### 6. Send Email with Inline Image

```bash
# Encode image to base64
IMAGE_CONTENT=$(base64 -i /path/to/logo.png)
```

Write to `/tmp/zeptomail_request.json`:

```json
{
  "from": {
    "address": "[email protected]",
    "name": "Your App"
  },
  "to": [
    {
      "email_address": {
        "address": "[email protected]",
        "name": "User"
      }
    }
  ],
  "subject": "Newsletter",
  "htmlbody": "<p><img src='cid:logo'/></p><p>Welcome to our newsletter!</p>",
  "inline_images": [
    {
      "cid": "logo",
      "name": "logo.png",
      "mime_type": "image/png",
      "content": "${IMAGE_CONTENT}"
    }
  ]
}
```

Then run:

```bash
curl -s "https://api.zeptomail.com/v1.1/email" -X POST --header "Authorization: Zoho-enczapikey $ZEPTOMAIL_TOKEN" --header "Content-Type: application/json" -d @/tmp/zeptomail_request.json
```

### 7. Send Templated Email

Use pre-defined templates with merge fields:

Write to `/tmp/zeptomail_request.json`:

```json
{
  "template_key": "your-template-key",
  "from": {
    "address": "[email protected]",
    "name": "Your App"
  },
  "to": [
    {
      "email_address": {
        "address": "[email protected]",
        "name": "User"
      }
    }
  ],
  "merge_info": {
    "user_name": "John",
    "order_id": "12345",
    "total": "$99.00"
  }
}
```

Then run:

```bash
curl -s "https://api.zeptomail.com/v1.1/email/template" -X POST --header "Authorization: Zoho-enczapikey $ZEPTOMAIL_TOKEN" --header "Content-Type: application/json" -d @/tmp/zeptomail_request.json
```

Template example (in ZeptoMail dashboard):
```html
<p>Hi {{user_name}},</p>
<p>Your order #{{order_id}} totaling {{total}} has been shipped!</p>
```

### 8. Batch Send (Multiple Recipients)

Send to up to 500 recipients with personalized merge fields:

Write to `/tmp/zeptomail_request.json`:

```json
{
  "from": {
    "address": "[email protected]",
    "name": "Your App"
  },
  "subject": "Your Monthly Report - {{month}}",
  "htmlbody": "<p>Hi {{name}},</p><p>Here is your report for {{month}}.</p>",
  "to": [
    {
      "email_address": {
        "address": "[email protected]",
        "name": "User 1"
      },
      "merge_info": {
        "name": "Alice",
        "month": "December"
      }
    },
    {
      "email_address": {
        "address": "[email protected]",
        "name": "User 2"
      },
      "merge_info": {
        "name": "Bob",
        "month": "December"
      }
    }
  ]
}
```

Then run:

```bash
curl -s "https://api.zeptomail.com/v1.1/email/batch" -X POST --header "Authorization: Zoho-enczapikey $ZEPTOMAIL_TOKEN" --header "Content-Type: application/json" -d @/tmp/zeptomail_request.json
```

### 9. Batch Send with Template

Write to `/tmp/zeptomail_request.json`:

```json
{
  "template_key": "your-template-key",
  "from": {
    "address": "[email protected]",
    "name": "Your App"
  },
  "to": [
    {
      "email_address": {
        "address": "[email protected]",
        "name": "User 1"
      },
      "merge_info": {
        "user_name": "Alice",
        "code": "ABC123"
      }
    },
    {
      "email_address": {
        "address": "[email protected]",
        "name": "User 2"
      },
      "merge_info": {
        "user_name": "Bob",
        "code": "XYZ789"
      }
    }
  ]
}
```

Then run:

```bash
curl -s "https://api.zeptomail.com/v1.1/email/template/batch" -X POST --header "Authorization: Zoho-enczapikey $ZEPTOMAIL_TOKEN" --header "Content-Type: application/json" -d @/tmp/zeptomail_request.json
```

## Response Format

### Success Response

```json
{
  "data": [
  {
  "code": "EM_104",
  "additional_info": [],
  "message": "OK"
  }
  ],
  "message": "OK",
  "request_id": "abc123..."
}
```

### Error Response

```json
{
  "error": {
  "code": "TM_102",
  "details": [
  {
  "code": "TM_102",
  "message": "Invalid email address",
  "target": "to"
  }
  ],
  "message": "Invalid request"
  },
  "request_id": "abc123..."
}
```

## Common Error Codes

| Code | Description |
|------|-------------|
| TM_101 | Authentication failed (invalid token) |
| TM_102 | Invalid request parameters |
| TM_103 | Domain not verified |
| TM_104 | Rate limit exceeded |
| EM_104 | Success |

## Guidelines

1. **Transactional only** - Do not use for marketing or bulk promotional emails
2. **Verify domain first** - Sender address must be from a verified domain
3. **Size limit** - Total email size (headers + body + attachments) must not exceed 15 MB
4. **Batch limit** - Maximum 500 recipients per batch request
5. **Use templates** - For consistent emails, create templates in the dashboard
6. **Track reference** - Use `client_reference` to correlate emails with your transactions
7. **TLS required** - API only supports TLS v1.2+

More from vm0-ai/vm0-skills

SkillDescription
account-reconciliationPerform account reconciliations comparing general ledger balances against subledgers, bank statements, or external records. Use for bank reconciliation, GL-to-subledger reconciliation, intercompany reconciliation, balance sheet reconciliation, reconciling item analysis, outstanding item aging, or clearing open items.
agentphoneBuild AI phone agents with AgentPhone API. Use when the user wants to make phone calls, send/receive SMS, manage phone numbers, create voice agents, set up webhooks, or check usage — anything related to telephony, phone numbers, or voice AI.
ahrefsAhrefs SEO API for backlink and keyword analysis. Use when user mentions
amplitudeAmplitude product analytics API. Use when user mentions "Amplitude",
analysis-qaQuality-check a data analysis before sharing — verify joins, aggregations, denominators, time ranges, and metric definitions. Detect pitfalls like survivorship bias, average-of-averages, join explosion, timezone mismatches, incomplete periods, and selection bias. Includes documentation templates for reproducible analyses.
anthropic-managed-agentsAnthropic Managed Agents API for programmatically creating, running, and streaming AI agents on Anthropic's cloud infrastructure. Use when the user mentions "Managed Agents", "Anthropic agent sessions", or needs to create/run/stream an Anthropic agent with tool use (bash, git, web), attach GitHub repositories, or inject secrets via Vault. Do NOT use for standard Claude Messages API — use the Claude API skill instead.
apifyApify web scraping platform. Use when user mentions "scrape website",
asanaAsana API for tasks and projects. Use when user mentions "Asana", "asana.com",
attioAttio REST API for AI-native CRM operations — manage companies, people, deals, and custom objects, plus notes, tasks, lists, and comments. Use when the user mentions "Attio", "CRM record", "create company", "add person", "list entry", "CRM note", or "CRM task".
audit-readinessPrepare for internal and external audits with SOX 404 control testing, sample selection, workpaper documentation, and deficiency evaluation. Use for SOX compliance, control testing methodology, audit sample selection, audit workpaper preparation, control deficiency classification, material weakness evaluation, ITGC testing, remediation tracking, or audit evidence standards.