Kraiter
Getting Started

Send Your First Email

Verify a domain, create a template, and send your first email with Kraiter.

This guide walks you through sending your first email with Kraiter. By the end, you'll have a verified domain, a reusable template, and a delivered email in your inbox.

Make sure you've completed the Quickstart and AWS Setup before continuing.

Step 1: Add and verify a domain

Before you can send from an address like hello@yourdomain.com, you need to verify that you own the domain.

Add the domain

In the Kraiter dashboard, go to Identities and click Add Identity. Enter your domain (e.g. yourdomain.com) and select the SES region you want to use.

Or use the API:

curl -X POST https://api.kraiter.com/api/ses/identities \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "identity": "yourdomain.com",
    "region": "eu-west-1"
  }'

Kraiter returns a set of DKIM CNAME records that you need to add to your DNS.

Add DNS records

Add the three CNAME records to your domain's DNS configuration. The records look like this:

TypeNameValue
CNAMEabc123._domainkey.yourdomain.comabc123.dkim.amazonses.com
CNAMEdef456._domainkey.yourdomain.comdef456.dkim.amazonses.com
CNAMEghi789._domainkey.yourdomain.comghi789.dkim.amazonses.com

DNS propagation typically takes a few minutes, but can take up to 72 hours depending on your provider. Once the records propagate, the identity status in the dashboard will change to Verified.

Step 2: Create a template

Kraiter templates use MJML for responsive email markup and Liquid for dynamic variables. MJML compiles to HTML that renders correctly across all major email clients.

Create via the dashboard

Go to Templates in the dashboard and click Create Template. The editor supports live preview so you can see how your email will render.

Create via the API

import { Kraiter } from '@kraiter/sdk';

const kraiter = new Kraiter({
  apiKey: process.env.KRAITER_API_KEY,
});

await kraiter.templates.create({
  name: 'welcome-email',
  subject: 'Welcome to {{ company_name }}, {{ name }}!',
  mjml: `
<mjml>
  <mj-body>
    <mj-section>
      <mj-column>
        <mj-text font-size="20px" font-weight="bold">
          Welcome, {{ name }}!
        </mj-text>
        <mj-text>
          Thanks for signing up for {{ company_name }}. We're glad to have you.
        </mj-text>
        <mj-button href="{{ dashboard_url }}">
          Go to Dashboard
        </mj-button>
      </mj-column>
    </mj-section>
  </mj-body>
</mjml>
  `,
});

The {{ name }}, {{ company_name }}, and {{ dashboard_url }} placeholders are Liquid variables that get replaced with real values when you send.

Step 3: Send a transactional email

With a verified domain and a template ready, you can send your first email.

Using the SDK

const result = await kraiter.send({
  to: 'recipient@example.com',
  template: 'welcome-email',
  variables: {
    name: 'Jane',
    company_name: 'Acme',
    dashboard_url: 'https://app.acme.com',
  },
});

console.log(result);
// { messageId: '...', status: 'sent' }

Using curl

curl -X POST https://api.kraiter.com/api/send \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "recipient@example.com",
    "template": "welcome-email",
    "variables": {
      "name": "Jane",
      "company_name": "Acme",
      "dashboard_url": "https://app.acme.com"
    }
  }'

If your AWS account is still in the SES sandbox, the recipient address must be a verified email. Use an address you've verified in the SES console for testing.

Overriding the from address

By default, Kraiter uses the first verified identity in your account as the sender. You can override this per send:

await kraiter.send({
  to: 'recipient@example.com',
  from: 'notifications@yourdomain.com',
  template: 'welcome-email',
  variables: { name: 'Jane' },
});

The from address must belong to a verified domain or be a verified email address.

Check the send in the dashboard

After sending, go to the Sends page in the dashboard to see the delivery status. You'll see:

  • Message ID — The SES message ID for the send
  • Status — Whether the email was delivered, bounced, or complained
  • Timestamps — When the email was sent, delivered, and opened (if tracking is enabled)

You can also check delivery events on the Events page, which shows a live feed of all activity across your organisation.

Next steps

You've sent your first email. Here's where to go from here:

  • Contacts — Import your audience and manage properties
  • Templates — Build responsive emails with MJML and Liquid
  • Sequences — Set up automated drip campaigns triggered by events
  • Segments — Create dynamic audience groups with rule-based membership
  • Transactional Email — Learn more about the send API options