/v1/workspaces/{workspace_id}/templates/lintAuthLint a draft for deliverability red flags. Same render pipeline as /preview; returns a 0-100 score (higher is better) and a sorted list of findings (errors first). Self-developed heuristic linter, no external classifier — runs in-process.
Path parameters
workspace_id*string · uuidId of the workspace.
Request body
subjectstringSubject template (Handlebars).
body_html*stringHTML body to render (Handlebars).
dataobjectSample data to render variables with. Keys are your variable names and are kept exactly as sent.
Response · 200
score*number0-100, higher is better. ≥90 "looks great"; <70 "likely to spam-folder".
findings*arrayEvery problem found, most severe first.
Example
Request
POST https://api.mail.productcraft.co/v1/workspaces/{workspace_id}/templates/lint
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json
{
"subject": "string",
"body_html": "string",
"data": {}
}Response
{
"score": 0,
"findings": [
{
"id": "string",
"severity": {},
"message": "string",
"suggestion": "string"
}
]
}