DashForDevsDocs
DocsNewsAPI v1
dashfordevs.comSign in

© 2026 DashForDevs

DocsNewsdashfordevs.comLegalStatus
DocsEmailSending Emails
Introduction
Getting Started
Authentication
Products
Categories
Cart
Checkout
Blog
Reviews
Webhooks
Customers
Orders
Inventory
Shipping
Discounts
Affiliates
Email
Sending EmailsEmail TemplatesContact Forms
Media & Files
Analytics & Tracking
Locations
Tax
Global Data
SEO
Error Handling
Geography
Finance
Automations
Page Types
Surveys
Billing & Subscriptions
Storefront Payments
SDK Reference
REST API
Storefront Architecture
Notifications
Security
Team & Permissions
Migrations & Import
Calendar & Appointments
Contact Forms
AI Bots
Dashboard API
Deployment
Changelog
Troubleshooting
Recipes
CLI & Deployment
Image Pipeline
White-label Platforms
Records Engine
Platform Modules
Platform Security
Site Keys & Client Sites
Use Cases
Operations

Sending Emails

Send transactional emails to customers.

Updated September 8, 2026

On this page
  • Overview
  • Initialize Email Marketing
  • Identify Subscribers
  • Track Events
  • Common Events to Track
  • REST API
  • Next Steps

Overview

DashForDevs integrates with email marketing providers like Klaviyo to send transactional and marketing emails. The SDK provides methods to identify subscribers and track events.

Initialize Email Marketing

typescript
import dash from "@/lib/dash"

const { active, provider } = await dash.marketing.init()
// active: true if email provider is configured
// provider: "klaviyo" | null

Identify Subscribers

typescript
await dash.email.identify({
  email: "customer@example.com",
  first_name: "Jane",
  last_name: "Doe",
  phone: "555-0123",
  properties: {
    source: "checkout",
    lifetime_value: "250.00",
  },
})

Track Events

typescript
await dash.email.track({
  email: "customer@example.com",
  event: "viewed_product",
  properties: {
    product_name: "Blue Dream",
    product_price: "29.99",
    product_url: "https://store.com/products/blue-dream",
  },
})

Common Events to Track

EventWhen
viewed_productCustomer views a product page
added_to_cartItem added to cart
started_checkoutCheckout process began
placed_orderOrder completed
subscribedCustomer opted into marketing

REST API

shell
# Get email config
GET /storefront/email/config
X-API-Key: pk_live_your_key

# Identify subscriber
POST /storefront/email/identify
Content-Type: application/json
{ "email": "customer@example.com", "properties": {} }

# Track event
POST /storefront/email/track
Content-Type: application/json
{ "event": "viewed_product", "properties": {} }

Next Steps

  • Email Templates — Customizing email templates
  • Contact Forms — Handling contact form emails
  • Storefront Views — Page view tracking

Campaigns and automated sends on top of these are covered in email marketing.

PreviousPayoutsNextEmail Templates

On this page

  • Overview
  • Initialize Email Marketing
  • Identify Subscribers
  • Track Events
  • Common Events to Track
  • REST API
  • Next Steps