# HTML E-mail Compatibility Checker API

> See which HTML / CSS features an e-mail uses and how Gmail, Outlook, Apple Mail, Yahoo and 20 more clients support them, plus Gmail clipping.

- Endpoint: `GET | POST https://apibox.io.vn/v1/email-compat`
- Category: Content & HTML
- HTML docs: https://apibox.io.vn/docs/email-compat/ (Vietnamese: https://apibox.io.vn/vi/docs/email-compat/)
- Online tool: https://apibox.io.vn/tools/email-compat/
- Authentication: `Authorization: Bearer <API key>` or `X-API-Key: <API key>` (free key: https://apibox.io.vn/dashboard/#signup)

Send an HTML e-mail (`html`, an `.eml` message, a file or a URL) and get the HTML elements and attributes, CSS properties, values, units, selectors, pseudo-classes and at-rules (@media, prefers-color-scheme, @font-face…) it uses, each with the share of tested clients that support it, the clients where it does not work or works partly, the first line where it appears, and a link to the Can I email page. A per-client view lists how many of the features each client (Gmail web / iOS / Android, Outlook Windows / Mac / Outlook.com, Apple Mail, Yahoo, Samsung Email, Thunderbird, ProtonMail…) supports and which ones break; `clients=gmail,outlook.windows` narrows the list.

Also checked: total size against Gmail's 102 KB clipping limit, images without alt or width, images and links over http://, <style> inside <body>, missing <title> / lang, and a hint to inline the CSS (see /v1/email-inline) when classes are styled from <style>. `feature=` or `search=` look up one feature's support table.

Static analysis only: no rendering or screenshots. Scores weight every client equally because there is no free, licence-compatible client market-share data. Data: Can I email by Rémi Parmentier (MIT), refreshed weekly.

## Parameters

| Name | In | Type | Required | Default | Description |
|---|---|---|---|---|---|
| `html` | body | string | no |  | HTML of the e-mail (max 5 MB). Or `eml`, `url` or a file. |
| `eml` | body | string | no |  | Raw .eml message; the text/html part is analysed. |
| `url` | query | string | no |  | Public URL of the HTML (e.g. "view in browser" link). |
| `clients` | body|query | string | no |  | Limit to client families or family.platform: `gmail,outlook.windows,apple-mail,yahoo,samsung-email`… |
| `feature` | query | string | no |  | Look up one feature (e.g. `css-display-flex`). |
| `search` | query | string | no |  | Search features by keyword. |
| `full` | body|query | boolean | no |  | `1`: include the per-client table of every feature. |

## Example request

```bash
curl -X POST "https://apibox.io.vn/v1/email-compat" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"html":"<html><head><style>@media (max-width:600px){.col{display:block}} .btn:hover{opacity:.8}</style></head><body><div style=\"display:flex;gap:12px;border-radius:8px\"><img src=\"http://cdn.example.com/logo.webp\"></div></body></html>","clients":"gmail,outlook,apple-mail,yahoo"}'
```

## Example response

```json
{
  "input": "html",
  "size": {
    "bytes": 225,
    "kb": 0.2,
    "gmail_clip_limit_kb": 102,
    "clipped_in_gmail": false
  },
  "score": 75,
  "features_used": 14,
  "features": [
    {
      "slug": "css-gap",
      "title": "gap, column-gap, row-gap",
      "category": "css",
      "count": 1,
      "first_line": 1,
      "example": "gap: 12px",
      "supported_pct": 37,
      "clients_tested": 15,
      "unsupported_in": [
        "Gmail (Mobile Webmail)",
        "Outlook (Windows)",
        "Outlook (Windows Mail)",
        "Yahoo! Mail (Desktop Webmail)",
        "Yahoo! Mail (iOS)",
        "Yahoo! Mail (Android)"
      ],
      "partial_in": [
        "Gmail (Desktop Webmail)",
        "Gmail (iOS)",
        "Gmail (Android)",
        "Outlook (macOS)",
        "Outlook (Outlook.com)",
        "Outlook (iOS)",
        "Outlook (Android)"
      ],
      "url": "https://www.caniemail.com/features/css-gap/"
    },
    "…"
  ],
  "clients": [
    {
      "client": "Outlook (Windows)",
      "yes": 5,
      "partial": 2,
      "no": 7,
      "unknown": 0,
      "problems": [
        "display:flex",
        "gap, column-gap, row-gap",
        "border-radius",
        "webP image format",
        "@media",
        ":hover",
        "opacity"
      ],
      "score": 43
    },
    "…"
  ],
  "issues": [
    {
      "level": "warning",
      "code": "img_missing_alt",
      "message": "<img> without alt (http://cdn.example.com/logo.webp)",
      "line": 1
    },
    {
      "level": "warning",
      "code": "insecure_image",
      "message": "Image loaded over http:// (http://cdn.example.com/logo.webp)",
      "line": 1
    },
    "…"
  ],
  "images": 1,
  "images_missing_alt": 1,
  "note": "Static analysis only (no rendering). Scores weight every client / platform equally: no free licence-compatible e-mail client market-share data exists.",
  "meta": {
    "data_updated": "2026-09-16",
    "features": 308
  },
  "source": "Can I email (https://www.caniemail.com) by Rémi Parmentier, MIT licence"
}
```

## Use cases

- Check a newsletter template before sending a campaign
- Make sure transactional e-mails (invoices, OTP) render in Outlook and Gmail
- Add an e-mail compatibility step to a template CI pipeline
- Answer "does Gmail support flexbox / dark mode?" in a builder or ESP

## FAQ

### Does it render the e-mail?

No. It is a static analysis of the HTML / CSS against Can I email test results; it does not take screenshots.

### How is the score computed?

Each feature's support share over the tested client / platform pairs (partial = half), averaged over the features you use.

### Can I send an .eml file?

Yes. The HTML part is extracted from the MIME message (multipart and encodings are handled).
