Templates

Create templates in the dashboard (Email API → Templates) or with the API, then send them by id or by name.

curl -X POST https://sendneo.yorkermedia.com/api/emails \
  -H "Authorization: Bearer $SENDNEO_KEY" -H "Content-Type: application/json" \
  -d '{"from":"Acme <hi@mail.acme.com>","to":["ada@example.com"],
       "template_id":"<template id or name>",
       "variables":{"first_name":"Ada","order_id":"42"}}'

Resend's shape works too: "template": {"id": "...", "variables": {...}}.

  • {{name}} inserts a variable; in the HTML part the value is escaped, so customer data can never inject markup.
  • {{name|fallback}} uses the fallback when the variable is missing or empty.
  • A template body that is a fragment is wrapped in SendNeo's clean, responsive layout; a full <html> document is sent as is.
  • Anything you pass explicitly (subject, html, text) overrides the template.
Endpoint
GET /templates list (each with the variables it uses)
POST /templates create: name, subject, html, optional text
GET /templates/{id} · PATCH · DELETE read, update, delete