Zaptickdocs
Email

email.send

Dispatch transactional and one-off email sends. Returns a Zaptick message id you can reconcile with webhook events.

#About

The from address must live on a domain that is verified in your workspace. Unverified domains return email_send_failed with a hint to verify DNS.

Provide body content one of three ways — html, text, or templateId. Template bodies interpolate {{ variable }} placeholders using the provided variables map.

Every successful send emits an email.sent event to your registered webhooks. Delivery, bounce, and open events follow asynchronously as the mail flows through our provider.

#Endpoints

  • POST/v1/email/sendSend a transactional email. Pass html/text directly or reference a saved template.
POST/v1/email/send

Send a transactional email. Pass html/text directly or reference a saved template.

SDK
TypeScript
await zaptick.email.send({
  from: 'hello@yourdomain.com',
  to: 'priya@example.com',
  subject: 'Your order #1024 has shipped',
  html: '<h1>On its way</h1><p>Tracking: {{ trackingUrl }}</p>',
  text: 'On its way. Tracking: {{ trackingUrl }}',
  variables: { trackingUrl: 'https://track.acme/AB12' },
  tags: { flow: 'order_shipped' },
});
Request body
JSON
{
  "from": "hello@yourdomain.com",
  "to": "priya@example.com",
  "subject": "Your order #1024 has shipped",
  "html": "<h1>On its way</h1><p>Tracking: {{ trackingUrl }}</p>",
  "variables": { "trackingUrl": "https://track.acme/AB12" },
  "tags": { "flow": "order_shipped" }
}
Response
JSON
{
  "success": true,
  "messageId": "re_4k2g...",
  "providerId": "re_4k2g...",
  "status": "sent"
}