Zaptickdocs
Email

email.templates

HTML templates with {{ variable }} placeholders. Use templates for consistent branding across email, or reference them inline on every send.

#Endpoints

  • GET/v1/email/templatesList templates in your workspace. Filter by status or search by name.
  • GET/v1/email/templates/:idFetch a single template by id.
  • POST/v1/email/templatesCreate a new HTML template.
  • PUT/v1/email/templates/:idPartial update. Only provided fields change — omit the rest.
GET/v1/email/templates

List templates in your workspace. Filter by status or search by name.

SDK
TypeScript
const { templates, total } = await zaptick.email.templates.list({
  status: 'active',
  limit: 50,
});
Response
JSON
{
  "success": true,
  "templates": [
    {
      "id": "64f…",
      "name": "Order shipped",
      "subject": "Your order #{{ orderId }} is on its way",
      "html": "<h1>On its way</h1>…",
      "variables": ["orderId", "trackingUrl"],
      "status": "active",
      "createdAt": "2026-04-10T12:00:00.000Z",
      "updatedAt": "2026-04-12T08:12:09.000Z"
    }
  ],
  "total": 1,
  "page": 1,
  "limit": 50
}
GET/v1/email/templates/:id

Fetch a single template by id.

SDK
TypeScript
const { template } = await zaptick.email.templates.get('64f…');
POST/v1/email/templates

Create a new HTML template.

SDK
TypeScript
const { template } = await zaptick.email.templates.create({
  name: 'Password reset',
  subject: 'Reset your password',
  html: '<p>Hi {{ firstName }}, reset link: {{ resetUrl }}</p>',
  text: 'Hi {{ firstName }}, reset link: {{ resetUrl }}',
});
Request body
JSON
{
  "name": "Password reset",
  "subject": "Reset your password",
  "html": "<p>Hi {{ firstName }}, reset link: {{ resetUrl }}</p>",
  "text": "Hi {{ firstName }}, reset link: {{ resetUrl }}"
}
PUT/v1/email/templates/:id

Partial update. Only provided fields change — omit the rest.