Misar IO Docs

Send Email

Send a single transactional or marketing email via the MisarMail API.

Send Email

Send a single email to one or more recipients.

Endpoint

POST https://api.misar.io/mail/v1/send

Required scope: send

Request body

{
  "from": {
    "email": "[email protected]",
    "name": "Your Name"
  },
  "to": [
    { "email": "[email protected]", "name": "Alice" }
  ],
  "subject": "Your order has shipped",
  "html": "<p>Your order <strong>#1234</strong> is on its way!</p>",
  "text": "Your order #1234 is on its way!",
  "replyTo": { "email": "[email protected]" },
  "cc": [],
  "bcc": [],
  "headers": {
    "X-Custom-Header": "value"
  },
  "tags": ["transactional", "order-shipped"],
  "sandbox": false
}

Fields

| Field | Type | Required | Description | |-------|------|----------|-------------| | from.email | string | ✅ | Verified sender address | | from.name | string | — | Display name for sender | | to | array | ✅ | Up to 50 recipients | | subject | string | ✅ | Email subject line | | html | string | ✅* | HTML body (one of html/text required) | | text | string | ✅ | Plain-text body | | replyTo | object | — | Reply-to address | | cc | array | — | CC recipients | | bcc | array | — | BCC recipients | | headers | object | — | Custom SMTP headers | | tags | array | — | Labels for filtering analytics | | sandbox | boolean | — | true = test mode, no real delivery | | templateId | string | — | Render a saved template (overrides html/text) | | variables | object | — | Template variable substitutions | | attachments | array | — | Base64-encoded file attachments | | scheduledAt | string | — | ISO 8601 datetime to schedule delivery |

Response

{
  "success": true,
  "messageId": "msg_01ABCDEFGHIJKLMN",
  "accepted": ["[email protected]"],
  "rejected": []
}

With a template

{
  "from": { "email": "[email protected]" },
  "to": [{ "email": "[email protected]" }],
  "templateId": "tmpl_01ABCDEF",
  "variables": {
    "first_name": "Alice",
    "order_id": "1234",
    "tracking_url": "https://track.example.com/1234"
  }
}

With attachments

{
  "from": { "email": "[email protected]" },
  "to": [{ "email": "[email protected]" }],
  "subject": "Monthly Report",
  "html": "<p>Please find the report attached.</p>",
  "attachments": [
    {
      "filename": "report-jan.pdf",
      "content": "JVBERi0xLjQ...",
      "contentType": "application/pdf"
    }
  ]
}

Scheduled send

{
  "from": { "email": "[email protected]" },
  "to": [{ "email": "[email protected]" }],
  "subject": "Tomorrow's digest",
  "html": "<p>...</p>",
  "scheduledAt": "2025-06-01T08:00:00Z"
}

Errors

| Code | Error | Reason | |------|-------|--------| | 400 | invalid_from | Sender domain not verified | | 400 | invalid_to | Recipient email malformed | | 403 | scope_required | Key missing send scope | | 429 | rate_limited | Sending rate exceeded |