# Template checks

Check a template before you publish or send it: variables, links, accessibility, size and how email clients render it. Each problem comes back as a finding with a level, a code, where it is and what to do about it.

## Early access

> **Note:** Template checks are in early access and are being switched on step by step. Until they reach your workspace, `POST /templates/{id}/check` and `POST /templates/check` answer like an unknown address.

## Run a check

[Check template](https://app.send.io/docs/api#check-template) checks a saved version (the draft by default). [Check template content](https://app.send.io/docs/api#check-template-content) checks content that is not saved yet, such as a file in your repository. Both take a full-access API key; in the dashboard any member may run them.

```bash
curl -X POST https://api.send.io/templates/welcome/check \
  -H "Authorization: Bearer $SENDIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"version": "draft"}'
```

- **error**: the template will fail or send something broken. `ok` is false while there is one.
- **warning**: likely wrong for some or all recipients. Worth fixing before a large send.
- **info**: good to know. Nothing is broken.

`part` is `subject`, `html` or `text` (empty when the finding is about the whole template), and `line` and `column` point at the place in that part.

## Refuse to publish on errors

[Publish template](https://app.send.io/docs/api#publish-template) and [Activate template version](https://app.send.io/docs/api#activate-template-version) take `"checks": "enforce"`. The version is then checked first (links as written, never requested), and refused with 422 `template_check_failed` when the check finds an error; the errors come back in `findings`. Warnings and info never block. Without the field, publishing works as before.

```bash
curl -X POST https://api.send.io/templates/welcome/publish \
  -H "Authorization: Bearer $SENDIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"checks": "enforce"}'
```

## Live link check

By default links are checked as written. With `"links": "live"` send.io also requests each `http` and `https` link and image, follows up to 3 redirects, and reports the ones that fail. A check covers at most 50 addresses in 12 seconds, and a workspace can run 10 live checks a minute (then 429 `rate_limit_exceeded`). Addresses on private or reserved networks are never requested. Links with a `{{variable}}` in them are filled at send time and are skipped.

## Rules

| Code | Level | Part | What it means |
| --- | --- | --- | --- |
| `undeclared_variable` | error (warning on `handlebars`) | subject, html, text | A tag uses a variable the template does not declare. On `simple` a send stops with "Missing template variable"; on `handlebars` it renders empty. Every one is listed, each with its line. Contact fields (`{{{first_name}}}`, `{{{email}}}`, unsubscribe links) and your contact properties are filled by broadcasts and automations and are not reported. |
| `handlebars_syntax` | error | subject, html, text | A `handlebars` part does not parse (an `{{#if}}` without its `{{/if}}`, say). The template cannot be sent until it is fixed. Line and column point at the problem. |
| `unused_variable` | info | (whole template) | A declared variable is not used in the subject, HTML or text. |
| `empty_subject` | warning | subject | The subject is empty. A send needs one, from the template or the send itself. |
| `empty_link` | warning | html | A link has no address. |
| `placeholder_link` | warning | html | A link still goes to a placeholder: `#`, `example.com`, `your-domain.com`, `javascript:` and the like. |
| `anchor_link` | info | html | A link jumps within the email (`#section`), which many inboxes do not support. |
| `insecure_link` | warning | html, text | A link uses `http:`. Inboxes warn about plain http links. |
| `insecure_image` | warning | html | An image is loaded over `http:`. Some clients block it. |
| `invalid_link` | warning | html | A link is not a full address (`www.acme.com` with no `https://`), so it does not open from an inbox. |
| `image_alt` | warning | html | An image has no `alt` text. Use `alt=""` for a decorative image. Tracking pixels are not reported. |
| `missing_lang` | info | html | The `<html>` tag has no `lang` attribute, so screen readers may read the email in the wrong language. |
| `vague_link_text` | info | html | A link's text does not say where it goes: "click here", "here", "read more", "more", "link", "this link". |
| `gmail_clipping` | warning | html | The HTML is over 102 KB. Gmail clips it: the rest, with the unsubscribe link and the open pixel, is hidden. |
| `gmail_clipping_near` | info | html | The HTML is over 90% of Gmail's 102 KB limit. |
| `no_text_part` | info | text | There is HTML but no plain-text part. |
| `fixed_width` | warning | html | A table, div or cell is fixed wider than 375 px, so the email scrolls sideways on a phone. Give it `max-width: 100%`. |
| `no_dark_mode` | info | html | No dark mode styles (`prefers-color-scheme: dark` or a `color-scheme` with dark). Dark inboxes may invert the colours. |
| `broken_link` | warning | html, text | Live check: the link answered with an HTTP error (4xx or 5xx). |
| `unreachable_link` | warning | html, text | Live check: the link could not be reached: no such host, no answer, a redirect loop or more than 3 redirects, or the check ran out of time before it. |
| `blocked_link` | warning | html, text | Live check: the link, or one of its redirects, is not a public web address (a private or reserved network, an unusual port, or not a valid address), so send.io does not request it. |
| `link_check_skipped` | info | (whole template) | Live check: the template has more than 50 addresses, and the rest were not requested. The message says how many. |

## Email client compatibility

A `compat_*` finding names a feature some email clients do not render, and lists those clients in `clients`. It is a warning when a major client (Outlook, Gmail, Apple Mail, Yahoo Mail, Samsung Email) does not support it at all, and info when support is only partial or the feature degrades gracefully. HTML inside Outlook conditional comments (`<!--[if mso]>`) is not checked, so the usual Outlook fixes raise nothing.

| Code | Feature |
| --- | --- |
| `compat_css_display_flex` | `display: flex` |
| `compat_css_display_grid` | `display: grid` |
| `compat_css_position` | `position` other than static |
| `compat_css_variables` | CSS variables (`--name`, `var()`) |
| `compat_css_background_image` | `background-image`, or `background` with `url()` |
| `compat_css_border_radius` | `border-radius` (info only) |
| `compat_css_box_shadow` | `box-shadow` (info only) |
| `compat_css_at_font_face` | `@font-face` web fonts (info only) |
| `compat_css_at_media` | `@media` queries (info only) |
| `compat_css_pseudo_class_hover` | `:hover` (info only) |
| `compat_css_unit_calc` | `calc()` |
| `compat_css_object_fit` | `object-fit` |
| `compat_css_max_width` | `max-width` (info only) |
| `compat_css_at_keyframes` | `@keyframes` (info only) |
| `compat_css_animation` | `animation` (info only) |
| `compat_css_transform` | `transform` |
| `compat_css_linear_gradient` | `linear-gradient()` |
| `compat_css_rgba` | `rgba()` colours |
| `compat_css_at_import` | `@import` |
| `compat_html_svg` | an `<svg>` element |
| `compat_html_video` | a `<video>` element |
| `compat_html_audio` | an `<audio>` element |
| `compat_html_form` | a `<form>` element |
| `compat_image_svg` | an SVG image |
| `compat_image_base64` | an image embedded as `data:` |
| `compat_image_webp` | a WebP image |
| `compat_image_avif` | an AVIF image |

> **Note:** Compatibility data from [caniemail.com](https://www.caniemail.com) (MIT licence), snapshot of 2026-09-16. Thanks to caniemail and its contributors for testing every feature in every client.
